diff options
author | Peter Kohaut | 2019-03-12 23:36:30 +0100 |
---|---|---|
committer | Peter Kohaut | 2019-03-12 23:44:43 +0100 |
commit | 5c0340318f8f283e568e2763cc64d032fef41219 (patch) | |
tree | 901162f8cf47b63faa4f1fbbe7fad876be9d126e /engines/bladerunner | |
parent | 3a47c9f84e16056af8db1ee2548207f43173517e (diff) | |
download | scummvm-rg350-5c0340318f8f283e568e2763cc64d032fef41219.tar.gz scummvm-rg350-5c0340318f8f283e568e2763cc64d032fef41219.tar.bz2 scummvm-rg350-5c0340318f8f283e568e2763cc64d032fef41219.zip |
BLADERUNNER: Fixed inability to drugged McCoy up again
Actors are not updated faster than 60 times per second.
Diffstat (limited to 'engines/bladerunner')
-rw-r--r-- | engines/bladerunner/bladerunner.cpp | 13 | ||||
-rw-r--r-- | engines/bladerunner/bladerunner.h | 1 |
2 files changed, 13 insertions, 1 deletions
diff --git a/engines/bladerunner/bladerunner.cpp b/engines/bladerunner/bladerunner.cpp index 32880e5f1d..36292d0a07 100644 --- a/engines/bladerunner/bladerunner.cpp +++ b/engines/bladerunner/bladerunner.cpp @@ -212,7 +212,8 @@ BladeRunnerEngine::BladeRunnerEngine(OSystem *syst, const ADGameDescription *des _debugger = nullptr; walkingReset(); - _actorUpdateCounter = 0; + _actorUpdateCounter = 0; + _actorUpdateTimeLast = 0; } BladeRunnerEngine::~BladeRunnerEngine() { @@ -978,6 +979,16 @@ void BladeRunnerEngine::gameTick() { } void BladeRunnerEngine::actorsUpdate() { +#if BLADERUNNER_ORIGINAL_BUGS +#else + int timeNow = _time->current(); + // Don't update actors more than 60 times per second + if (timeNow - _actorUpdateTimeLast < 1000 / 60) { + return; + } + _actorUpdateTimeLast = timeNow; +#endif // BLADERUNNER_ORIGINAL_BUGS + int actorCount = (int)_gameInfo->getActorCount(); int setId = _scene->getSetId(); diff --git a/engines/bladerunner/bladerunner.h b/engines/bladerunner/bladerunner.h index e5d3adc671..438b34ee07 100644 --- a/engines/bladerunner/bladerunner.h +++ b/engines/bladerunner/bladerunner.h @@ -226,6 +226,7 @@ public: bool _isInsideScriptActor; int _actorUpdateCounter; + int _actorUpdateTimeLast; private: MIXArchive _archives[kArchiveCount]; |