Skip to content

Commit 688f9dc

Browse files
committed
Fixed crashing (not fully checked yet)
1 parent 850b37f commit 688f9dc

File tree

4 files changed

+5
-13
lines changed

4 files changed

+5
-13
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
*.toml
55

66
# Can't delete it right now so just ignore it..
7-
/Server/
7+
/Server/
8+
/Releases/

Resources/Client/floodBeamMP.zip

-35 Bytes
Binary file not shown.

Resources/Client/floodBeamMP/lua/ge/extensions/floodBeamMP.lua

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,6 @@ local function tableToMatrix(tbl)
2727
return mat
2828
end
2929

30-
local function getOcean()
31-
local waterPlane = findObject("Ocean", "WaterPlane")
32-
if waterPlane then
33-
initialWaterPosition = waterPlane.position
34-
end
35-
36-
return waterPlane
37-
end
38-
3930
local hiddenWater = {}
4031

4132
local function getWaterLevel()
@@ -90,7 +81,7 @@ end
9081

9182
AddEventHandler("E_OnPlayerLoaded", function()
9283
allWater = getAllWater()
93-
ocean = getOcean()
84+
ocean = findObject("Ocean", "WaterPlane")
9485

9586
if calledOnInit then return end
9687
TriggerServerEvent("E_OnInitiliaze", tostring(getWaterLevel()))

Resources/Server/Flood/flood.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ M.commands["start"] = function(pid)
113113
M.options.oceanLevel = M.initialLevel
114114
end
115115

116-
MP.CreateEventTimer("ET_Update", 25, MP.CallStrategy.Precise)
116+
MP.CreateEventTimer("ET_Update", 100)
117117

118118
MP.hSendChatMessage(-1, "A flood has started!")
119119
end
@@ -224,6 +224,6 @@ MP.RegisterEvent("onInit", "onInit")
224224
MP.RegisterEvent("onPlayerJoin", "onPlayerJoin")
225225
MP.RegisterEvent("E_OnInitiliaze", "E_OnInitialize")
226226
MP.RegisterEvent("ET_Update", "T_Update")
227-
MP.CreateEventTimer("ET_Update", 25, MP.CallStrategy.Precise)
227+
MP.CreateEventTimer("ET_Update", 100)
228228

229229
return M

0 commit comments

Comments
 (0)