Skip to content

Commit

Permalink
Help prevent lag #472
Browse files Browse the repository at this point in the history
  • Loading branch information
SMUnlimited committed Dec 21, 2024
1 parent ddce396 commit 39a7a0e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Jobs/ARMY_TRACK.eai
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,9 @@ function UpdateTownThreat takes nothing returns nothing
endif
loop
exitwhen i >= town_num
//exitwhen i != lastFreeNum and ModuloInteger(i, 10) == 0 this would cause most threatened town to be negative during this calculation which would break other processes
if i > 0 and ModuloInteger(i, 10) == 0 then
call Sleep(0.01) // This can take along time, but this could cause most threatened town to be wrong in other processes, so sleep so at least no other jobs can use this yet
endif
call UpdateSpecificTownThreat(i)
set i = i + 1
endloop
Expand Down

0 comments on commit 39a7a0e

Please sign in to comment.