mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-15 16:58:01 +00:00
BLADERUNNER: Fix Hanoi throwing McCoy out
Addresses most of the issues in bug #11293 Does not address the "Hanoi is not facing McCoy when speaking to him" bullet, which only occurs on specific banter talk
This commit is contained in:
parent
186de62ffb
commit
0e4e3354bd
@ -219,7 +219,6 @@ void AIScriptDektora::ClickedByPlayer() {
|
||||
if (Actor_Query_Goal_Number(kActorDektora) == kGoalDektoraGone) {
|
||||
Actor_Face_Actor(0, kActorDektora, true);
|
||||
Actor_Says(kActorMcCoy, 8630, 12); // What a waste
|
||||
|
||||
return; //true;
|
||||
}
|
||||
|
||||
@ -232,9 +231,11 @@ void AIScriptDektora::ClickedByPlayer() {
|
||||
Game_Flag_Set(kFlagNR08TouchedDektora);
|
||||
AI_Movement_Track_Flush(kActorHanoi);
|
||||
Actor_Force_Stop_Walking(kActorMcCoy);
|
||||
#if BLADERUNNER_ORIGINAL_BUGS
|
||||
// this is a redundant call
|
||||
Player_Loses_Control();
|
||||
#endif
|
||||
Actor_Set_Goal_Number(kActorHanoi, kGoalHanoiThrowOutMcCoy);
|
||||
|
||||
return; //true;
|
||||
}
|
||||
|
||||
|
@ -185,7 +185,10 @@ void AIScriptHanoi::OtherAgentEnteredCombatMode(int otherActorId, int combatMode
|
||||
&& combatMode
|
||||
) {
|
||||
Player_Set_Combat_Mode(false);
|
||||
#if BLADERUNNER_ORIGINAL_BUGS
|
||||
// redundant call to lose control here
|
||||
Player_Loses_Control();
|
||||
#endif
|
||||
Actor_Set_Goal_Number(kActorHanoi, kGoalHanoiThrowOutMcCoy);
|
||||
return; //true;
|
||||
}
|
||||
@ -290,7 +293,14 @@ bool AIScriptHanoi::GoalChanged(int currentGoalNumber, int newGoalNumber) {
|
||||
case kGoalHanoiThrowOutMcCoy:
|
||||
Game_Flag_Set(kFlagNR03McCoyThrownOut);
|
||||
AI_Countdown_Timer_Reset(kActorHanoi, kActorTimerAIScriptCustomTask0);
|
||||
#if BLADERUNNER_ORIGINAL_BUGS
|
||||
Player_Loses_Control();
|
||||
#else
|
||||
// Lose control only if not already lost control (like in the case of Dektora's dressing room NR07 time-out)
|
||||
if (Player_Has_Control()) {
|
||||
Player_Loses_Control();
|
||||
}
|
||||
#endif
|
||||
Player_Set_Combat_Mode(false); // this is missing in ITA and ESP versions of the game
|
||||
Actor_Force_Stop_Walking(kActorMcCoy);
|
||||
Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeDie);
|
||||
|
@ -47,6 +47,7 @@ void SceneScriptNR01::InitializeScene() {
|
||||
} else if (Game_Flag_Query(kFlagNotUsed545)) {
|
||||
Setup_Scene_Information( -170.0f, 24.0f, -574.0f, 768);
|
||||
} else {
|
||||
// eg. when thrown out
|
||||
Setup_Scene_Information( 76.0f, 23.88f, -109.0f, 966);
|
||||
}
|
||||
|
||||
@ -88,8 +89,8 @@ void SceneScriptNR01::InitializeScene() {
|
||||
&& !Game_Flag_Query(kFlagArrivedFromSpinner1)
|
||||
) {
|
||||
if ((!Game_Flag_Query(kFlagNR01VisitedFirstTimeWithSpinner) && Global_Variable_Query(kVariableChapter) == 3)
|
||||
|| Random_Query(1, 3) == 1)
|
||||
{
|
||||
|| Random_Query(1, 3) == 1
|
||||
) {
|
||||
// enhancement: don't always play after first visit
|
||||
Scene_Loop_Start_Special(kSceneLoopModeLoseControl, kNR01LoopInshot, false);
|
||||
}
|
||||
@ -330,7 +331,13 @@ void SceneScriptNR01::PlayerWalkedIn() {
|
||||
Game_Flag_Reset(kFlagNR08TouchedDektora);
|
||||
}
|
||||
Game_Flag_Reset(kFlagNR03McCoyThrownOut);
|
||||
#if BLADERUNNER_ORIGINAL_BUGS
|
||||
// This is an extra call Player_Gains_Control() (McCoy should gain control by his AI script - goal kGoalMcCoyNR01GetUp)
|
||||
// or when he's drugged the goal kGoalMcCoyNR01LayDrugged ensures gaining control
|
||||
// It causes buggy behavior since it enables control, and by clicking fast the player can skip McCoy's AI script handling
|
||||
// of his goal change to kGoalMcCoyNR01ThrownOut, and he can stay invisible, and also spawn at the bottom right of the scene
|
||||
Player_Gains_Control();
|
||||
#endif
|
||||
//return true;
|
||||
return;
|
||||
}
|
||||
|
@ -157,18 +157,31 @@ bool SceneScriptNR03::ClickedOnExit(int exitId) {
|
||||
AI_Movement_Track_Pause(kActorHanoi);
|
||||
Actor_Face_Actor(kActorHanoi, kActorMcCoy, true);
|
||||
Actor_Face_Actor(kActorMcCoy, kActorHanoi, true);
|
||||
int warnings = Global_Variable_Query(kVariableHanoiNR04Warnings);
|
||||
if (warnings == 0) {
|
||||
switch (Global_Variable_Query(kVariableHanoiNR04Warnings)) {
|
||||
case 0:
|
||||
Actor_Says(kActorHanoi, 50, 13);
|
||||
AI_Movement_Track_Unpause(kActorHanoi);
|
||||
} else if (warnings == 1) {
|
||||
break;
|
||||
case 1:
|
||||
Actor_Says(kActorHanoi, 210, 15);
|
||||
AI_Movement_Track_Unpause(kActorHanoi);
|
||||
} else if (warnings == 2) {
|
||||
break;
|
||||
case 2:
|
||||
// fall through
|
||||
default:
|
||||
#if !BLADERUNNER_ORIGINAL_BUGS
|
||||
// Needed delay, otherwise McCoy's animation of being thrown out won't play
|
||||
Delay(150);
|
||||
#endif
|
||||
Actor_Set_Goal_Number(kActorHanoi, kGoalHanoiThrowOutMcCoy);
|
||||
break;
|
||||
}
|
||||
// game bug? after reentering this does nothing as variable is never reset or checked for > 2
|
||||
Global_Variable_Increment(kVariableHanoiNR04Warnings, 1);
|
||||
#if !BLADERUNNER_ORIGINAL_BUGS
|
||||
if (Global_Variable_Query(kVariableHanoiNR04Warnings) > 2) {
|
||||
Global_Variable_Set(kVariableHanoiNR04Warnings, 1);
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
|
||||
Ambient_Sounds_Remove_All_Looping_Sounds(1);
|
||||
@ -191,23 +204,31 @@ bool SceneScriptNR03::ClickedOnExit(int exitId) {
|
||||
Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeIdle);
|
||||
AI_Movement_Track_Pause(kActorHanoi);
|
||||
Actor_Face_Actor(kActorHanoi, kActorMcCoy, true);
|
||||
|
||||
int warnings = Global_Variable_Query(kVariableHanoiNR05Warnings);
|
||||
if (warnings == 0) {
|
||||
switch (Global_Variable_Query(kVariableHanoiNR05Warnings)) {
|
||||
case 0:
|
||||
Actor_Says(kActorHanoi, 0, 15);
|
||||
Actor_Face_Actor(kActorMcCoy, kActorHanoi, true);
|
||||
Actor_Says(kActorMcCoy, 3335, 13);
|
||||
Actor_Says(kActorHanoi, 10, 16);
|
||||
AI_Movement_Track_Unpause(kActorHanoi);
|
||||
} else if (warnings == 1) {
|
||||
break;
|
||||
case 1:
|
||||
Actor_Face_Actor(kActorMcCoy, kActorHanoi, true);
|
||||
Actor_Says(kActorHanoi, 210, 12);
|
||||
AI_Movement_Track_Unpause(kActorHanoi);
|
||||
} else if (warnings == 2) {
|
||||
break;
|
||||
case 2:
|
||||
// fall through
|
||||
default:
|
||||
Actor_Set_Goal_Number(kActorHanoi, kGoalHanoiThrowOutMcCoy);
|
||||
break;
|
||||
}
|
||||
// game bug? after reentering this does nothing as variable is never reset or checked for > 2
|
||||
Global_Variable_Increment(kVariableHanoiNR05Warnings, 1);
|
||||
#if !BLADERUNNER_ORIGINAL_BUGS
|
||||
if (Global_Variable_Query(kVariableHanoiNR05Warnings) > 2) {
|
||||
Global_Variable_Set(kVariableHanoiNR05Warnings, 1);
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
Player_Loses_Control();
|
||||
Player_Set_Combat_Mode(false);
|
||||
@ -287,9 +308,7 @@ void SceneScriptNR03::SceneFrameAdvanced(int frame) {
|
||||
Sound_Play(kSfxMAGMOVE2, 62, -70, -70, 50);
|
||||
}
|
||||
|
||||
if (frame > 70
|
||||
&& frame < 110
|
||||
) {
|
||||
if (frame > 70 && frame < 110) {
|
||||
rotateActorOnTable(frame);
|
||||
} else if (frame == 110) {
|
||||
if (Actor_Query_Goal_Number(kActorGuzza) == kGoalGuzzaSitAtNR03) {
|
||||
@ -320,6 +339,8 @@ void SceneScriptNR03::PlayerWalkedIn() {
|
||||
Game_Flag_Reset(kFlagNR01toNR03);
|
||||
}
|
||||
|
||||
// This seems redundant since we set the combat mode to false at start of WalkedIn() method
|
||||
// Probably a last minute original behavior fix to be more user friendly (not being tossed off the bar immediately upon entering)
|
||||
if (Player_Query_Combat_Mode()) {
|
||||
Actor_Set_Goal_Number(kActorHanoi, kGoalHanoiThrowOutMcCoy);
|
||||
}
|
||||
|
@ -189,13 +189,9 @@ void SceneScriptNR05::SceneFrameAdvanced(int frame) {
|
||||
}
|
||||
}
|
||||
|
||||
if (frame > 77
|
||||
&& frame <= 134
|
||||
) {
|
||||
if (frame > 77 && frame <= 134) {
|
||||
rotateActorOnTable(frame - 13);
|
||||
if ( frame == 134
|
||||
&& !Game_Flag_Query(kFlagNR05toNR03)
|
||||
) {
|
||||
if ( frame == 134 && !Game_Flag_Query(kFlagNR05toNR03)) {
|
||||
Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyNRxxSitAtTable);
|
||||
}
|
||||
//return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user