From 084dc1ffd6e3c4bcdaa3206088a763594b1dcb4c Mon Sep 17 00:00:00 2001 From: Thanasis Antoniou Date: Sun, 28 Jul 2019 22:47:13 +0300 Subject: BLADERUNNER: Prevent McCoy from running to BB10 before Sadik --- engines/bladerunner/script/scene/bb09.cpp | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'engines/bladerunner/script/scene/bb09.cpp') 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() { -- cgit v1.2.3