[Scummvm-git-logs] scummvm master -> 99c72c7b5cf651b83d300e9a8a0a481cfe9b00de
bonki
bonki at users.noreply.github.com
Fri Mar 23 13:48:15 CET 2018
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
39fd49e131 AVALANCHE: Remove unnecessary call to setSeed()
99c72c7b5c HUGO: Remove unnecessary call to setSeed()
Commit: 39fd49e131a962ae9c80b61b9beb40ce6c54eb50
https://github.com/scummvm/scummvm/commit/39fd49e131a962ae9c80b61b9beb40ce6c54eb50
Author: Adrian Frühwirth (bonki at users.noreply.github.com)
Date: 2018-03-23T12:48:11Z
Commit Message:
AVALANCHE: Remove unnecessary call to setSeed()
There is no need to initialize Common::RandomSource's seed with
_system->getTimeAndDate(time) as its constructor already initializes
it with g_system->getMillis().
Changed paths:
engines/avalanche/avalanche.cpp
diff --git a/engines/avalanche/avalanche.cpp b/engines/avalanche/avalanche.cpp
index 8726ef7..29fb082 100644
--- a/engines/avalanche/avalanche.cpp
+++ b/engines/avalanche/avalanche.cpp
@@ -39,9 +39,6 @@ AvalancheEngine::AvalancheEngine(OSystem *syst, const AvalancheGameDescription *
_console = new AvalancheConsole(this);
_rnd = new Common::RandomSource("avalanche");
- TimeDate time;
- _system->getTimeAndDate(time);
- _rnd->setSeed(time.tm_sec + time.tm_min + time.tm_hour);
_showDebugLines = false;
_clock = nullptr;
Commit: 99c72c7b5cf651b83d300e9a8a0a481cfe9b00de
https://github.com/scummvm/scummvm/commit/99c72c7b5cf651b83d300e9a8a0a481cfe9b00de
Author: Adrian Frühwirth (bonki at users.noreply.github.com)
Date: 2018-03-23T12:48:11Z
Commit Message:
HUGO: Remove unnecessary call to setSeed()
Initializing Common::RandomSource's seed with a fixed value will always
yield the same sequence of pseudo-random numbers which is probably not
desirable. Since the constructor takes care of initializing the seed
properly doing so manually is not needed.
Changed paths:
engines/hugo/hugo.cpp
diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp
index 5f6892b..ed82c04 100644
--- a/engines/hugo/hugo.cpp
+++ b/engines/hugo/hugo.cpp
@@ -638,7 +638,6 @@ void HugoEngine::initialize() {
calcMaxScore(); // Initialize maxscore
_rnd = new Common::RandomSource("hugo");
- _rnd->setSeed(42); // Kick random number generator
switch (_gameVariant) {
case kGameVariantH1Dos:
More information about the Scummvm-git-logs
mailing list