forked from VoxeLibre/VoxeLibre
Prevent server lag from compounding itself
This commit is contained in:
parent
d8a7c4a189
commit
38d510d1e7
|
@ -1134,6 +1134,9 @@ if mobs_spawn then
|
|||
while timer > WAIT_FOR_SPAWN_ATTEMPT do
|
||||
initialize_spawn_data()
|
||||
timer = timer - WAIT_FOR_SPAWN_ATTEMPT
|
||||
if timer > WAIT_FOR_SPAWN_ATTEMPT * 20 then
|
||||
timer = 0
|
||||
end
|
||||
|
||||
local players = get_connected_players()
|
||||
local total_mobs, total_non_hostile, total_hostile = count_mobs_total_cap()
|
||||
|
|
Loading…
Reference in New Issue