[Scummvm-git-logs] scummvm master -> 5c0340318f8f283e568e2763cc64d032fef41219

peterkohaut peterkohaut at users.noreply.github.com
Tue Mar 12 23:45:06 CET 2019


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
5c0340318f BLADERUNNER: Fixed inability to drugged McCoy up again


Commit: 5c0340318f8f283e568e2763cc64d032fef41219
    https://github.com/scummvm/scummvm/commit/5c0340318f8f283e568e2763cc64d032fef41219
Author: Peter Kohaut (peter.kohaut at gmail.com)
Date: 2019-03-12T23:44:43+01:00

Commit Message:
BLADERUNNER: Fixed inability to drugged McCoy up again

Actors are not updated faster than 60 times per second.

Changed paths:
    engines/bladerunner/bladerunner.cpp
    engines/bladerunner/bladerunner.h


diff --git a/engines/bladerunner/bladerunner.cpp b/engines/bladerunner/bladerunner.cpp
index 32880e5..36292d0 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 e5d3adc..438b34e 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];





More information about the Scummvm-git-logs mailing list