Skip to content

Commit

Permalink
Fix throttling of danger function. It was only supposed to do work every
Browse files Browse the repository at this point in the history
GAME_TICKS_FOR_DANGER ticks, but last call time was never saved. Patch by NoQ.
Closes ticket:4212
  • Loading branch information
perim committed Sep 23, 2014
1 parent 67df2f2 commit 9827d7a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/map.cpp
Expand Up @@ -1807,6 +1807,7 @@ static int dangerThreadFunc(WZ_DECL_UNUSED void *data)
while (lastDangerPlayer != -1)
{
dangerFloodFill(lastDangerPlayer); // Do the actual work
lastDangerUpdate = gameTime;
wzSemaphorePost(dangerDoneSemaphore); // Signal that we are done
wzSemaphoreWait(dangerSemaphore); // Go to sleep until needed.
}
Expand Down

0 comments on commit 9827d7a

Please sign in to comment.