From a5cf99e68640056cefcd056b9bce7630e933947c Mon Sep 17 00:00:00 2001 From: dafioram Date: Thu, 18 Jul 2019 03:48:06 -0400 Subject: BLADERUNNER: Improve variable name (#1752) Prevent confusion with function.--- engines/bladerunner/script/scene/ma06.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'engines') diff --git a/engines/bladerunner/script/scene/ma06.cpp b/engines/bladerunner/script/scene/ma06.cpp index 935d16238a..f067067a70 100644 --- a/engines/bladerunner/script/scene/ma06.cpp +++ b/engines/bladerunner/script/scene/ma06.cpp @@ -243,7 +243,7 @@ void SceneScriptMA06::activateElevator() { Game_Flag_Reset(kFlagMA06toMA01); Game_Flag_Reset(kFlagMA06ToMA02); Game_Flag_Reset(kFlagMA06toMA07); - int floor = 0; + while (true) { if (Game_Flag_Query(kFlagMA06ToMA02)) { break; @@ -257,12 +257,12 @@ void SceneScriptMA06::activateElevator() { Actor_Says(kActorAnsweringMachine, 80, kAnimationModeTalk); Player_Gains_Control(); - floor = Elevator_Activate(kElevatorMA); + int floorLevel = Elevator_Activate(kElevatorMA); #if BLADERUNNER_ORIGINAL_BUGS #else // Fix for a crash/ freeze bug; // To reproduce original issue: in Act 4, visit Rajiff, then exit to ground floor. Re-enter elevator and press Alt+F4 - if (floor < 0) { + if (floorLevel < 0) { break; } #endif // BLADERUNNER_ORIGINAL_BUGS @@ -270,9 +270,9 @@ void SceneScriptMA06::activateElevator() { Scene_Loop_Start_Special(kSceneLoopModeOnce, kMA06LoopMainLoop, true); - if (floor > 1) { + if (floorLevel > 1) { Game_Flag_Set(kFlagMA06toMA07); - } else if (floor == 1) { + } else if (floorLevel == 1) { if (Game_Flag_Query(kFlagSpinnerAtMA01)) { Game_Flag_Set(kFlagMA06toMA01); } else { @@ -280,7 +280,7 @@ void SceneScriptMA06::activateElevator() { Delay(500); Actor_Says(kActorAnsweringMachine, 610, 3); } - } else { // floor == 0 + } else { // floorLevel == 0 Actor_Says(kActorMcCoy, 2940, 18); if (Global_Variable_Query(kVariableChapter) == 4 && Game_Flag_Query(kFlagMA02RajifTalk) -- cgit v1.2.3