summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2021-03-09 20:30:37 +0100
committerGitHub <noreply@github.com>2021-03-09 20:30:37 +0100
commit47e11fa3f24d04bd52acd86cd00a2df880314ca0 (patch)
tree5cbff0bb140e43611854dde9c426ea1dde0c0491 /src
parent68e92d215a865f9e3420d0a6bfb8ccbc1241c63e (diff)
downloadopenttd-47e11fa3f24d04bd52acd86cd00a2df880314ca0.tar.xz
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.
Diffstat (limited to 'src')
-rw-r--r--src/openttd.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp
index 728228209..3397e4f0e 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -1484,7 +1484,6 @@ void GameLoop()
}
IncreaseSpriteLRU();
- InteractiveRandom();
/* Check for UDP stuff */
if (_network_available) NetworkBackgroundLoop();