From bd75898894e0f65663b1bc93c73d4ce0c7a91482 Mon Sep 17 00:00:00 2001 From: Thanasis Antoniou Date: Fri, 28 Jun 2019 15:22:07 +0300 Subject: BLADERUNNER: Pause NPC walkers for Gaff scene in CT12 --- engines/bladerunner/game_constants.h | 2 +- engines/bladerunner/script/scene/ct12.cpp | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/engines/bladerunner/game_constants.h b/engines/bladerunner/game_constants.h index 4e607d325b..28eb244d53 100644 --- a/engines/bladerunner/game_constants.h +++ b/engines/bladerunner/game_constants.h @@ -1197,7 +1197,7 @@ enum Variables { kVariableGenericWalkerAModel = 32, kVariableGenericWalkerBModel = 33, kVariableGenericWalkerCModel = 34, - kVariableGenericWalkerConfig = 35, // Re-purposed in restored cut content version - original: has no real use + kVariableGenericWalkerConfig = 35, // Re-purposed in ScummVM version - original: has no real use kVariableBB10ShelvesAvailable = 36, kVariableWalkLoopActor = 37, kVariableWalkLoopRun = 38, diff --git a/engines/bladerunner/script/scene/ct12.cpp b/engines/bladerunner/script/scene/ct12.cpp index 6074714092..4a47348cf2 100644 --- a/engines/bladerunner/script/scene/ct12.cpp +++ b/engines/bladerunner/script/scene/ct12.cpp @@ -271,6 +271,13 @@ void SceneScriptCT12::PlayerWalkedIn() { && !Game_Flag_Query(kFlagGaffApproachedMcCoyAboutZuben) && Actor_Query_Goal_Number(kActorGaff) == kGoalGaffCT12WaitForMcCoy ) { +#if !BLADERUNNER_ORIGINAL_BUGS + // Disable NPC walkers until Gaff goes to his spinner + Actor_Set_Goal_Number(kActorGenwalkerA, kGoalGenwalkerDefault); + Actor_Set_Goal_Number(kActorGenwalkerB, kGoalGenwalkerDefault); + Actor_Set_Goal_Number(kActorGenwalkerC, kGoalGenwalkerDefault); + Global_Variable_Set(kVariableGenericWalkerConfig, -1); +#endif // !BLADERUNNER_ORIGINAL_BUGS Player_Loses_Control(); Loop_Actor_Walk_To_Actor(kActorGaff, kActorMcCoy, 48, false, false); Actor_Face_Actor(kActorGaff, kActorMcCoy, true); @@ -308,6 +315,18 @@ void SceneScriptCT12::PlayerWalkedIn() { Actor_Clue_Acquire(kActorGaff, kClueMcCoyLetZubenEscape, true, -1); } +#if !BLADERUNNER_ORIGINAL_BUGS + // unpause generic walkers here, less chance to collide with Gaff + // while he walks to his spinner + // This happens when Gaff starts walking towards his spinner rather than + // when he's reached his spinner, in order to keep this NPC code in one place + // and because the walkers won't have time to interfere with his path even if + // they're enabled early. + if (Global_Variable_Query(kVariableGenericWalkerConfig) < 0 + ) { + Global_Variable_Set(kVariableGenericWalkerConfig, 2); + } +#endif Actor_Set_Goal_Number(kActorGaff, kGoalGaffCT12GoToSpinner); } -- cgit v1.2.3