aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner
diff options
context:
space:
mode:
authorThanasis Antoniou2019-07-28 22:47:13 +0300
committerThanasis Antoniou2019-07-28 22:52:18 +0300
commit084dc1ffd6e3c4bcdaa3206088a763594b1dcb4c (patch)
tree1bf0cd13f35c33e1fea493c7a4d3f69f2cadb22d /engines/bladerunner
parent4ba487a064834a8fa1cca335981b24b4c96b5b12 (diff)
downloadscummvm-rg350-084dc1ffd6e3c4bcdaa3206088a763594b1dcb4c.tar.gz
scummvm-rg350-084dc1ffd6e3c4bcdaa3206088a763594b1dcb4c.tar.bz2
scummvm-rg350-084dc1ffd6e3c4bcdaa3206088a763594b1dcb4c.zip
BLADERUNNER: Prevent McCoy from running to BB10 before Sadik
Diffstat (limited to 'engines/bladerunner')
-rw-r--r--engines/bladerunner/game_constants.h2
-rw-r--r--engines/bladerunner/script/ai/sadik.cpp4
-rw-r--r--engines/bladerunner/script/scene/bb09.cpp27
3 files changed, 29 insertions, 4 deletions
diff --git a/engines/bladerunner/game_constants.h b/engines/bladerunner/game_constants.h
index 39d4c8bf84..18697a9b7f 100644
--- a/engines/bladerunner/game_constants.h
+++ b/engines/bladerunner/game_constants.h
@@ -2286,7 +2286,7 @@ enum GoalIzo {
};
enum GoalSadik {
- kGoalSadikDefaut = 100,
+ kGoalSadikDefault = 100,
kGoalSadikRunFromBB09 = 101,
kGoalSadikBB11Wait = 102,
kGoalSadikBB11ThrowMcCoy = 103,
diff --git a/engines/bladerunner/script/ai/sadik.cpp b/engines/bladerunner/script/ai/sadik.cpp
index a6de93a337..db6de36b7a 100644
--- a/engines/bladerunner/script/ai/sadik.cpp
+++ b/engines/bladerunner/script/ai/sadik.cpp
@@ -46,7 +46,7 @@ void AIScriptSadik::Initialize() {
Actor_Put_In_Set(kActorSadik, kSetFreeSlotA);
Actor_Set_At_Waypoint(kActorSadik, 33, 0);
- Actor_Set_Goal_Number(kActorSadik, kGoalSadikDefaut);
+ Actor_Set_Goal_Number(kActorSadik, kGoalSadikDefault);
}
bool AIScriptSadik::Update() {
@@ -264,7 +264,7 @@ int AIScriptSadik::GetFriendlinessModifierIfGetsClue(int otherActorId, int clueI
bool AIScriptSadik::GoalChanged(int currentGoalNumber, int newGoalNumber) {
switch (newGoalNumber) {
- case kGoalSadikDefaut:
+ case kGoalSadikDefault:
AI_Movement_Track_Flush(kActorSadik);
AI_Movement_Track_Append(kActorSadik, 33, 0);
AI_Movement_Track_Repeat(kActorSadik);
diff --git a/engines/bladerunner/script/scene/bb09.cpp b/engines/bladerunner/script/scene/bb09.cpp
index a39e8984ca..7e74fcabea 100644
--- a/engines/bladerunner/script/scene/bb09.cpp
+++ b/engines/bladerunner/script/scene/bb09.cpp
@@ -34,7 +34,21 @@ void SceneScriptBB09::InitializeScene() {
Setup_Scene_Information(107.45f, -9.14f, 166.0f, 244);
}
+#if BLADERUNNER_ORIGINAL_BUGS
Scene_Exit_Add_2D_Exit(0, 224, 213, 286, 353, 1);
+#else
+ // in the original McCoy could run ahead of Sadik to the next room
+ // if the player clicked quickly enough
+ // kFlagBB11SadikFight is set after Sadik exits this room in Chapter 2
+ // (and his goal is set to kGoalSadikBB11Wait)
+ // this flag will be reset before Act 3, when McCoy is ambushed at the BB roof
+ if ((Global_Variable_Query(kVariableChapter) == 2
+ && Game_Flag_Query(kFlagBB11SadikFight))
+ || (Global_Variable_Query(kVariableChapter) > 2)
+ ) {
+ Scene_Exit_Add_2D_Exit(0, 224, 213, 286, 353, 1);
+ }
+#endif // BLADERUNNER_ORIGINAL_BUGS
Scene_Exit_Add_2D_Exit(1, 75, 450, 480, 479, 2);
Ambient_Sounds_Add_Looping_Sound(kSfxCTRAIN1, 20, 100, 1);
@@ -56,7 +70,10 @@ void SceneScriptBB09::InitializeScene() {
Ambient_Sounds_Add_Sound(kSfxHAUNT1, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(kSfxHAUNT2, 5, 50, 17, 27, -100, 100, -101, -101, 0, 0);
- Actor_Set_Targetable(kActorSadik, true); // Don't kill Sadik yet, game cannot continue. This is an original bug - fixed in ScummVM in Sadik's AI script (method ShotAtAndHit() )
+ // Original: // Don't kill Sadik yet, game cannot continue.
+ // This is an original bug - fixed in ScummVM in Sadik's AI script (method ShotAtAndHit() )
+ // Also Sadik is also set as targetable (redundant) in his AI script (method Update() )
+ Actor_Set_Targetable(kActorSadik, true);
}
void SceneScriptBB09::SceneLoaded() {
@@ -114,6 +131,14 @@ void SceneScriptBB09::SceneFrameAdvanced(int frame) {
}
void SceneScriptBB09::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) {
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ // in the original McCoy could run ahead of Sadik to the next room
+ // if the player clicked quickly enough
+ if (actorId == kActorSadik && newGoal == kGoalSadikBB11Wait) {
+ Scene_Exit_Add_2D_Exit(0, 224, 213, 286, 353, 1);
+ }
+#endif // BLADERUNNER_ORIGINAL_BUGS
}
void SceneScriptBB09::PlayerWalkedIn() {