[Scummvm-git-logs] scummvm master -> 67f8c6dc0463f0d2087f1d514efae994258512f3

antoniou79 noreply at scummvm.org
Fri Nov 14 20:00:28 UTC 2025


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

Summary:
67f8c6dc04 BLADERUNNER: Fix clickedOnActor() to return proper bool result


Commit: 67f8c6dc0463f0d2087f1d514efae994258512f3
    https://github.com/scummvm/scummvm/commit/67f8c6dc0463f0d2087f1d514efae994258512f3
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2025-11-14T21:52:57+02:00

Commit Message:
BLADERUNNER: Fix clickedOnActor() to return proper bool result

This fixes a ScummVM bug (not an original bug)

This was causing the Actor AI clickedByPlayer() script to be executed after the scene specific clickedOnActor() script even if the  clickedOnActor() handled the click
and therefore the clickedByPlayer should be skipped (according to logic in BladeRunnerEngine::handleMouseClickActor()).

An instance of this bug can be observed when talking to Guzza in Act 2 in his office (PS04), when McCoy will add a "hey" (and maybe a short response from Guzza will follow) after completing a dialogue item with Guzza, as per Guzza's AI AIScriptGuzza::ClickedByPlayer().

This also fixes other scene script methods that return a boolean (ClickedOn2DRegion(), ClickedOnExit(), ClickedOnItem()) but for those methods the return value is not used (currently) by the engine.

Changed paths:
    engines/bladerunner/script/scene_script.cpp


diff --git a/engines/bladerunner/script/scene_script.cpp b/engines/bladerunner/script/scene_script.cpp
index 6beda71e579..a85e3330fed 100644
--- a/engines/bladerunner/script/scene_script.cpp
+++ b/engines/bladerunner/script/scene_script.cpp
@@ -219,7 +219,7 @@ bool SceneScript::clickedOnActor(int actorId) {
 	++_inScriptCounter;
 	bool result = false;
 	if (_currentScript != nullptr) {
-		_currentScript->ClickedOnActor(actorId);
+		result = _currentScript->ClickedOnActor(actorId);
 	}
 	_vm->_runningActorId = -1;
 	--_inScriptCounter;
@@ -241,7 +241,7 @@ bool SceneScript::clickedOnItem(int itemId, bool combatMode) {
 	++_inScriptCounter;
 	bool result = false;
 	if (_currentScript != nullptr) {
-		_currentScript->ClickedOnItem(itemId, combatMode);
+		result = _currentScript->ClickedOnItem(itemId, combatMode);
 	}
 	_vm->_runningActorId = -1;
 	--_inScriptCounter;
@@ -256,7 +256,7 @@ bool SceneScript::clickedOnExit(int exitId) {
 	++_inScriptCounter;
 	bool result = false;
 	if (_currentScript != nullptr) {
-		_currentScript->ClickedOnExit(exitId);
+		result = _currentScript->ClickedOnExit(exitId);
 	}
 	_vm->_runningActorId = -1;
 	--_inScriptCounter;
@@ -271,7 +271,7 @@ bool SceneScript::clickedOn2DRegion(int region) {
 	++_inScriptCounter;
 	bool result = false;
 	if (_currentScript != nullptr) {
-		 _currentScript->ClickedOn2DRegion(region);
+		result = _currentScript->ClickedOn2DRegion(region);
 	 }
 	_vm->_runningActorId = -1;
 	--_inScriptCounter;




More information about the Scummvm-git-logs mailing list