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:
Patric Stout 2021-03-09 20:30:37 +01:00 committed by GitHub
parent 68e92d215a
commit 47e11fa3f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 1 deletions

View File

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