diff options
author | Peter Kohaut | 2019-02-02 12:35:26 +0100 |
---|---|---|
committer | Peter Kohaut | 2019-02-03 00:14:09 +0100 |
commit | 1df1eefc3e9584516fec7d7b4f09f5216f84de00 (patch) | |
tree | f8b1f498a93b484434e1a56ba4ce889a8c8e0022 /engines | |
parent | 5e5eb39197b8bc2fbba55ff01ecdd456c04ab97c (diff) | |
download | scummvm-rg350-1df1eefc3e9584516fec7d7b4f09f5216f84de00.tar.gz scummvm-rg350-1df1eefc3e9584516fec7d7b4f09f5216f84de00.tar.bz2 scummvm-rg350-1df1eefc3e9584516fec7d7b4f09f5216f84de00.zip |
BLADERUNNER: Fixed Rat interaction at UG15
Diffstat (limited to 'engines')
-rw-r--r-- | engines/bladerunner/bladerunner.cpp | 29 | ||||
-rw-r--r-- | engines/bladerunner/game_constants.h | 35 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/free_slot_a.cpp | 210 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/mccoy.cpp | 87 | ||||
-rw-r--r-- | engines/bladerunner/script/ai_script.h | 13 | ||||
-rw-r--r-- | engines/bladerunner/script/kia_script.cpp | 2 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/dr06.cpp | 6 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/nr02.cpp | 6 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/nr11.cpp | 6 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ug05.cpp | 4 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ug15.cpp | 43 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ug16.cpp | 6 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ug18.cpp | 6 | ||||
-rw-r--r-- | engines/bladerunner/script/scene_script.h | 2 |
14 files changed, 252 insertions, 203 deletions
diff --git a/engines/bladerunner/bladerunner.cpp b/engines/bladerunner/bladerunner.cpp index 9b0ffaff16..4768ca5e28 100644 --- a/engines/bladerunner/bladerunner.cpp +++ b/engines/bladerunner/bladerunner.cpp @@ -982,19 +982,26 @@ void BladeRunnerEngine::actorsUpdate() { int actorCount = (int)_gameInfo->getActorCount(); int setId = _scene->getSetId(); - if (setId != kSetUG18 || _gameVars[kVariableChapter] != 4 || !_gameFlags->query(670) || !_aiScripts->isInsideScript()) { - for (int i = 0; i < actorCount; i++) { - Actor *actor = _actors[i]; - if (actor->getSetId() == setId || i == _actorUpdateCounter) { - _aiScripts->update(i); - actor->timersUpdate(); - } - } - ++_actorUpdateCounter; - if (_actorUpdateCounter >= actorCount) { - _actorUpdateCounter = 0; + // what a "nice" last minute fix... + if ( setId == kSetUG18 + && _gameVars[kVariableChapter] == 4 + && _gameFlags->query(kFlagCallWithGuzza) + && _aiScripts->isInsideScript() + ) { + return; + } + + for (int i = 0; i < actorCount; i++) { + Actor *actor = _actors[i]; + if (actor->getSetId() == setId || i == _actorUpdateCounter) { + _aiScripts->update(i); + actor->timersUpdate(); } } + ++_actorUpdateCounter; + if (_actorUpdateCounter >= actorCount) { + _actorUpdateCounter = 0; + } } void BladeRunnerEngine::walkingReset() { diff --git a/engines/bladerunner/game_constants.h b/engines/bladerunner/game_constants.h index 7aabef9c05..70d0923bd4 100644 --- a/engines/bladerunner/game_constants.h +++ b/engines/bladerunner/game_constants.h @@ -90,7 +90,7 @@ enum Actors { kActorNewscaster = 61, kActorLeon = 62, kActorMaleAnnouncer = 63, - kActorFreeSlotA = 64, + kActorFreeSlotA = 64, // Rat kActorFreeSlotB = 65, kActorMaggie = 66, kActorGenwalkerA = 67, @@ -1010,6 +1010,7 @@ enum Flags { kFlagUG07Empty = 623, kFlagTB07TyrellMeeting = 625, kFlagNR01McCoyIsDrugged = 627, + kFlagRatWalkingAround = 631, kFlagNR01DektoraFall = 632, kFlagNR11DektoraBurning = 633, kFlagNR11BurnedUp = 634, @@ -1035,11 +1036,15 @@ enum Flags { kFlagDNARowAvailableTalk = 660, kFlagTB07ShadeDown = 661, // is never set kFlagUG19Available = 665, + kFlagCallWithGuzza = 670, kFlagMA07toPS14 = 672, kFlagPS14toMA07 = 673, + kFlagUG15RatShot = 676, + kFlagUG15BridgeWillBreak = 677, kFlagChapter2Intro = 678, kFlagChapter3Intro = 679, kFlagChapter4Intro = 680, + kFlagUG15BridgeBroken = 682, kFlagNotUsed686 = 686, kFlagPS05TV0 = 688, kFlagPS05TV1 = 689, @@ -1065,6 +1070,7 @@ enum Flags { kFlagCT02McCoyCombatReady = 720, kFlagChapter4Starting = 722, kFlagZubenBountyPaid = 723, + kFlagUG15BridgeBreaks = 724, kFlagCT11DogWrapperAvailable = 725, kFlagAR02Entered = 726, kFlagPS04WeaponsOrderForm = 727, @@ -1106,8 +1112,8 @@ enum Variables { kVariableAffectionTowards = 45, // 0 none, 1 steele, 2 dektora, 3 lucy kVariableGunPulledInFrontOfSebastian = 46, kVariableNR01GetUpCounter = 47, - kVariableDNAEvidences = 48, - + kVariableDNAEvidence = 48, + kVariableCorruptedGuzzaEvidence = 49, kVariableTaffyLewisMusic = 50, kVariableReplicants = 51, kVariableNextTvNews = 52, @@ -1629,9 +1635,13 @@ enum GoalMcCoy { kGoalMcCoyNR01LayDrugged = 212, kGoalMcCoyNR04Drink = 220, kGoalMcCoyNR04PassOut = 221, - + kGoalMcCoyNR11Shoot = 230, kGoalMcCoyNR10Fall = 231, - kGoalMcCoyArrested = 500 + kGoalMcCoyCallWithGuzza = 350, + kGoalMcCoyUG15Fall = 390, + kGoalMcCoyUG15Die = 391, + kGoalMcCoyArrested = 500, + kGoalMcCoyGone = 599 }; enum GoalSteele { @@ -2017,6 +2027,21 @@ enum GoalLeon { kGoalLeonGone = 8 }; +enum GoalFreeSlotA { // Rat + kGoalFreeSlotAUG15Wait = 300, + kGoalFreeSlotAUG15WalkOut = 301, + kGoalFreeSlotAUG15RunToOtherSide = 302, + kGoalFreeSlotAUG15RunBack = 303, + kGoalFreeSlotAUG15Attack = 304, + kGoalFreeSlotAWalkAround = 306, + kGoalFreeSlotAWalkAroundRestart = 307, + kGoalFreeSlotAAttackMcCoy = 308, + kGoalFreeSlotAUG15Die = 305, + kGoalFreeSlotAUG15Fall = 309, + kGoalFreeSlotAUG15Prepare = 310, + kGoalFreeSlotAGone = 599 +}; + } // End of namespace BladeRunner #endif diff --git a/engines/bladerunner/script/ai/free_slot_a.cpp b/engines/bladerunner/script/ai/free_slot_a.cpp index 6c3e9e2c80..f31fbaa550 100644 --- a/engines/bladerunner/script/ai/free_slot_a.cpp +++ b/engines/bladerunner/script/ai/free_slot_a.cpp @@ -27,9 +27,9 @@ namespace BladeRunner { AIScriptFreeSlotA::AIScriptFreeSlotA(BladeRunnerEngine *vm) : AIScriptBase(vm) { _var1 = 0; _var2 = 1; - _var3 = 0.0f; - _var4 = 0.0f; // not initialized in original - _var5 = 0.0f; // not initialized in original + _fallSpeed = 0.0f; + _fallHeightCurrent = 0.0f; // not initialized in original + _fallHeightTarget = 0.0f; // not initialized in original } void AIScriptFreeSlotA::Initialize() { @@ -40,9 +40,9 @@ void AIScriptFreeSlotA::Initialize() { _var1 = 0; _var2 = 1; - _var3 = 0.0f; - _var4 = 0.0f; // not initialized in original - _var5 = 0.0f; // not initialized in original + _fallSpeed = 0.0f; + _fallHeightCurrent = 0.0f; // not initialized in original + _fallHeightTarget = 0.0f; // not initialized in original World_Waypoint_Set(525, 45, -780.0f, -615.49f, 2611.0f); World_Waypoint_Set(526, 45, -780.0f, -615.49f, 2759.0f); @@ -51,68 +51,73 @@ void AIScriptFreeSlotA::Initialize() { bool AIScriptFreeSlotA::Update() { switch (Global_Variable_Query(kVariableChapter)) { case 4: - if (Actor_Query_Which_Set_In(kActorMcCoy) == kSceneUG02 - && Actor_Query_Which_Set_In(kActorFreeSlotA) == kSceneUG02 + if (Actor_Query_Which_Set_In(kActorMcCoy) == kSetUG15 + && Actor_Query_Which_Set_In(kActorFreeSlotA) == kSetUG15 ) { int goal = Actor_Query_Goal_Number(kActorFreeSlotA); - if ((goal == 302 - || goal == 303 + if ((goal == kGoalFreeSlotAUG15RunToOtherSide + || goal == kGoalFreeSlotAUG15RunBack ) && Actor_Query_Inch_Distance_From_Actor(kActorFreeSlotA, kActorMcCoy) <= 48 ) { - Actor_Set_Goal_Number(kActorFreeSlotA, 304); - } else if (goal == 309) { + Actor_Set_Goal_Number(kActorFreeSlotA, kGoalFreeSlotAUG15Attack); + } else if (goal == kGoalFreeSlotAUG15Fall) { float x, y, z; Actor_Query_XYZ(kActorMcCoy, &x, &y, &z); - _var4 += _var3; - if (_var5 < _var4) { - _var3 -= 0.2f; + _fallHeightCurrent += _fallSpeed; + if (_fallHeightTarget < _fallHeightCurrent) { + _fallSpeed -= 0.2f; } else { - _var4 = _var5; + _fallHeightCurrent = _fallHeightTarget; Actor_Set_Goal_Number(kActorFreeSlotA, 0); } - Actor_Set_At_XYZ(kActorFreeSlotA, x, _var4, z, Actor_Query_Facing_1024(kActorFreeSlotA)); + Actor_Set_At_XYZ(kActorFreeSlotA, x, _fallHeightCurrent, z, Actor_Query_Facing_1024(kActorFreeSlotA)); } - } else { - switch (Actor_Query_Goal_Number(kActorFreeSlotA)) { - case 306: - if (Actor_Query_Which_Set_In(kActorFreeSlotA) == Player_Query_Current_Set() - && Actor_Query_Inch_Distance_From_Actor(kActorFreeSlotA, kActorMcCoy) <= 48 - ) { - Actor_Set_Goal_Number(kActorFreeSlotA, 308); - } - break; - case 308: - if (Actor_Query_Which_Set_In(kActorFreeSlotA) != Player_Query_Current_Set()) { - Actor_Set_Goal_Number(kActorFreeSlotA, 306); - } - break; + return true; + } - case 599: - if (Actor_Query_Which_Set_In(kActorFreeSlotA) != Player_Query_Current_Set()) { - Game_Flag_Reset(631); - Game_Flag_Reset(677); - Actor_Set_Goal_Number(kActorFreeSlotA, 0); - } - break; + switch (Actor_Query_Goal_Number(kActorFreeSlotA)) { + case kGoalFreeSlotAWalkAround: + if (Actor_Query_Which_Set_In(kActorFreeSlotA) == Player_Query_Current_Set() + && Actor_Query_Inch_Distance_From_Actor(kActorFreeSlotA, kActorMcCoy) <= 48 + ) { + Actor_Set_Goal_Number(kActorFreeSlotA, kGoalFreeSlotAAttackMcCoy); + } + break; - default: - if (!Game_Flag_Query(631)) { - Game_Flag_Set(631); - Actor_Set_Goal_Number(kActorFreeSlotA, 306); - Actor_Set_Targetable(kActorFreeSlotA, 1); - } + case kGoalFreeSlotAAttackMcCoy: + if (Actor_Query_Which_Set_In(kActorFreeSlotA) != Player_Query_Current_Set()) { + Actor_Set_Goal_Number(kActorFreeSlotA, kGoalFreeSlotAWalkAround); + } + break; + + case kGoalFreeSlotAGone: + if (Actor_Query_Which_Set_In(kActorFreeSlotA) != Player_Query_Current_Set()) { + Game_Flag_Reset(kFlagRatWalkingAround); + Game_Flag_Reset(kFlagUG15BridgeWillBreak); + Actor_Set_Goal_Number(kActorFreeSlotA, false); + } + break; + + default: + if (!Game_Flag_Query(kFlagRatWalkingAround)) { + Game_Flag_Set(kFlagRatWalkingAround); + Actor_Set_Goal_Number(kActorFreeSlotA, kGoalFreeSlotAWalkAround); + Actor_Set_Targetable(kActorFreeSlotA, true); } } + return true; case 5: if (Actor_Query_Goal_Number(kActorFreeSlotA) < 400) { AI_Movement_Track_Flush(kActorFreeSlotA); Actor_Set_Goal_Number(kActorFreeSlotA, 400); - } else if (Actor_Query_Goal_Number(kActorFreeSlotA) == 405 && Actor_Query_Which_Set_In(kActorMcCoy) == kSceneKP05) { + } else if (Actor_Query_Goal_Number(kActorFreeSlotA) == 405 + && Actor_Query_Which_Set_In(kActorMcCoy) == kSceneKP05 + ) { Actor_Set_Targetable(kActorFreeSlotA, 1); Actor_Set_Goal_Number(kActorFreeSlotA, 406); } @@ -129,24 +134,24 @@ void AIScriptFreeSlotA::TimerExpired(int timer) { void AIScriptFreeSlotA::CompletedMovementTrack() { switch (Actor_Query_Goal_Number(kActorFreeSlotA)) { - case 301: - Actor_Set_Goal_Number(kActorFreeSlotA, 302); + case kGoalFreeSlotAUG15WalkOut: + Actor_Set_Goal_Number(kActorFreeSlotA, kGoalFreeSlotAUG15RunToOtherSide); break; - case 302: - Actor_Set_Goal_Number(kActorFreeSlotA, 303); + case kGoalFreeSlotAUG15RunToOtherSide: + Actor_Set_Goal_Number(kActorFreeSlotA, kGoalFreeSlotAUG15RunBack); break; - case 303: - Actor_Set_Goal_Number(kActorFreeSlotA, 300); + case kGoalFreeSlotAUG15RunBack: + Actor_Set_Goal_Number(kActorFreeSlotA, kGoalFreeSlotAUG15Wait); break; - case 306: - Actor_Set_Goal_Number(kActorFreeSlotA, 307); + case kGoalFreeSlotAWalkAround: + Actor_Set_Goal_Number(kActorFreeSlotA, kGoalFreeSlotAWalkAroundRestart); break; - case 307: - Actor_Set_Goal_Number(kActorFreeSlotA, 306); + case kGoalFreeSlotAWalkAroundRestart: + Actor_Set_Goal_Number(kActorFreeSlotA, kGoalFreeSlotAWalkAround); break; case 400: @@ -169,16 +174,15 @@ void AIScriptFreeSlotA::ReceivedClue(int clueId, int fromActorId) { } void AIScriptFreeSlotA::ClickedByPlayer() { - if (Actor_Query_Goal_Number(kActorFreeSlotA) != 599) { - return; //false; - } - - Actor_Face_Actor(kActorMcCoy, kActorFreeSlotA, 1); - if (Random_Query(1, 2) == 1) { - Actor_Says(kActorMcCoy, 8655, 16); - } else { - Actor_Says(kActorMcCoy, 8665, 16); + if (Actor_Query_Goal_Number(kActorFreeSlotA) == kGoalFreeSlotAGone) { + Actor_Face_Actor(kActorMcCoy, kActorFreeSlotA, true); + if (Random_Query(1, 2) == 1) { + Actor_Says(kActorMcCoy, 8655, 16); + } else { + Actor_Says(kActorMcCoy, 8665, 16); + } } + //return false; } void AIScriptFreeSlotA::EnteredScene(int sceneId) { @@ -205,7 +209,7 @@ void AIScriptFreeSlotA::ShotAtAndMissed() { bool AIScriptFreeSlotA::ShotAtAndHit() { if (Actor_Query_In_Set(kActorFreeSlotA, kSetUG15)) { calcHit(); - Actor_Set_Goal_Number(kActorFreeSlotA, 305); + Actor_Set_Goal_Number(kActorFreeSlotA, kGoalFreeSlotAUG15Die); return true; } @@ -213,7 +217,7 @@ bool AIScriptFreeSlotA::ShotAtAndHit() { } void AIScriptFreeSlotA::Retired(int byActorId) { - Actor_Set_Goal_Number(kActorFreeSlotA, 599); + Actor_Set_Goal_Number(kActorFreeSlotA, kGoalFreeSlotAGone); } int AIScriptFreeSlotA::GetFriendlinessModifierIfGetsClue(int otherActorId, int clueId) { @@ -222,13 +226,13 @@ int AIScriptFreeSlotA::GetFriendlinessModifierIfGetsClue(int otherActorId, int c bool AIScriptFreeSlotA::GoalChanged(int currentGoalNumber, int newGoalNumber) { switch (newGoalNumber) { - case 300: + case kGoalFreeSlotAUG15Wait: AI_Movement_Track_Flush(kActorFreeSlotA); - Actor_Change_Animation_Mode(kActorFreeSlotA, 0); - Actor_Set_Targetable(kActorFreeSlotA, 0); + Actor_Change_Animation_Mode(kActorFreeSlotA, kAnimationModeIdle); + Actor_Set_Targetable(kActorFreeSlotA, false); break; - case 301: + case kGoalFreeSlotAUG15WalkOut: Actor_Force_Stop_Walking(kActorMcCoy); AI_Movement_Track_Flush(kActorFreeSlotA); World_Waypoint_Set(444, 87, -48.75f, 44.66f, 87.57f); @@ -236,72 +240,74 @@ bool AIScriptFreeSlotA::GoalChanged(int currentGoalNumber, int newGoalNumber) { AI_Movement_Track_Repeat(kActorFreeSlotA); break; - case 302: + case kGoalFreeSlotAUG15RunToOtherSide: AI_Movement_Track_Flush(kActorFreeSlotA); World_Waypoint_Set(444, 87, -237.0f, 48.07f, 208.0f); AI_Movement_Track_Append(kActorFreeSlotA, 444, 1); AI_Movement_Track_Repeat(kActorFreeSlotA); - Actor_Set_Targetable(kActorFreeSlotA, 1); + Actor_Set_Targetable(kActorFreeSlotA, true); break; - case 303: + case kGoalFreeSlotAUG15RunBack: AI_Movement_Track_Flush(kActorFreeSlotA); World_Waypoint_Set(444, 87, 3.52f, 52.28f, 90.68f); AI_Movement_Track_Append(kActorFreeSlotA, 444, 0); AI_Movement_Track_Repeat(kActorFreeSlotA); break; - case 304: + case kGoalFreeSlotAUG15Attack: Player_Loses_Control(); Actor_Force_Stop_Walking(kActorMcCoy); AI_Movement_Track_Flush(kActorFreeSlotA); - Actor_Face_Actor(kActorFreeSlotA, kActorMcCoy, 1); - Actor_Change_Animation_Mode(kActorFreeSlotA, 6); - Actor_Change_Animation_Mode(kActorMcCoy, 48); + Actor_Face_Actor(kActorFreeSlotA, kActorMcCoy, true); + Actor_Change_Animation_Mode(kActorFreeSlotA, kAnimationModeCombatAttack); + Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeDie); break; - case 305: + case kGoalFreeSlotAUG15Die: AI_Movement_Track_Flush(kActorFreeSlotA); - Actor_Set_Targetable(kActorFreeSlotA, 0); - Game_Flag_Set(676); + Actor_Set_Targetable(kActorFreeSlotA, false); + Game_Flag_Set(kFlagUG15RatShot); _animationState = 7; _animationFrame = 0; break; - case 306: + case kGoalFreeSlotAWalkAround: AI_Movement_Track_Flush(kActorFreeSlotA); - processGoal306(); + goToRandomUGxx(); AI_Movement_Track_Repeat(kActorFreeSlotA); break; - case 307: + case kGoalFreeSlotAWalkAroundRestart: AI_Movement_Track_Flush(kActorFreeSlotA); AI_Movement_Track_Append(kActorFreeSlotA, 39, 1); AI_Movement_Track_Repeat(kActorFreeSlotA); break; - case 308: - Actor_Set_Targetable(kActorFreeSlotA, 1); + case kGoalFreeSlotAAttackMcCoy: + Actor_Set_Targetable(kActorFreeSlotA, true); Non_Player_Actor_Combat_Mode_On(kActorFreeSlotA, 0, 0, 0, 8, 4, 7, 8, 25, 0, 75, 5, 300, 0); break; - case 309: + case kGoalFreeSlotAUG15Fall: Actor_Force_Stop_Walking(kActorFreeSlotA); AI_Movement_Track_Flush(kActorFreeSlotA); - _var4 = 52.46f; - _var3 = -4.0f; - _var5 = -10.0f; - if (_animationState != 7 && _animationState != 8) { + _fallHeightCurrent = 52.46f; + _fallSpeed = -4.0f; + _fallHeightTarget = -10.0f; + if (_animationState != 7 + && _animationState != 8 + ) { _animationState = 7; _animationFrame = 0; } break; - case 310: + case kGoalFreeSlotAUG15Prepare: AI_Movement_Track_Flush(kActorFreeSlotA); Actor_Put_In_Set(kActorFreeSlotA, kSetUG15); Actor_Set_At_XYZ(kActorFreeSlotA, 3.52f, 52.28f, 90.68f, 700); - Actor_Set_Goal_Number(kActorFreeSlotA, 300); + Actor_Set_Goal_Number(kActorFreeSlotA, kGoalFreeSlotAUG15Wait); break; case 400: @@ -315,7 +321,7 @@ bool AIScriptFreeSlotA::GoalChanged(int currentGoalNumber, int newGoalNumber) { AI_Movement_Track_Repeat(kActorFreeSlotA); break; - case 599: + case kGoalFreeSlotAGone: Actor_Set_Health(kActorFreeSlotA, 20, 20); Actor_Set_Friendliness_To_Other(kActorFreeSlotA, kActorMcCoy, 40); break; @@ -395,7 +401,7 @@ bool AIScriptFreeSlotA::UpdateAnimation(int *animation, int *frame) { if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(857)) { _animationState = 0; _animationFrame = 0; - Actor_Change_Animation_Mode(kActorFreeSlotA, 4); + Actor_Change_Animation_Mode(kActorFreeSlotA, kAnimationModeCombatIdle); } break; @@ -403,7 +409,7 @@ bool AIScriptFreeSlotA::UpdateAnimation(int *animation, int *frame) { *animation = 874; _animationFrame++; if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(874) - 1) { // bug? shuld not be '-1' - Actor_Change_Animation_Mode(kActorFreeSlotA, 0); + Actor_Change_Animation_Mode(kActorFreeSlotA, kAnimationModeIdle); } break; @@ -416,7 +422,7 @@ bool AIScriptFreeSlotA::UpdateAnimation(int *animation, int *frame) { if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(860)) { _animationFrame = 0; _animationState = 0; - Actor_Change_Animation_Mode(kActorFreeSlotA, 0); + Actor_Change_Animation_Mode(kActorFreeSlotA, kAnimationModeIdle); } break; @@ -429,7 +435,7 @@ bool AIScriptFreeSlotA::UpdateAnimation(int *animation, int *frame) { if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(859) - 1) { // bug? shuld not be '-1' _animationFrame = Slice_Animation_Query_Number_Of_Frames(859) - 1; _animationState = 8; - Actor_Set_Goal_Number(kActorFreeSlotA, 599); + Actor_Set_Goal_Number(kActorFreeSlotA, kGoalFreeSlotAGone); } break; @@ -523,7 +529,7 @@ bool AIScriptFreeSlotA::ReachedMovementTrackWaypoint(int waypointId) { Actor_Change_Animation_Mode(kActorFreeSlotA, 43); } } else if (Actor_Query_Goal_Number(kActorFreeSlotA) == 302) { - Actor_Face_Actor(kActorFreeSlotA, kActorMcCoy, 1); + Actor_Face_Actor(kActorFreeSlotA, kActorMcCoy, true); } return true; @@ -538,12 +544,14 @@ void AIScriptFreeSlotA::calcHit() { Actor_Query_XYZ(kActorFreeSlotA, &x, &y, &z); - if (x >= -30.0f && x < -150.0f) { - Game_Flag_Set(677); + if (x >= -30.0f + && x < -150.0f + ) { + Game_Flag_Set(kFlagUG15BridgeWillBreak); } } -void AIScriptFreeSlotA::processGoal306() { +void AIScriptFreeSlotA::goToRandomUGxx() { switch (Random_Query(1, 14)) { case 1: AI_Movement_Track_Append(kActorFreeSlotA, 450, 1); diff --git a/engines/bladerunner/script/ai/mccoy.cpp b/engines/bladerunner/script/ai/mccoy.cpp index 7edb6393ee..d5fb581cf5 100644 --- a/engines/bladerunner/script/ai/mccoy.cpp +++ b/engines/bladerunner/script/ai/mccoy.cpp @@ -33,7 +33,7 @@ AIScriptMcCoy::AIScriptMcCoy(BladeRunnerEngine *vm) : AIScriptBase(vm) { dword_45A0E8 = 0; _animationStateNextSpecial = 0; _animationNextSpecial = 0; - dword_45A0F8 = 0; + _nextSoundId = 0; _NR10SteeleShooting = false; _fallSpeed = 0.0f; _fallHeightCurrent = 0.0f; @@ -51,16 +51,16 @@ void AIScriptMcCoy::Initialize() { dword_45A0E8 = 3; _animationStateNextSpecial = 3; _animationNextSpecial = 20; - dword_45A0F8 = -1; + _nextSoundId = -1; _NR10SteeleShooting = false; _fallSpeed = 0; Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyDefault); } bool AIScriptMcCoy::Update() { - if (dword_45A0F8 != -1) { - Sound_Play(dword_45A0F8, 100, 0, 0, 50); - dword_45A0F8 = -1; + if (_nextSoundId != -1) { + Sound_Play(_nextSoundId, 100, 0, 0, 50); + _nextSoundId = -1; } switch (Actor_Query_Goal_Number(kActorMcCoy)) { @@ -109,13 +109,13 @@ bool AIScriptMcCoy::Update() { fallDown(); break; - case 309: + case kGoalMcCoyUG15Fall: fallDown(); break; - case 391: - Actor_Retired_Here(kActorMcCoy, 12, 48, 1, -1); - Actor_Set_Goal_Number(kActorMcCoy, 599); + case kGoalMcCoyUG15Die: + Actor_Retired_Here(kActorMcCoy, 12, 48, true, -1); + Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyGone); break; } return false; @@ -163,21 +163,21 @@ void AIScriptMcCoy::ReceivedClue(int clueId, int fromActorId) { case kClueWeaponsOrderForm: case kClueShippingForm: case kCluePoliceIssueWeapons: - Global_Variable_Increment(49, 1); + Global_Variable_Increment(kVariableCorruptedGuzzaEvidence, 1); break; case kClueFolder: - Global_Variable_Increment(49, 5); + Global_Variable_Increment(kVariableCorruptedGuzzaEvidence, 5); break; case kClueHomelessManKid: case kClueOriginalRequisitionForm: - Global_Variable_Increment(49, 3); + Global_Variable_Increment(kVariableCorruptedGuzzaEvidence, 3); break; case kClueScaryChair: case kClueIzosStashRaided: - Global_Variable_Increment(49, 2); + Global_Variable_Increment(kVariableCorruptedGuzzaEvidence, 2); break; case kClueDNATyrell: @@ -186,11 +186,11 @@ void AIScriptMcCoy::ReceivedClue(int clueId, int fromActorId) { case kClueDNAMoraji: case kClueDNALutherLance: case kClueDNAMarcus: - Global_Variable_Increment(kVariableDNAEvidences, 1); + Global_Variable_Increment(kVariableDNAEvidence, 1); break; } - if ( Global_Variable_Query(49) > 6 + if ( Global_Variable_Query(kVariableCorruptedGuzzaEvidence) > 6 && Global_Variable_Query(kVariableChapter) > 3 && !Actor_Clue_Query(kActorMcCoy, kClueGuzzaFramedMcCoy) ) { @@ -328,7 +328,8 @@ bool AIScriptMcCoy::GoalChanged(int currentGoalNumber, int newGoalNumber) { return true; case 2: - sub_405920(); + _animationFrame = 0; + _animationState = 47; return true; case kGoalMcCoyBB11GetUp: @@ -391,7 +392,7 @@ bool AIScriptMcCoy::GoalChanged(int currentGoalNumber, int newGoalNumber) { Actor_Change_Animation_Mode(kActorMcCoy, 75); return true; - case 230: + case kGoalMcCoyNR11Shoot: _NR10SteeleShooting = Actor_Query_Goal_Number(kActorSteele) == kGoalSteeleNR11Shoot; Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeCombatAttack); return true; @@ -427,7 +428,7 @@ bool AIScriptMcCoy::GoalChanged(int currentGoalNumber, int newGoalNumber) { _animationFrame = 0; return true; - case 350: + case kGoalMcCoyCallWithGuzza: Sound_Play(123, 50, 0, 0, 50); Delay(1000); Sound_Play(403, 30, 0, 0, 50); @@ -465,13 +466,15 @@ bool AIScriptMcCoy::GoalChanged(int currentGoalNumber, int newGoalNumber) { Sound_Play(123, 50, 0, 0, 50); return true; - case 390: + case kGoalMcCoyUG15Fall: Actor_Force_Stop_Walking(kActorMcCoy); Player_Loses_Control(); _fallHeightCurrent = 48.07f; _fallSpeed = -4.0f; _fallHeightTarget = -20.0f; - if (_animationState != 27 && _animationState != 50) { + if (_animationState != 27 + && _animationState != 50 + ) { _animationState = 50; _animationFrame = Slice_Animation_Query_Number_Of_Frames(18) - 1; } @@ -1004,7 +1007,7 @@ bool AIScriptMcCoy::UpdateAnimation(int *animation, int *frame) { if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(5)) { _animationFrame = Slice_Animation_Query_Number_Of_Frames(*animation) - 1; _animationState = 50; - sub_4054F0(); + UG15fall(); } break; case 27: @@ -1013,7 +1016,7 @@ bool AIScriptMcCoy::UpdateAnimation(int *animation, int *frame) { if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(18)) { _animationFrame = Slice_Animation_Query_Number_Of_Frames(*animation) - 1; _animationState = 50; - sub_4054F0(); + UG15fall(); if (Actor_Query_Goal_Number(kActorMcCoy) == kGoalMcCoyNR04Drink) { Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyNR04PassOut); } @@ -1068,16 +1071,16 @@ bool AIScriptMcCoy::UpdateAnimation(int *animation, int *frame) { *animation = 12; _animationFrame++; if (_animationFrame == 1 - && Actor_Query_Goal_Number(kActorMcCoy) == 230 + && Actor_Query_Goal_Number(kActorMcCoy) == kGoalMcCoyNR11Shoot && _NR10SteeleShooting ) { - dword_45A0F8 = 27; + _nextSoundId = 27; } if (_animationFrame >= Slice_Animation_Query_Number_Of_Frames(12)) { _animationState = 17; _animationFrame = 0; *animation = 12; - if (Actor_Query_Goal_Number(kActorMcCoy) == 230) { + if (Actor_Query_Goal_Number(kActorMcCoy) == kGoalMcCoyNR11Shoot) { _animationFrame = 0; _animationState = 21; _NR10SteeleShooting = true; @@ -1790,24 +1793,29 @@ void AIScriptMcCoy::fallDown() { return Actor_Set_At_XYZ(kActorMcCoy, x, _fallHeightCurrent, z, Actor_Query_Facing_1024(kActorMcCoy)); } -void AIScriptMcCoy::sub_4054F0() { - if (Actor_Query_Which_Set_In(kActorMcCoy) == kSetUG15 - && Actor_Query_Goal_Number(kActorMcCoy) != 390 - && !Game_Flag_Query(682) +void AIScriptMcCoy::UG15fall() { + if ( Actor_Query_Which_Set_In(kActorMcCoy) == kSetUG15 + && Actor_Query_Goal_Number(kActorMcCoy) != kGoalMcCoyUG15Fall + && !Game_Flag_Query(kFlagUG15BridgeBroken) ) { float x, y, z; Actor_Query_XYZ(kActorMcCoy, &x, &y, &z); - if ((z < 220.0f) && (-210.0f < x) && (-70.0f > x)) { - Game_Flag_Set(682); - Scene_Loop_Set_Default(3); - Scene_Loop_Start_Special(kSceneLoopModeOnce, 2, true); - Actor_Set_Goal_Number(kActorMcCoy, 390); + if ( 220.0f > z + && -210.0f < x + && -70.0f > x + ) { + Game_Flag_Set(kFlagUG15BridgeBroken); + Scene_Loop_Set_Default(3); // kUG15LoopMainLoopBridgeBroken + Scene_Loop_Start_Special(kSceneLoopModeOnce, 2, true); // kUG15LoopBridgeBreaks + Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyUG15Fall); Actor_Query_XYZ(kActorFreeSlotA, &x, &y, &z); - if (-200.0 < x && -62.0f > x) { - Actor_Set_Goal_Number(kActorFreeSlotA, 309); + if (-200.0 < x + && -62.0f > x + ) { + Actor_Set_Goal_Number(kActorFreeSlotA, kGoalFreeSlotAUG15Fall); } } else { - Actor_Set_Goal_Number(kActorMcCoy, 391); + Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyUG15Die); } } } @@ -1929,11 +1937,6 @@ void AIScriptMcCoy::dodge() { } } -void AIScriptMcCoy::sub_405920() { - _animationFrame = 0; - _animationState = 47; -} - void AIScriptMcCoy::sub_405940(float a1) { float x, y, z; int currentAngle = Actor_Query_Facing_1024(kActorMcCoy); diff --git a/engines/bladerunner/script/ai_script.h b/engines/bladerunner/script/ai_script.h index de09f8786a..73cc4c54dd 100644 --- a/engines/bladerunner/script/ai_script.h +++ b/engines/bladerunner/script/ai_script.h @@ -104,18 +104,17 @@ DECLARE_SCRIPT(McCoy) int dword_45A0E8; int _animationStateNextSpecial; int _animationNextSpecial; - int dword_45A0F8; + int _nextSoundId; bool _NR10SteeleShooting; float _fallSpeed; float _fallHeightCurrent; float _fallHeightTarget; void fallDown(); - void sub_4054F0(); + void UG15fall(); void sub_405660(); void sub_405800(); void dodge(); - void sub_405920(); void sub_405940(float a1); void sub_4059D0(float a1); END_SCRIPT @@ -459,12 +458,12 @@ END_SCRIPT DECLARE_SCRIPT(FreeSlotA) int _var1; int _var2; - float _var3; - float _var4; - float _var5; + float _fallSpeed; + float _fallHeightCurrent; + float _fallHeightTarget; void calcHit(); - void processGoal306(); + void goToRandomUGxx(); END_SCRIPT DECLARE_SCRIPT(FreeSlotB) diff --git a/engines/bladerunner/script/kia_script.cpp b/engines/bladerunner/script/kia_script.cpp index 13c5300174..56a2e48443 100644 --- a/engines/bladerunner/script/kia_script.cpp +++ b/engines/bladerunner/script/kia_script.cpp @@ -654,7 +654,7 @@ void KIAScript::SCRIPT_KIA_DLL_Play_Clue_Asset_Script(int notUsed, int clueId) { case kClueDNALutherLance: case kClueDNAMarcus: { - int dnaEvidences = Global_Variable_Query(kVariableDNAEvidences); + int dnaEvidences = Global_Variable_Query(kVariableDNAEvidence); if (dnaEvidences == 1) { KIA_Play_Slice_Model(988); } else if (dnaEvidences == 2) { diff --git a/engines/bladerunner/script/scene/dr06.cpp b/engines/bladerunner/script/scene/dr06.cpp index afbdf7cfb5..d2317b2481 100644 --- a/engines/bladerunner/script/scene/dr06.cpp +++ b/engines/bladerunner/script/scene/dr06.cpp @@ -117,10 +117,10 @@ bool SceneScriptDR06::ClickedOn3DObject(const char *objectName, bool a2) { Actor_Face_Heading(kActorMcCoy, 329, false); if ( Actor_Clue_Query(kActorMcCoy, kClueFolder) && Actor_Clue_Query(kActorMcCoy, kClueGuzzaFramedMcCoy) - && !Game_Flag_Query(670) + && !Game_Flag_Query(kFlagCallWithGuzza) ) { - Actor_Set_Goal_Number(kActorMcCoy, 350); - Game_Flag_Set(670); + Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyCallWithGuzza); + Game_Flag_Set(kFlagCallWithGuzza); } else if (!Game_Flag_Query(kFlagDR06VidphoneChecked)) { Actor_Voice_Over(770, kActorVoiceOver); Actor_Voice_Over(780, kActorVoiceOver); diff --git a/engines/bladerunner/script/scene/nr02.cpp b/engines/bladerunner/script/scene/nr02.cpp index 38851b48ef..f485fdf830 100644 --- a/engines/bladerunner/script/scene/nr02.cpp +++ b/engines/bladerunner/script/scene/nr02.cpp @@ -81,10 +81,10 @@ bool SceneScriptNR02::ClickedOn3DObject(const char *objectName, bool a2) { Actor_Face_Heading(kActorMcCoy, 13, false); if ( Actor_Clue_Query(kActorMcCoy, kClueFolder) && Actor_Clue_Query(kActorMcCoy, kClueGuzzaFramedMcCoy) - && !Game_Flag_Query(670) + && !Game_Flag_Query(kFlagCallWithGuzza) ) { - Actor_Set_Goal_Number(kActorMcCoy, 350); - Game_Flag_Set(670); + Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyCallWithGuzza); + Game_Flag_Set(kFlagCallWithGuzza); } else { Sound_Play(123, 50, 0, 0, 50); Delay(1000); diff --git a/engines/bladerunner/script/scene/nr11.cpp b/engines/bladerunner/script/scene/nr11.cpp index 447dfda1ab..99f2bc7bf6 100644 --- a/engines/bladerunner/script/scene/nr11.cpp +++ b/engines/bladerunner/script/scene/nr11.cpp @@ -146,7 +146,7 @@ bool SceneScriptNR11::ClickedOn3DObject(const char *objectName, bool combatMode) if (!Player_Query_Combat_Mode()) { Player_Set_Combat_Mode(true); } - Actor_Set_Goal_Number(kActorMcCoy, 230); + Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyNR11Shoot); Scene_Loop_Set_Default(kNR11LoopMainLoopFires); Scene_Loop_Start_Special(kSceneLoopModeOnce, kNR11LoopGunshots, true); } else if (Actor_Query_Goal_Number(kActorDektora) == kGoalDektoraNR11Hiding) { @@ -162,7 +162,7 @@ bool SceneScriptNR11::ClickedOn3DObject(const char *objectName, bool combatMode) Delay(500); Actor_Change_Animation_Mode(kActorMcCoy, kAnimationModeDie); Delay(2000); - Actor_Set_Goal_Number(kActorMcCoy, 231); + Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyNR10Fall); } else { Actor_Says(kActorMcCoy, 3840, 18); Delay(1000); @@ -298,7 +298,7 @@ void SceneScriptNR11::SceneFrameAdvanced(int frame) { if (!Player_Query_Combat_Mode()) { Player_Set_Combat_Mode(true); } - Actor_Set_Goal_Number(kActorMcCoy, 230); + Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyNR11Shoot); Scene_Loop_Set_Default(kNR11LoopMainLoopFires); Scene_Loop_Start_Special(kSceneLoopModeOnce, kNR11LoopGunshots, true); Game_Flag_Reset(kFlagNR11SteeleShoot); diff --git a/engines/bladerunner/script/scene/ug05.cpp b/engines/bladerunner/script/scene/ug05.cpp index cbce58e4a2..1062f456b8 100644 --- a/engines/bladerunner/script/scene/ug05.cpp +++ b/engines/bladerunner/script/scene/ug05.cpp @@ -269,7 +269,7 @@ void SceneScriptUG05::sub_402218() { if (affectionTowardsActor == kActorLucy) { if (Game_Flag_Query(kFlagLucyIsReplicant)) { - if (Global_Variable_Query(kVariableDNAEvidences) > 3) { + if (Global_Variable_Query(kVariableDNAEvidence) > 3) { Outtake_Play(kOuttakeEnd1B, false, -1); } else { Outtake_Play(kOuttakeEnd1C, false, -1); @@ -279,7 +279,7 @@ void SceneScriptUG05::sub_402218() { } } else if (affectionTowardsActor == kActorDektora) { if (Game_Flag_Query(kFlagDektoraIsReplicant)) { - if (Global_Variable_Query(kVariableDNAEvidences) > 3) { + if (Global_Variable_Query(kVariableDNAEvidence) > 3) { Outtake_Play(kOuttakeEnd1E, false, -1); } else { Outtake_Play(kOuttakeEnd1F, false, -1); diff --git a/engines/bladerunner/script/scene/ug15.cpp b/engines/bladerunner/script/scene/ug15.cpp index ef1ca2f291..436c6f2b79 100644 --- a/engines/bladerunner/script/scene/ug15.cpp +++ b/engines/bladerunner/script/scene/ug15.cpp @@ -24,6 +24,12 @@ namespace BladeRunner { +enum UG15Loops { + kUG15LoopMainLoop = 0, + kUG15LoopBridgeBreaks = 2, + kUG15LoopMainLoopBridgeBroken = 3 +}; + void SceneScriptUG15::InitializeScene() { if (Game_Flag_Query(kFlagUG17toUG15)) { Setup_Scene_Information( -25.0f, 26.31f, -434.0f, 520); @@ -33,14 +39,15 @@ void SceneScriptUG15::InitializeScene() { Setup_Scene_Information( -18.0f, 48.07f, 62.0f, 650); } else { Setup_Scene_Information(-238.0f, 48.07f, 222.0f, 180); - if (Game_Flag_Query(676) + if (Game_Flag_Query(kFlagUG15RatShot) && Random_Query(1, 10) == 10 ) { - Game_Flag_Reset(676); + Game_Flag_Reset(kFlagUG15RatShot); } } - if (Game_Flag_Query(682)) { - Scene_Loop_Set_Default(3); + + if (Game_Flag_Query(kFlagUG15BridgeBroken)) { + Scene_Loop_Set_Default(kUG15LoopMainLoopBridgeBroken); } if (Game_Flag_Query(kFlagUG17toUG15) @@ -107,7 +114,6 @@ bool SceneScriptUG15::ClickedOnItem(int itemId, bool a2) { } bool SceneScriptUG15::ClickedOnExit(int exitId) { - if (exitId == 0) { if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -25.0f, 26.31f, -434.0f, 0, true, false, 0)) { Ambient_Sounds_Remove_All_Non_Looping_Sounds(true); @@ -160,39 +166,40 @@ bool SceneScriptUG15::ClickedOn2DRegion(int region) { } void SceneScriptUG15::SceneFrameAdvanced(int frame) { - if (Actor_Query_Goal_Number(kActorFreeSlotA) == 300) { + if (Actor_Query_Goal_Number(kActorFreeSlotA) == kGoalFreeSlotAUG15Wait) { float x, y, z; Actor_Query_XYZ(kActorMcCoy, &x, &y, &z); if (-160.0f <= x && 220.0f > z ) { - Actor_Set_Goal_Number(kActorFreeSlotA, 301); + Actor_Set_Goal_Number(kActorFreeSlotA, kGoalFreeSlotAUG15WalkOut); } } + if (frame == 61) { Ambient_Sounds_Play_Sound(583, 80, 0, 0, 99); } - if ( Game_Flag_Query(677) - && !Game_Flag_Query(682) + if ( Game_Flag_Query(kFlagUG15BridgeWillBreak) + && !Game_Flag_Query(kFlagUG15BridgeBroken) ) { float x, y, z; Actor_Query_XYZ(kActorMcCoy, &x, &y, &z); if ( -180.0f <= x && 220.0f > z - && !Game_Flag_Query(724) + && !Game_Flag_Query(kFlagUG15BridgeBreaks) ) { - Game_Flag_Set(724); - Game_Flag_Set(682); - Scene_Loop_Set_Default(3); - Scene_Loop_Start_Special(kSceneLoopModeOnce, 2, true); - Actor_Set_Goal_Number(kActorMcCoy, 390); + Game_Flag_Set(kFlagUG15BridgeBreaks); + Game_Flag_Set(kFlagUG15BridgeBroken); + Scene_Loop_Set_Default(kUG15LoopMainLoopBridgeBroken); + Scene_Loop_Start_Special(kSceneLoopModeOnce, kUG15LoopBridgeBreaks, true); + Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyUG15Fall); Actor_Query_XYZ(kActorFreeSlotA, &x, &y, &z); if (-200.0f < x && -62.0f > x ) { - Actor_Set_Goal_Number(kActorFreeSlotA, 309); + Actor_Set_Goal_Number(kActorFreeSlotA, kGoalFreeSlotAUG15Fall); } } } @@ -208,8 +215,8 @@ void SceneScriptUG15::PlayerWalkedIn() { Game_Flag_Reset(kFlagUG16toUG15b); } else if (Game_Flag_Query(kFlagUG13toUG15)) { Game_Flag_Reset(kFlagUG13toUG15); - if (!Game_Flag_Query(676)) { - Actor_Set_Goal_Number(kActorFreeSlotA, 310); + if (!Game_Flag_Query(kFlagUG15RatShot)) { + Actor_Set_Goal_Number(kActorFreeSlotA, kGoalFreeSlotAUG15Prepare); } } } diff --git a/engines/bladerunner/script/scene/ug16.cpp b/engines/bladerunner/script/scene/ug16.cpp index 6d075abe9a..dc2f5da8a9 100644 --- a/engines/bladerunner/script/scene/ug16.cpp +++ b/engines/bladerunner/script/scene/ug16.cpp @@ -135,7 +135,7 @@ bool SceneScriptUG16::ClickedOn3DObject(const char *objectName, bool a2) { bool SceneScriptUG16::ClickedOnActor(int actorId) { if (Actor_Query_Goal_Number(kActorLuther) < 490) { - sub_401D78(); + dialogueWithLuther(); return true; } return false; @@ -234,7 +234,7 @@ void SceneScriptUG16::PlayerWalkedOut() { void SceneScriptUG16::DialogueQueueFlushed(int a1) { } -void SceneScriptUG16::sub_401D78() { +void SceneScriptUG16::dialogueWithLuther() { Dialogue_Menu_Clear_List(); DM_Add_To_List_Never_Repeat_Once_Selected(1400, 5, 6, 2); DM_Add_To_List_Never_Repeat_Once_Selected(1410, 5, 4, 8); @@ -245,7 +245,7 @@ void SceneScriptUG16::sub_401D78() { DM_Add_To_List_Never_Repeat_Once_Selected(1430, 6, 4, 5); DM_Add_To_List_Never_Repeat_Once_Selected(1440, 6, 4, 5); } - if ( Global_Variable_Query(49) > 1 + if ( Global_Variable_Query(kVariableCorruptedGuzzaEvidence) > 1 && !Actor_Clue_Query(kActorMcCoy, kClueFolder) ) { DM_Add_To_List_Never_Repeat_Once_Selected(1450, 6, 4, 5); diff --git a/engines/bladerunner/script/scene/ug18.cpp b/engines/bladerunner/script/scene/ug18.cpp index 7d45274d56..35b4661205 100644 --- a/engines/bladerunner/script/scene/ug18.cpp +++ b/engines/bladerunner/script/scene/ug18.cpp @@ -59,7 +59,7 @@ void SceneScriptUG18::InitializeScene() { Scene_Loop_Set_Default(4); - if ( Game_Flag_Query(670) + if ( Game_Flag_Query(kFlagCallWithGuzza) && !Game_Flag_Query(671) && Global_Variable_Query(kVariableChapter) == 4 ) { @@ -85,7 +85,7 @@ void SceneScriptUG18::SceneLoaded() { Actor_Set_At_Waypoint(kActorSadik, 33, 0); } } - if ( Game_Flag_Query(670) + if ( Game_Flag_Query(kFlagCallWithGuzza) && !Game_Flag_Query(671) && Global_Variable_Query(kVariableChapter) == 4 ) { @@ -192,7 +192,7 @@ void SceneScriptUG18::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo void SceneScriptUG18::PlayerWalkedIn() { Loop_Actor_Walk_To_XYZ(kActorMcCoy, -488.71f, 0.0f, 123.59f, 0, false, false, 0); - if ( Game_Flag_Query(670) + if ( Game_Flag_Query(kFlagCallWithGuzza) && !Game_Flag_Query(671) && Actor_Query_Is_In_Current_Set(kActorGuzza) ) { diff --git a/engines/bladerunner/script/scene_script.h b/engines/bladerunner/script/scene_script.h index 8d45053c13..a1899a3d30 100644 --- a/engines/bladerunner/script/scene_script.h +++ b/engines/bladerunner/script/scene_script.h @@ -497,7 +497,7 @@ DECLARE_SCRIPT(UG15) END_SCRIPT DECLARE_SCRIPT(UG16) - void sub_401D78(); + void dialogueWithLuther(); END_SCRIPT DECLARE_SCRIPT(UG17) |