aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner
diff options
context:
space:
mode:
authorThanasis Antoniou2019-07-25 14:59:05 +0300
committerThanasis Antoniou2019-07-25 14:59:05 +0300
commit031c4f6221990f0cd84367731dd745730f0f0503 (patch)
tree7c7ee4cd206d636ec42edaec39d98dce9aefa38c /engines/bladerunner
parent58498cf5f21375c3ab89a8486175ff8de087bdf7 (diff)
downloadscummvm-rg350-031c4f6221990f0cd84367731dd745730f0f0503.tar.gz
scummvm-rg350-031c4f6221990f0cd84367731dd745730f0f0503.tar.bz2
scummvm-rg350-031c4f6221990f0cd84367731dd745730f0f0503.zip
BLADERUNNER: Fix repeat of Izo apprehending and possible freeze
Diffstat (limited to 'engines/bladerunner')
-rw-r--r--engines/bladerunner/script/ai/izo.cpp38
-rw-r--r--engines/bladerunner/script/scene/rc03.cpp17
2 files changed, 55 insertions, 0 deletions
diff --git a/engines/bladerunner/script/ai/izo.cpp b/engines/bladerunner/script/ai/izo.cpp
index 2861e76554..27876366b9 100644
--- a/engines/bladerunner/script/ai/izo.cpp
+++ b/engines/bladerunner/script/ai/izo.cpp
@@ -109,8 +109,28 @@ void AIScriptIzo::CompletedMovementTrack() {
// fall through
case kGoalIzoRC03Run:
Actor_Set_Goal_Number(kActorIzo, kGoalIzoRC03RunAway);
+#if BLADERUNNER_ORIGINAL_BUGS
Actor_Set_Goal_Number(kActorSteele, kGoalSteeleApprehendIzo);
+ // causes unwanted repetition of the apprehend
+ // also may cause a freeze if McCoy exits the scene
Scene_Exits_Enable();
+#else
+ // prevent re-apprehending of Izo
+ if (Actor_Query_Goal_Number(kActorIzo) != kGoalIzoGetArrested
+ && Actor_Query_Goal_Number(kActorIzo) != kGoalIzoGotArrested
+ && Actor_Query_Goal_Number(kActorIzo) != kGoalIzoDie
+ && Actor_Query_Goal_Number(kActorIzo) != kGoalIzoDieHidden
+ && Actor_Query_Goal_Number(kActorIzo) != kGoalIzoEscape
+ && Actor_Query_Goal_Number(kActorSteele) != kGoalSteeleApprehendIzo
+ && Actor_Query_Goal_Number(kActorSteele) != kGoalSteeleArrestIzo
+ && Actor_Query_Goal_Number(kActorSteele) != kGoalSteeleIzoBlockedByMcCoy
+ && Actor_Query_Goal_Number(kActorSteele) != kGoalSteeleShootIzo
+ && Actor_Query_Goal_Number(kActorSteele) != kGoalSteeleLeaveRC03
+ && Actor_Query_Goal_Number(kActorSteele) != kGoalSteeleGoToPoliceStation
+ ) {
+ Actor_Set_Goal_Number(kActorSteele, kGoalSteeleApprehendIzo);
+ }
+#endif // BLADERUNNER_ORIGINAL_BUGS
return; //true;
case kGoalIzoRC03RunAway:
@@ -172,7 +192,25 @@ void AIScriptIzo::ClickedByPlayer() {
Actor_Says(kActorMcCoy, 2715, 14);
Actor_Set_Goal_Number(kActorIzo, kGoalIzoRC03Run);
Actor_Says(kActorMcCoy, 1800, 14);
+#if BLADERUNNER_ORIGINAL_BUGS
Actor_Set_Goal_Number(kActorSteele, kGoalSteeleApprehendIzo);
+#else
+ // prevent re-apprehending of Izo
+ if (Actor_Query_Goal_Number(kActorIzo) != kGoalIzoGetArrested
+ && Actor_Query_Goal_Number(kActorIzo) != kGoalIzoGotArrested
+ && Actor_Query_Goal_Number(kActorIzo) != kGoalIzoDie
+ && Actor_Query_Goal_Number(kActorIzo) != kGoalIzoDieHidden
+ && Actor_Query_Goal_Number(kActorIzo) != kGoalIzoEscape
+ && Actor_Query_Goal_Number(kActorSteele) != kGoalSteeleApprehendIzo
+ && Actor_Query_Goal_Number(kActorSteele) != kGoalSteeleArrestIzo
+ && Actor_Query_Goal_Number(kActorSteele) != kGoalSteeleIzoBlockedByMcCoy
+ && Actor_Query_Goal_Number(kActorSteele) != kGoalSteeleShootIzo
+ && Actor_Query_Goal_Number(kActorSteele) != kGoalSteeleLeaveRC03
+ && Actor_Query_Goal_Number(kActorSteele) != kGoalSteeleGoToPoliceStation
+ ) {
+ Actor_Set_Goal_Number(kActorSteele, kGoalSteeleApprehendIzo);
+ }
+#endif // BLADERUNNER_ORIGINAL_BUGS
return; //true;
}
diff --git a/engines/bladerunner/script/scene/rc03.cpp b/engines/bladerunner/script/scene/rc03.cpp
index b9a022567d..17837cabb6 100644
--- a/engines/bladerunner/script/scene/rc03.cpp
+++ b/engines/bladerunner/script/scene/rc03.cpp
@@ -315,7 +315,21 @@ void SceneScriptRC03::PlayerWalkedIn() {
Actor_Says_With_Pause(kActorIzo, 640, 0, -1);
Actor_Says_With_Pause(kActorIzo, 650, 0, -1);
if (Game_Flag_Query(kFlagIzoIsReplicant) ) {
+#if BLADERUNNER_ORIGINAL_BUGS
Actor_Set_Goal_Number(kActorSteele, kGoalSteeleApprehendIzo);
+#else
+ // prevent re-apprehending of Izo
+ if (Actor_Query_Goal_Number(kActorIzo) != kGoalIzoDie
+ && Actor_Query_Goal_Number(kActorIzo) != kGoalIzoDieHidden
+ && Actor_Query_Goal_Number(kActorIzo) != kGoalIzoEscape
+ && Actor_Query_Goal_Number(kActorSteele) != kGoalSteeleShootIzo
+ && Actor_Query_Goal_Number(kActorSteele) != kGoalSteeleIzoBlockedByMcCoy
+ && Actor_Query_Goal_Number(kActorSteele) != kGoalSteeleLeaveRC03
+ && Actor_Query_Goal_Number(kActorSteele) != kGoalSteeleGoToPoliceStation
+ ) {
+ Actor_Set_Goal_Number(kActorSteele, kGoalSteeleApprehendIzo);
+ }
+#endif // BLADERUNNER_ORIGINAL_BUGS
}
Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeDodge);
Loop_Actor_Walk_To_XYZ(kActorIzo, 180.0f, -4.0f, 184.0f, 0, false, false, false);
@@ -324,10 +338,13 @@ void SceneScriptRC03::PlayerWalkedIn() {
#if BLADERUNNER_ORIGINAL_BUGS
Actor_Set_Goal_Number(kActorSteele, kGoalSteeleApprehendIzo);
#else
+ // prevent re-apprehending of Izo
if (Actor_Query_Goal_Number(kActorIzo) != kGoalIzoGetArrested
&& Actor_Query_Goal_Number(kActorIzo) != kGoalIzoGotArrested
+ && Actor_Query_Goal_Number(kActorIzo) != kGoalIzoEscape
&& Actor_Query_Goal_Number(kActorSteele) != kGoalSteeleApprehendIzo
&& Actor_Query_Goal_Number(kActorSteele) != kGoalSteeleArrestIzo
+ && Actor_Query_Goal_Number(kActorSteele) != kGoalSteeleIzoBlockedByMcCoy
&& Actor_Query_Goal_Number(kActorSteele) != kGoalSteeleLeaveRC03
&& Actor_Query_Goal_Number(kActorSteele) != kGoalSteeleGoToPoliceStation
) {