Skip to content

Commit

Permalink
Fix clientmain not working (#1846)
Browse files Browse the repository at this point in the history
* Fix clientmain not working

* Remove print
  • Loading branch information
thegrb93 authored Sep 8, 2024
1 parent 58bda9f commit 12064a3
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions lua/starfall/preprocessor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -63,22 +63,13 @@ SF.PreprocessData = {
end,
Postprocess = function(self, processor)
if self.clientmain then
self.clientmain = processor:ResolvePath(self.path, self.clientmain) or error("Bad --@clientmain "..self.clientmain.." in file "..self.path)
self.clientmain = processor:ResolvePath(self.clientmain, self.path) or error("Bad --@clientmain "..self.clientmain.." in file "..self.path)
end

for _, incdata in ipairs(self.includesdata) do
incdata = processor:ResolvePath(self.path, incdata) or error("Bad --@includedata "..incdata.." in file "..self.path)
incdata = processor:ResolvePath(incdata, self.path) or error("Bad --@includedata "..incdata.." in file "..self.path)
processor.files[incdata].datafile = true
end

if self.serverorclient then
for _, inc in ipairs(self.includes) do
local incdata = processor.files[processor:ResolvePath(self.path, inc)]
if incdata.serverorclient and self.serverorclient ~= incdata.serverorclient then
error("Incompatible client/server realm: \""..self.path.."\" trying to include \""..inc.."\"")
end
end
end
end
},
__call = function(t, path, code)
Expand Down

0 comments on commit 12064a3

Please sign in to comment.