mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-31 04:51:40 +09:00
Added offset for on tick to hopefuly reduce desyncs
This commit is contained in:
@@ -157,7 +157,7 @@ function Gui.cam_link(data)
|
|||||||
end
|
end
|
||||||
|
|
||||||
Event.register(defines.events.on_tick, function(event)
|
Event.register(defines.events.on_tick, function(event)
|
||||||
if (event.tick/(3600*game.speed)) % 15 == 0 then
|
if gui.left and ((event.tick+10)/(3600*game.speed)) % 15 == 0 then
|
||||||
Gui.left.update()
|
Gui.left.update()
|
||||||
end
|
end
|
||||||
if Gui._global().cams and is_type(Gui._global().cams,'table') and #Gui._global().cams > 0 then
|
if Gui._global().cams and is_type(Gui._global().cams,'table') and #Gui._global().cams > 0 then
|
||||||
|
|||||||
@@ -347,7 +347,7 @@ Event.register(-1,function(event)
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
Event.register(defines.events.on_tick,function(event)
|
Event.register(defines.events.on_tick,function(event)
|
||||||
if ((event.tick/(3600*game.speed))+(15/2))% 15 == 0 then
|
if (((event.tick+10)/(3600*game.speed))+(15/2))% 15 == 0 then
|
||||||
-- this is the system to auto rank players
|
-- this is the system to auto rank players
|
||||||
if not Server or not Server._thread then
|
if not Server or not Server._thread then
|
||||||
for _,player in pairs(game.connected_players) do
|
for _,player in pairs(game.connected_players) do
|
||||||
|
|||||||
@@ -374,6 +374,7 @@ function Server._thread:on_event(event,callback)
|
|||||||
end
|
end
|
||||||
|
|
||||||
Event.register(defines.events.on_tick,function(event)
|
Event.register(defines.events.on_tick,function(event)
|
||||||
|
if event.tick < 10 then return end
|
||||||
local threads = Server._threads()
|
local threads = Server._threads()
|
||||||
if #threads.tick > 0 then Server.run_tick_threads() end
|
if #threads.tick > 0 then Server.run_tick_threads() end
|
||||||
if #threads.timeout > 0 then Server.check_timeouts() end
|
if #threads.timeout > 0 then Server.check_timeouts() end
|
||||||
|
|||||||
Reference in New Issue
Block a user