mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 15:41:15 +00:00
Codechange: only run InteractiveRandom() from the draw-thread (#8831)
Otherwise both the draw-thread and game-thread can do it both at the same time, which gives rather unwanted side-effects. Calling it from the draw-thread alone is sufficient, as we just want to create some unpredictable randomness for the player. The draw-thread is a lot more active (normally) than the game-thread, so it is the best place of the two to do this. Additionally, InteractiveRandom() mostly has to do with visuals that are client-side-only, so more related to drawing than to game.
This commit is contained in:
parent
68e92d215a
commit
47e11fa3f2
@ -1484,7 +1484,6 @@ void GameLoop()
|
||||
}
|
||||
|
||||
IncreaseSpriteLRU();
|
||||
InteractiveRandom();
|
||||
|
||||
/* Check for UDP stuff */
|
||||
if (_network_available) NetworkBackgroundLoop();
|
||||
|
Loading…
Reference in New Issue
Block a user