[Scummvm-git-logs] scummvm master -> 22ee236643b919967d0fc47059249633e1be2d55

antoniou79 a.antoniou79 at gmail.com
Sun May 10 21:55:30 UTC 2020


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:
22ee236643 BLADERUNNER: Ignore first event in gameTick() when launching game


Commit: 22ee236643b919967d0fc47059249633e1be2d55
    https://github.com/scummvm/scummvm/commit/22ee236643b919967d0fc47059249633e1be2d55
Author: Thanasis Antoniou (a.antoniou79 at gmail.com)
Date: 2020-05-11T00:53:11+03:00

Commit Message:
BLADERUNNER: Ignore first event in gameTick() when launching game

This prevents a "hack" that was discovered by players to boot into KIA directly even when no saved games exist

We will provide in a future commit, the option to start into KIA even upon launching the game without any saved games, but that should be properly implemented to prevent bugs/ side-effects (that the current "hack" causes).

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


diff --git a/engines/bladerunner/bladerunner.cpp b/engines/bladerunner/bladerunner.cpp
index 9afec45b0c..95ab959ce6 100644
--- a/engines/bladerunner/bladerunner.cpp
+++ b/engines/bladerunner/bladerunner.cpp
@@ -101,8 +101,9 @@ BladeRunnerEngine::BladeRunnerEngine(OSystem *syst, const ADGameDescription *des
 
 	DebugMan.addDebugChannel(kDebugScript, "Script", "Debug the scripts");
 
-	_windowIsActive = true;
-	_gameIsRunning  = true;
+	_windowIsActive     = true;
+	_gameIsRunning      = true;
+	_gameJustLaunched   = true;
 
 	_vqaIsPlaying       = false;
 	_vqaStopIsRequested = false;
@@ -360,8 +361,9 @@ Common::Error BladeRunnerEngine::run() {
 	// so that the game won't exit abruptly after end credits
 	do {
 		// additional code for gracefully handling end-game after _endCredits->show()
-		_gameOver = false;
-		_gameIsRunning = true;
+		_gameOver         = false;
+		_gameIsRunning    = true;
+		_gameJustLaunched = true;
 		// reset ammo amounts
 		_settings->reset();
 		// need to clear kFlagKIAPrivacyAddon to remove Bob's Privacy Addon for KIA
@@ -1237,6 +1239,11 @@ void BladeRunnerEngine::handleEvents() {
 		return;
 	}
 
+	if (_gameJustLaunched) {
+		_gameJustLaunched = false;
+		return;
+	}
+
 	Common::Event event;
 	Common::EventManager *eventMan = _system->getEventManager();
 	while (eventMan->pollEvent(event)) {
diff --git a/engines/bladerunner/bladerunner.h b/engines/bladerunner/bladerunner.h
index 13b765a6d9..2a2560a169 100644
--- a/engines/bladerunner/bladerunner.h
+++ b/engines/bladerunner/bladerunner.h
@@ -207,6 +207,7 @@ public:
 	bool _actorIsSpeaking;
 	bool _actorSpeakStopIsRequested;
 	bool _gameOver;
+	bool _gameJustLaunched;
 	int  _gameAutoSaveTextId;
 	bool _gameIsAutoSaving;
 	bool _gameIsLoading;




More information about the Scummvm-git-logs mailing list