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.
pull/238/head
Patric Stout 3 years ago committed by GitHub
parent 68e92d215a
commit 47e11fa3f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1484,7 +1484,6 @@ void GameLoop()
}
IncreaseSpriteLRU();
InteractiveRandom();
/* Check for UDP stuff */
if (_network_available) NetworkBackgroundLoop();

Loading…
Cancel
Save