Skip to content

Commit

Permalink
Fixed crashing (not fully checked yet)
Browse files Browse the repository at this point in the history
  • Loading branch information
vulcan-dev committed Jan 20, 2023
1 parent 850b37f commit 688f9dc
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 13 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
*.toml

# Can't delete it right now so just ignore it..
/Server/
/Server/
/Releases/
Binary file modified Resources/Client/floodBeamMP.zip
Binary file not shown.
11 changes: 1 addition & 10 deletions Resources/Client/floodBeamMP/lua/ge/extensions/floodBeamMP.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,6 @@ local function tableToMatrix(tbl)
return mat
end

local function getOcean()
local waterPlane = findObject("Ocean", "WaterPlane")
if waterPlane then
initialWaterPosition = waterPlane.position
end

return waterPlane
end

local hiddenWater = {}

local function getWaterLevel()
Expand Down Expand Up @@ -90,7 +81,7 @@ end

AddEventHandler("E_OnPlayerLoaded", function()
allWater = getAllWater()
ocean = getOcean()
ocean = findObject("Ocean", "WaterPlane")

if calledOnInit then return end
TriggerServerEvent("E_OnInitiliaze", tostring(getWaterLevel()))
Expand Down
4 changes: 2 additions & 2 deletions Resources/Server/Flood/flood.lua
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ M.commands["start"] = function(pid)
M.options.oceanLevel = M.initialLevel
end

MP.CreateEventTimer("ET_Update", 25, MP.CallStrategy.Precise)
MP.CreateEventTimer("ET_Update", 100)

MP.hSendChatMessage(-1, "A flood has started!")
end
Expand Down Expand Up @@ -224,6 +224,6 @@ MP.RegisterEvent("onInit", "onInit")
MP.RegisterEvent("onPlayerJoin", "onPlayerJoin")
MP.RegisterEvent("E_OnInitiliaze", "E_OnInitialize")
MP.RegisterEvent("ET_Update", "T_Update")
MP.CreateEventTimer("ET_Update", 25, MP.CallStrategy.Precise)
MP.CreateEventTimer("ET_Update", 100)

return M

0 comments on commit 688f9dc

Please sign in to comment.