aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/bladerunner/bladerunner.cpp13
-rw-r--r--engines/bladerunner/bladerunner.h1
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];