[Scummvm-git-logs] scummvm master -> 9666bc355f6bb6d1525566df4d67d621238fcc07

antoniou79 a.antoniou79 at gmail.com
Fri Nov 27 10:10:56 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:
9666bc355f BLADERUNNER: Fix McCoy threatening Gordo by aiming his gun


Commit: 9666bc355f6bb6d1525566df4d67d621238fcc07
    https://github.com/scummvm/scummvm/commit/9666bc355f6bb6d1525566df4d67d621238fcc07
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2020-11-27T12:09:45+02:00

Commit Message:
BLADERUNNER: Fix McCoy threatening Gordo by aiming his gun

Also restore a line and slightly tweak behavior in dialogue for restored content

Changed paths:
    engines/bladerunner/script/ai/early_q.cpp
    engines/bladerunner/script/ai/gordo.cpp
    engines/bladerunner/script/ai/izo.cpp
    engines/bladerunner/script/ai/runciter.cpp
    engines/bladerunner/script/ai/steele.cpp
    engines/bladerunner/script/scene/hf06.cpp


diff --git a/engines/bladerunner/script/ai/early_q.cpp b/engines/bladerunner/script/ai/early_q.cpp
index fcc495a4be..0c09299918 100644
--- a/engines/bladerunner/script/ai/early_q.cpp
+++ b/engines/bladerunner/script/ai/early_q.cpp
@@ -340,7 +340,7 @@ bool AIScriptEarlyQ::GoalChanged(int currentGoalNumber, int newGoalNumber) {
 		break;
 
 	case kGoalEarlyQNR04McCoyPulledGun:
-		Player_Set_Combat_Mode(kActorSteele);
+		Player_Set_Combat_Mode(true);
 		Actor_Face_Actor(kActorEarlyQ, kActorMcCoy, true);
 		Actor_Face_Actor(kActorMcCoy, kActorEarlyQ, true);
 		Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeCombatIdle);
diff --git a/engines/bladerunner/script/ai/gordo.cpp b/engines/bladerunner/script/ai/gordo.cpp
index 5fbefc31c9..7a8c3e24cb 100644
--- a/engines/bladerunner/script/ai/gordo.cpp
+++ b/engines/bladerunner/script/ai/gordo.cpp
@@ -130,11 +130,30 @@ void AIScriptGordo::CompletedMovementTrack() {
 			Actor_Force_Stop_Walking(kActorMcCoy);
 			Player_Loses_Control();
 			Player_Set_Combat_Mode(true);
-			Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeCombatAim); // TODO: check this, it was set directly by calling actor script
+			// we need to set McCoy to Combat Aim via callChangeAnimationMode() (which is forced)
+			// Changing the animation to "combat aim" via Actor_Change_Animation_Mode() won't work here
+			// (probably because we just switched to combat mode and animation was just set to combat idle)
+			// Also note that changing the animation via Actor_Says does not work when in combat mode (at all)!
+			// callChangeAnimationMode() does not actually set the _animationMode member for the actor's AI
+			// it just changes the animation, so to return back to idle (while player has not control)
+			// we will call the callChangeAnimationMode() again.
+			// Note the calling the Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeCombatAim) won't work
+			//		and McCoy will still use the Combat Idle animation in that case
+			// see also: kGoalEarlyQNR04McCoyPulledGun for Early Q AI script
+			Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeCombatIdle);
+			_vm->_aiScripts->callChangeAnimationMode(kActorMcCoy, kAnimationModeCombatAim);
 			Actor_Face_Actor(kActorMcCoy, kActorGordo, true);
 			Actor_Face_Actor(kActorGordo, kActorMcCoy, true);
+			if (_vm->_cutContent) {
+				Actor_Says(kActorMcCoy, 460, kAnimationModeCombatAim);
+			}
 			Actor_Says(kActorGordo, 50, 13);
-			Actor_Says(kActorMcCoy, 465, kAnimationModeCombatAim);
+			if (_vm->_cutContent) {
+				_vm->_aiScripts->callChangeAnimationMode(kActorMcCoy, kAnimationModeCombatIdle);
+				Actor_Says(kActorMcCoy, 465, kAnimationModeCombatIdle);
+			} else {
+				Actor_Says(kActorMcCoy, 465, kAnimationModeCombatAim);
+			}
 			Actor_Says(kActorGordo, 60, 14);
 			Player_Set_Combat_Mode(false);
 			Player_Gains_Control();
diff --git a/engines/bladerunner/script/ai/izo.cpp b/engines/bladerunner/script/ai/izo.cpp
index 0125e012b7..89e8bc3b53 100644
--- a/engines/bladerunner/script/ai/izo.cpp
+++ b/engines/bladerunner/script/ai/izo.cpp
@@ -799,7 +799,7 @@ bool AIScriptIzo::UpdateAnimation(int *animation, int *frame) {
 		if (_animationFrame == 6) {
 			Scene_Loop_Set_Default(0); // // HC01 - MainLoop
 			Scene_Loop_Start_Special(kSceneLoopModeOnce, 2, true); // HC01 - IzoFlashLoop
-			Player_Set_Combat_Mode(kActorSteele);
+			Player_Set_Combat_Mode(true);
 		}
 		if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(311)) {
 			*animation = 297;
diff --git a/engines/bladerunner/script/ai/runciter.cpp b/engines/bladerunner/script/ai/runciter.cpp
index 77ea234882..2318b234c5 100644
--- a/engines/bladerunner/script/ai/runciter.cpp
+++ b/engines/bladerunner/script/ai/runciter.cpp
@@ -112,6 +112,8 @@ void AIScriptRunciter::OtherAgentEnteredCombatMode(int otherActorId, int combatM
 		Actor_Face_Actor(kActorRunciter, kActorMcCoy, true);
 		Actor_Says(kActorRunciter, 420, 12);
 		Actor_Face_Actor(kActorMcCoy, kActorRunciter, true);
+		// TODO revisit setting kActorMcCoy to Combat Aim via Actor_Change_Animation_Mode()
+		//      (see notes in Gordo AI script in his CompletedMovementTrack())
 		Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeCombatAim);
 		if (Actor_Clue_Query(kActorMcCoy, kClueZubensMotive)) {
 			Actor_Says(kActorMcCoy, 4770, -1);
diff --git a/engines/bladerunner/script/ai/steele.cpp b/engines/bladerunner/script/ai/steele.cpp
index 64c05f9fd4..a8e89a3d6c 100644
--- a/engines/bladerunner/script/ai/steele.cpp
+++ b/engines/bladerunner/script/ai/steele.cpp
@@ -283,7 +283,7 @@ void AIScriptSteele::CompletedMovementTrack() {
 
 	case kGoalSteeleApprehendIzo:
 		if (Actor_Query_Goal_Number(kActorSteele) == kGoalSteeleApprehendIzo) { //why is this here? double check?
-			Player_Set_Combat_Mode(kActorMcCoy);
+			Player_Set_Combat_Mode(false);
 
 			if (Actor_Query_Goal_Number(kActorIzo) != kGoalIzoDie) {
 				if (Actor_Query_In_Between_Two_Actors(kActorMcCoy, kActorSteele, kActorIzo)) {
@@ -314,7 +314,7 @@ void AIScriptSteele::CompletedMovementTrack() {
 		break;
 
 	case kGoalSteeleKP06Enter:
-		Player_Set_Combat_Mode(kActorMcCoy);
+		Player_Set_Combat_Mode(false);
 		Actor_Face_Actor(kActorMcCoy, kActorSteele, true);
 		Actor_Says(kActorMcCoy, 2265, 11);
 		Actor_Says(kActorSteele, 640, 58);
@@ -325,7 +325,7 @@ void AIScriptSteele::CompletedMovementTrack() {
 		Actor_Says(kActorSteele, 660, 60);
 		Actor_Says(kActorSteele, 670, 59);
 		Actor_Set_Goal_Number(kActorSteele, kGoalSteeleKP06Leave);
-		Player_Set_Combat_Mode(kActorSteele);
+		Player_Set_Combat_Mode(true);
 		Loop_Actor_Walk_To_XYZ(kActorMcCoy, -731.0f, 8.26f, -657.0f, 0, false, false, false);
 		Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
 		Ambient_Sounds_Remove_All_Looping_Sounds(1);
diff --git a/engines/bladerunner/script/scene/hf06.cpp b/engines/bladerunner/script/scene/hf06.cpp
index ffcc1b0f5f..4d8f8dacbd 100644
--- a/engines/bladerunner/script/scene/hf06.cpp
+++ b/engines/bladerunner/script/scene/hf06.cpp
@@ -282,6 +282,8 @@ void SceneScriptHF06::steelInterruption() {
 	Actor_Says(kActorSteele, 280, 58);
 	Actor_Face_Actor(kActorMcCoy, kActorSteele, true);
 	Player_Set_Combat_Mode(true);
+	// TODO revisit setting kActorMcCoy to Combat Aim via Actor_Change_Animation_Mode()
+	//      (see notes in Gordo AI script in his CompletedMovementTrack())
 	Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeCombatAim);
 	Actor_Change_Animation_Mode(kActorSteele, kAnimationModeCombatWalk);
 	Loop_Actor_Walk_To_XYZ(kActorSteele, 92.0f, 367.93f, 107.0f, 0, false, false, false);




More information about the Scummvm-git-logs mailing list