diff options
author | Thanasis Antoniou | 2019-05-19 14:33:12 +0300 |
---|---|---|
committer | Thanasis Antoniou | 2019-05-19 14:34:01 +0300 |
commit | ea3a9f211da74ffd3aa35328147566160a73d680 (patch) | |
tree | 0dd73d3e45466cb420c3e8ace2e9ecbc9e76fa8e /engines/bladerunner | |
parent | 10ac612b9019aa299f3182180745ba6d215e93e5 (diff) | |
download | scummvm-rg350-ea3a9f211da74ffd3aa35328147566160a73d680.tar.gz scummvm-rg350-ea3a9f211da74ffd3aa35328147566160a73d680.tar.bz2 scummvm-rg350-ea3a9f211da74ffd3aa35328147566160a73d680.zip |
BLADERUNNER: Cleanup of police AI and fix for rat ai
Diffstat (limited to 'engines/bladerunner')
-rw-r--r-- | engines/bladerunner/game_constants.h | 54 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/free_slot_a.cpp | 2 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/free_slot_b.cpp | 6 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/moraji.cpp | 2 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/officer_grayford.cpp | 359 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/officer_leary.cpp | 216 | ||||
-rw-r--r-- | engines/bladerunner/script/init_script.cpp | 228 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ct12.cpp | 8 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/dr04.cpp | 18 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/hf05.cpp | 6 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/hf06.cpp | 4 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ma04.cpp | 4 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/tb03.cpp | 2 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ug05.cpp | 2 | ||||
-rw-r--r-- | engines/bladerunner/script/scene/ug07.cpp | 12 |
15 files changed, 536 insertions, 387 deletions
diff --git a/engines/bladerunner/game_constants.h b/engines/bladerunner/game_constants.h index c1163a8662..4f9198914b 100644 --- a/engines/bladerunner/game_constants.h +++ b/engines/bladerunner/game_constants.h @@ -2378,11 +2378,61 @@ enum GoalOfficerLeary { kGoalOfficerLearyDefault = 0, kGoalOfficerLearyRC01WalkToCrowd = 1, #if BLADERUNNER_ORIGINAL_BUGS - kGoalOfficerLearyRC01CrowdInterrogation = 2 + kGoalOfficerLearyRC01CrowdInterrogation = 2, #else kGoalOfficerLearyRC01CrowdInterrogation = 2, - kGoalOfficerLearyRC01ResumeWalkToCrowd = 4 + kGoalOfficerLearyRC01ResumeWalkToCrowd = 4, // added OfficerLeary goal #endif // BLADERUNNER_ORIGINAL_BUGS + kGoalOfficerLearyPoliceDoneFromRC01 = 3, + kGoalOfficerLearyEndOfAct1 = 99, + kGoalOfficerLearyVisitsBulletBob = 102, // un-triggered + kGoalOfficerLearyStartOfAct4 = 300, + kGoalOfficerLearyHuntingAroundAct4 = 305, + kGoalOfficerLearyPrepareToHuntAroundAct4 = 306, + kGoalOfficerLearyBlockingUG07 = 307, + // 308 - 309 un-triggered? + kGoalOfficerLearyAttackMcCoyAct4 = 310, + kGoalOfficerLearyStartOfAct5 = 400, + kGoalOfficerLearyDummyGoalAct5 = 410, + kGoalOfficerLearyPoliceWait120SecondsToAttackHF05 = 420, + kGoalOfficerLearyPoliceWait60SecondsToAttackHF05 = 425, + kGoalOfficerLearyPoliceAboutToAttackHF05 = 430, + kGoalOfficerLearyDead = 599 +}; + + +enum GoalOfficerGrayford { + kGoalOfficerGrayfordDefault = 0, + kGoalOfficerGrayfordWalksInPS03a = 1, + kGoalOfficerGrayfordWalksInPS03b = 2, + kGoalOfficerGrayfordWalksInPS03c = 3, + kGoalOfficerGrayfordWalksInPS03d = 4, + kGoalOfficerGrayfordWalksInFreeSlotC = 5, + kGoalOfficerGrayfordWalksInPS09a = 6, + kGoalOfficerGrayfordWalksInPS09b = 7, + kGoalOfficerGrayfordWalksInPS09c = 8, + kGoalOfficerGrayfordWalksInPS03e = 9, + kGoalOfficerGrayfordPrepareToRestartWalkAround = 10, + kGoalOfficerGrayfordStopAndTalk1 = 99, // this is used temporarily to make him stop and talk + kGoalOfficerGrayfordArrivesToDR04 = 101, + kGoalOfficerGrayfordArrivedAtDR04 = 102, + kGoalOfficerGrayfordTalkToMcCoyAndReportAtDR04 = 103, + kGoalOfficerGrayfordPatrolsAtDR04a = 104, + kGoalOfficerGrayfordPatrolsAtDR04b = 105, + kGoalOfficerGrayfordStopPatrolToTalkToMcCoyAtDR04 = 106, + kGoalOfficerGrayfordLeavesWithMorajiCorpseDR04 = 110, + kGoalOfficerGrayfordArrestMcCoyInTB03Act4 = 399, // TB02_TB03 + kGoalOfficerGrayfordStopAndTalkDR04 = 199, // this is used temporarily to make him stop and talk while at UG04 (Moraji's death scene) + kGoalOfficerGrayfordStartOfAct4 = 300, + kGoalOfficerGrayfordHuntingAroundAct4 = 305, + kGoalOfficerGrayfordPrepareToHuntAroundAct4 = 306, + kGoalOfficerGrayfordBlockingUG07 = 307, + kGoalOfficerGrayfordArrestsMcCoyAct4CT12 = 308, + kGoalOfficerGrayfordAttackMcCoyAct4 = 310, + kGoalOfficerGrayfordStartOfAct5 = 400, + kGoalOfficerGrayfordDummyGoalAct5 = 410, + kGoalOfficerGrayfordPoliceAboutToAttackHF05 = 430, + kGoalOfficerGrayfordDead = 599 }; enum GoalHanoi { diff --git a/engines/bladerunner/script/ai/free_slot_a.cpp b/engines/bladerunner/script/ai/free_slot_a.cpp index 9281e3a32e..83ae547e48 100644 --- a/engines/bladerunner/script/ai/free_slot_a.cpp +++ b/engines/bladerunner/script/ai/free_slot_a.cpp @@ -659,7 +659,7 @@ void AIScriptFreeSlotA::goToRandomUGxx() { // replacing with something more normal World_Waypoint_Set(463, kSetUG09, 91.0f, 156.94f, -498.0f); World_Waypoint_Set(464, kSetUG09, -29.60f, 156.94f, -498.0f); - AI_Movement_Track_Append(kActorFreeSlotA, 463, 4); + AI_Movement_Track_Append(kActorFreeSlotA, 463, 1); AI_Movement_Track_Append(kActorFreeSlotA, 464, 1); AI_Movement_Track_Append(kActorFreeSlotA, 463, 1); #endif diff --git a/engines/bladerunner/script/ai/free_slot_b.cpp b/engines/bladerunner/script/ai/free_slot_b.cpp index 79eeea3cb5..c3a87bff21 100644 --- a/engines/bladerunner/script/ai/free_slot_b.cpp +++ b/engines/bladerunner/script/ai/free_slot_b.cpp @@ -534,10 +534,10 @@ void AIScriptFreeSlotB::processGoal301() { AI_Movement_Track_Append(kActorFreeSlotB, 466, 1); #else // replacing with something more normal - World_Waypoint_Set(466, kSetUG09, -152.51f, 156.94f, -498.0f); + World_Waypoint_Set(466, kSetUG09, -149.0f, 156.94f, -498.0f); World_Waypoint_Set(547, kSetUG09, -32.60f, 156.94f, -498.0f); - AI_Movement_Track_Append(kActorFreeSlotB, 466, 4); - AI_Movement_Track_Append(kActorFreeSlotB, 547, 1); + AI_Movement_Track_Append(kActorFreeSlotB, 466, 1); + AI_Movement_Track_Append(kActorFreeSlotB, 547, 2); AI_Movement_Track_Append(kActorFreeSlotB, 466, 1); #endif // BLADERUNNER_ORIGINAL_BUGS break; diff --git a/engines/bladerunner/script/ai/moraji.cpp b/engines/bladerunner/script/ai/moraji.cpp index 7d5fe1dbeb..63998aa351 100644 --- a/engines/bladerunner/script/ai/moraji.cpp +++ b/engines/bladerunner/script/ai/moraji.cpp @@ -122,7 +122,7 @@ bool AIScriptMoraji::ShotAtAndHit() { if (Actor_Query_Goal_Number(kActorMoraji) == kGoalMorajiLayDown) { Game_Flag_Set(kFlagDR04McCoyShotMoraji); Actor_Set_Goal_Number(kActorMoraji, kGoalMorajiDie); - Actor_Set_Goal_Number(kActorOfficerGrayford, 101); + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordArrivesToDR04); return true; } else { return false; diff --git a/engines/bladerunner/script/ai/officer_grayford.cpp b/engines/bladerunner/script/ai/officer_grayford.cpp index 3c54790335..af0bc3c65f 100644 --- a/engines/bladerunner/script/ai/officer_grayford.cpp +++ b/engines/bladerunner/script/ai/officer_grayford.cpp @@ -40,47 +40,47 @@ void AIScriptOfficerGrayford::Initialize() { _var3 = 0; Actor_Put_In_Set(kActorOfficerGrayford, kSetFreeSlotG); - Actor_Set_At_Waypoint(kActorOfficerGrayford, 39, 0); - Actor_Set_Goal_Number(kActorOfficerGrayford, 0); + Actor_Set_At_Waypoint(kActorOfficerGrayford, 39, 0); // kSetFreeSlotG + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordDefault); } bool AIScriptOfficerGrayford::Update() { if (Global_Variable_Query(kVariableChapter) == 4 - && Actor_Query_Goal_Number(kActorOfficerGrayford) < 300) { + && Actor_Query_Goal_Number(kActorOfficerGrayford) < kGoalOfficerGrayfordStartOfAct4) { AI_Movement_Track_Flush(kActorOfficerGrayford); - Actor_Set_Goal_Number(kActorOfficerGrayford, 300); + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordStartOfAct4); return false; } if (Global_Variable_Query(kVariableChapter) == 5 - && Actor_Query_Goal_Number(kActorOfficerGrayford) < 400 + && Actor_Query_Goal_Number(kActorOfficerGrayford) < kGoalOfficerGrayfordStartOfAct5 ) { AI_Movement_Track_Flush(kActorOfficerGrayford); - Actor_Set_Goal_Number(kActorOfficerGrayford, 400); + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordStartOfAct5); return false; } if (!Game_Flag_Query(kFlagMcCoyInDNARow) - && Actor_Query_Goal_Number(kActorOfficerGrayford) > 102 - && Actor_Query_Goal_Number(kActorOfficerGrayford) < 110 + && Actor_Query_Goal_Number(kActorOfficerGrayford) > kGoalOfficerGrayfordArrivedAtDR04 + && Actor_Query_Goal_Number(kActorOfficerGrayford) < kGoalOfficerGrayfordLeavesWithMorajiCorpseDR04 ) { - Actor_Set_Goal_Number(kActorOfficerGrayford, 110); + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordLeavesWithMorajiCorpseDR04); return false; } - if (Actor_Query_Goal_Number(kActorOfficerGrayford) == 0) { - Actor_Set_Goal_Number(kActorOfficerGrayford, 1); + if (Actor_Query_Goal_Number(kActorOfficerGrayford) == kGoalOfficerGrayfordDefault) { + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordWalksInPS03a); return false; } - if (Actor_Query_Goal_Number(kActorOfficerGrayford) == 10) { + if (Actor_Query_Goal_Number(kActorOfficerGrayford) == kGoalOfficerGrayfordPrepareToRestartWalkAround) { AI_Movement_Track_Flush(kActorOfficerGrayford); - Actor_Set_Goal_Number(kActorOfficerGrayford, 0); + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordDefault); return false; } - if (Actor_Query_Goal_Number(kActorOfficerGrayford) == 102) { - Actor_Set_Goal_Number(kActorOfficerGrayford, 103); + if (Actor_Query_Goal_Number(kActorOfficerGrayford) == kGoalOfficerGrayfordArrivedAtDR04) { + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordTalkToMcCoyAndReportAtDR04); return false; } @@ -91,106 +91,110 @@ bool AIScriptOfficerGrayford::Update() { return false; } - if (Actor_Query_Goal_Number(kActorOfficerGrayford) == 310 + if (Actor_Query_Goal_Number(kActorOfficerGrayford) == kGoalOfficerGrayfordAttackMcCoyAct4 && Actor_Query_Which_Set_In(kActorOfficerGrayford) != Player_Query_Current_Set() ) { Non_Player_Actor_Combat_Mode_Off(kActorOfficerGrayford); - Actor_Set_Goal_Number(kActorOfficerGrayford, 305); + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordHuntingAroundAct4); return false; } - if (Actor_Query_Goal_Number(kActorOfficerGrayford) == 599 + if (Actor_Query_Goal_Number(kActorOfficerGrayford) == kGoalOfficerGrayfordDead && Actor_Query_Which_Set_In(kActorOfficerGrayford) != Player_Query_Current_Set() ) { + // dead officer gets revived and re-used Actor_Set_Health(kActorOfficerGrayford, 50, 50); - Actor_Set_Goal_Number(kActorOfficerGrayford, 305); + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordHuntingAroundAct4); return false; } - if (Actor_Query_Goal_Number(kActorOfficerGrayford) == 305) { + if (Actor_Query_Goal_Number(kActorOfficerGrayford) == kGoalOfficerGrayfordHuntingAroundAct4) { switch (Actor_Query_Which_Set_In(kActorOfficerGrayford)) { case kSetRC03: if (Actor_Query_Which_Set_In(kActorOfficerGrayford) == Player_Query_Current_Set()) { - Actor_Set_Goal_Number(kActorOfficerGrayford, 310); + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordAttackMcCoyAct4); Non_Player_Actor_Combat_Mode_On(kActorOfficerGrayford, kActorCombatStateIdle, true, kActorMcCoy, 18, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false); } break; case kSetUG01: if (Actor_Query_Which_Set_In(kActorOfficerGrayford) == Player_Query_Current_Set()) { - Actor_Set_Goal_Number(kActorOfficerGrayford, 310); + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordAttackMcCoyAct4); Non_Player_Actor_Combat_Mode_On(kActorOfficerGrayford, kActorCombatStateIdle, true, kActorMcCoy, 11, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false); } break; case kSetUG04: + // fall through case kSetUG05: + // fall through case kSetUG06: if (Actor_Query_Which_Set_In(kActorOfficerGrayford) == Player_Query_Current_Set()) { - Actor_Set_Goal_Number(kActorOfficerGrayford, 310); + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordAttackMcCoyAct4); Non_Player_Actor_Combat_Mode_On(kActorOfficerGrayford, kActorCombatStateIdle, true, kActorMcCoy, 10, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false); } break; - +// asdf UG07 whould be a type 10 combat, 12 flee? case kSetUG08: if (Actor_Query_Which_Set_In(kActorOfficerGrayford) == Player_Query_Current_Set()) { - Actor_Set_Goal_Number(kActorOfficerGrayford, 310); + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordAttackMcCoyAct4); Non_Player_Actor_Combat_Mode_On(kActorOfficerGrayford, kActorCombatStateIdle, true, kActorMcCoy, 13, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false); } break; +// asdf UG09 whould be a type ?? // case kSetUG10: if (Actor_Query_Which_Set_In(kActorOfficerGrayford) == Player_Query_Current_Set()) { - Actor_Set_Goal_Number(kActorOfficerGrayford, 310); + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordAttackMcCoyAct4); Non_Player_Actor_Combat_Mode_On(kActorOfficerGrayford, kActorCombatStateIdle, true, kActorMcCoy, 14, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false); } break; case kSetUG12: if (Actor_Query_Which_Set_In(kActorOfficerGrayford) == Player_Query_Current_Set()) { - Actor_Set_Goal_Number(kActorOfficerGrayford, 310); + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordAttackMcCoyAct4); Non_Player_Actor_Combat_Mode_On(kActorOfficerGrayford, kActorCombatStateIdle, true, kActorMcCoy, 16, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false); } break; case kSetUG14: if (Actor_Query_Which_Set_In(kActorOfficerGrayford) == Player_Query_Current_Set()) { - Actor_Set_Goal_Number(kActorOfficerGrayford, 310); + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordAttackMcCoyAct4); Non_Player_Actor_Combat_Mode_On(kActorOfficerGrayford, kActorCombatStateIdle, true, kActorMcCoy, 17, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false); } break; case kSetMA07: if (Actor_Query_Which_Set_In(kActorOfficerGrayford) == Player_Query_Current_Set()) { - Actor_Set_Goal_Number(kActorOfficerGrayford, 310); + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordAttackMcCoyAct4); Non_Player_Actor_Combat_Mode_On(kActorOfficerGrayford, kActorCombatStateIdle, true, kActorMcCoy, 7, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false); } break; case kSetNR01: if (Actor_Query_Which_Set_In(kActorOfficerGrayford) == Player_Query_Current_Set()) { - Actor_Set_Goal_Number(kActorOfficerGrayford, 310); + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordAttackMcCoyAct4); Non_Player_Actor_Combat_Mode_On(kActorOfficerGrayford, kActorCombatStateIdle, true, kActorMcCoy, 3, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false); } break; case kSetDR01_DR02_DR04: if (Actor_Query_Which_Set_In(kActorOfficerGrayford) == Player_Query_Current_Set()) { - Actor_Set_Goal_Number(kActorOfficerGrayford, 310); + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordAttackMcCoyAct4); Non_Player_Actor_Combat_Mode_On(kActorOfficerGrayford, kActorCombatStateIdle, true, kActorMcCoy, 0, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false); } break; case kSetBB01: if (Actor_Query_Which_Set_In(kActorOfficerGrayford) == Player_Query_Current_Set()) { - Actor_Set_Goal_Number(kActorOfficerGrayford, 310); + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordAttackMcCoyAct4); Non_Player_Actor_Combat_Mode_On(kActorOfficerGrayford, kActorCombatStateIdle, true, kActorMcCoy, 1, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false); } break; case kSetCT11: if (Actor_Query_Which_Set_In(kActorOfficerGrayford) == Player_Query_Current_Set()) { - Actor_Set_Goal_Number(kActorOfficerGrayford, 310); + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordAttackMcCoyAct4); Non_Player_Actor_Combat_Mode_On(kActorOfficerGrayford, kActorCombatStateIdle, true, kActorMcCoy, 5, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, -1, -1, -1, 10, 300, false); } break; @@ -204,73 +208,75 @@ bool AIScriptOfficerGrayford::Update() { void AIScriptOfficerGrayford::TimerExpired(int timer) { if (timer == kActorTimerAIScriptCustomTask2) { AI_Countdown_Timer_Reset(kActorOfficerGrayford, kActorTimerAIScriptCustomTask2); - if (Actor_Query_Goal_Number(kActorOfficerGrayford) == 104) { - Actor_Set_Goal_Number(kActorOfficerGrayford, 105); - } else if (Actor_Query_Goal_Number(kActorOfficerGrayford) == 105) { - Actor_Set_Goal_Number(kActorOfficerGrayford, 104); + if (Actor_Query_Goal_Number(kActorOfficerGrayford) == kGoalOfficerGrayfordPatrolsAtDR04a) { + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordPatrolsAtDR04b); + } else if (Actor_Query_Goal_Number(kActorOfficerGrayford) == kGoalOfficerGrayfordPatrolsAtDR04b) { + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordPatrolsAtDR04a); } } } void AIScriptOfficerGrayford::CompletedMovementTrack() { switch (Actor_Query_Goal_Number(kActorOfficerGrayford)) { - case 1: - Actor_Set_Goal_Number(kActorOfficerGrayford, 2); + case kGoalOfficerGrayfordWalksInPS03a: + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordWalksInPS03b); break; - case 2: - Actor_Set_Goal_Number(kActorOfficerGrayford, 3); + case kGoalOfficerGrayfordWalksInPS03b: + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordWalksInPS03c); break; - case 3: - Actor_Set_Goal_Number(kActorOfficerGrayford, 4); + case kGoalOfficerGrayfordWalksInPS03c: + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordWalksInPS03d); break; - case 4: - Actor_Set_Goal_Number(kActorOfficerGrayford, 5); + case kGoalOfficerGrayfordWalksInPS03d: + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordWalksInFreeSlotC); break; - case 5: - Actor_Set_Goal_Number(kActorOfficerGrayford, 6); + case kGoalOfficerGrayfordWalksInFreeSlotC: + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordWalksInPS09a); break; - case 6: - Actor_Set_Goal_Number(kActorOfficerGrayford, 7); + case kGoalOfficerGrayfordWalksInPS09a: + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordWalksInPS09b); break; - case 7: - Actor_Set_Goal_Number(kActorOfficerGrayford, 8); + case kGoalOfficerGrayfordWalksInPS09b: + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordWalksInPS09c); break; - case 8: - Actor_Set_Goal_Number(kActorOfficerGrayford, 9); + case kGoalOfficerGrayfordWalksInPS09c: + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordWalksInPS03e); break; - case 9: - Actor_Set_Goal_Number(kActorOfficerGrayford, 10); + case kGoalOfficerGrayfordWalksInPS03e: + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordPrepareToRestartWalkAround); break; - case 104: - case 105: + case kGoalOfficerGrayfordPatrolsAtDR04a: + // fall through + case kGoalOfficerGrayfordPatrolsAtDR04b: if (Random_Query(0, 2)) { Actor_Change_Animation_Mode(kActorOfficerGrayford, 43); } else { AI_Countdown_Timer_Reset(kActorOfficerGrayford, kActorTimerAIScriptCustomTask2); AI_Countdown_Timer_Start(kActorOfficerGrayford, kActorTimerAIScriptCustomTask2, Random_Query(6, 12)); } - Actor_Face_Waypoint(kActorOfficerGrayford, 97, true); + Actor_Face_Waypoint(kActorOfficerGrayford, 97, true); // kSetDR01_DR02_DR04 // return false; break; - case 305: - Actor_Set_Goal_Number(kActorOfficerGrayford, 306); + case kGoalOfficerGrayfordHuntingAroundAct4: + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordPrepareToHuntAroundAct4); break; - case 307: + case kGoalOfficerGrayfordBlockingUG07: + // UG07 before McCoy visits his apartment in Act 4 Non_Player_Actor_Combat_Mode_On(kActorOfficerGrayford, kActorCombatStateIdle, true, kActorMcCoy, 12, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, -1, -1, 15, 300, false); break; - case 308: + case kGoalOfficerGrayfordArrestsMcCoyAct4CT12: Actor_Change_Animation_Mode(kActorOfficerGrayford, kAnimationModeCombatIdle); Actor_Face_Actor(kActorOfficerGrayford, kActorMcCoy, true); break; @@ -288,7 +294,7 @@ void AIScriptOfficerGrayford::ClickedByPlayer() { switch (Actor_Query_Goal_Number(kActorOfficerGrayford)) { case 1: AI_Movement_Track_Flush(kActorOfficerGrayford); - Actor_Set_Goal_Number(kActorOfficerGrayford, 99); + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordStopAndTalk1); Actor_Face_Actor(kActorMcCoy, kActorOfficerGrayford, true); Actor_Face_Actor(kActorOfficerGrayford, kActorMcCoy, true); if (Random_Query(1, 2) == 1) { @@ -302,7 +308,7 @@ void AIScriptOfficerGrayford::ClickedByPlayer() { case 2: AI_Movement_Track_Flush(kActorOfficerGrayford); - Actor_Set_Goal_Number(kActorOfficerGrayford, 99); + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordStopAndTalk1); Actor_Face_Actor(kActorMcCoy, kActorOfficerGrayford, true); Actor_Face_Actor(kActorOfficerGrayford, kActorMcCoy, true); if (Random_Query(1, 2) == 1) { @@ -316,7 +322,7 @@ void AIScriptOfficerGrayford::ClickedByPlayer() { case 3: AI_Movement_Track_Flush(kActorOfficerGrayford); - Actor_Set_Goal_Number(kActorOfficerGrayford, 99); + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordStopAndTalk1); Actor_Face_Actor(kActorMcCoy, kActorOfficerGrayford, true); Actor_Face_Actor(kActorOfficerGrayford, kActorMcCoy, true); if (Random_Query(1, 2) == 1) { @@ -329,7 +335,7 @@ void AIScriptOfficerGrayford::ClickedByPlayer() { case 4: AI_Movement_Track_Flush(kActorOfficerGrayford); - Actor_Set_Goal_Number(kActorOfficerGrayford, 99); + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordStopAndTalk1); Actor_Face_Actor(kActorMcCoy, kActorOfficerGrayford, true); Actor_Face_Actor(kActorOfficerGrayford, kActorMcCoy, true); if (Random_Query(1, 2) == 1) { @@ -344,7 +350,7 @@ void AIScriptOfficerGrayford::ClickedByPlayer() { case 7: AI_Movement_Track_Flush(kActorOfficerGrayford); - Actor_Set_Goal_Number(kActorOfficerGrayford, 99); + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordStopAndTalk1); Actor_Face_Actor(kActorMcCoy, kActorOfficerGrayford, true); Actor_Says(kActorMcCoy, 4515, 14); Actor_Says(kActorOfficerGrayford, 330, 13); @@ -353,17 +359,17 @@ void AIScriptOfficerGrayford::ClickedByPlayer() { case 8: AI_Movement_Track_Flush(kActorOfficerGrayford); - Actor_Set_Goal_Number(kActorOfficerGrayford, 99); + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordStopAndTalk1); Actor_Face_Actor(kActorMcCoy, kActorOfficerGrayford, true); Actor_Face_Actor(kActorOfficerGrayford, kActorMcCoy, true); Actor_Says(kActorMcCoy, 5075, 13); Actor_Set_Goal_Number(kActorOfficerGrayford, 8); break; - case 104: - Actor_Set_Goal_Number(kActorOfficerGrayford, 199); + case kGoalOfficerGrayfordPatrolsAtDR04a: + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordStopAndTalkDR04); Actor_Face_Actor(kActorMcCoy, kActorOfficerGrayford, true); - Actor_Says(kActorMcCoy, 1005, kAnimationModeTalk); + Actor_Says(kActorMcCoy, 1005, kAnimationModeTalk); // Don't miss anything. AI_Movement_Track_Flush(kActorOfficerGrayford); AI_Countdown_Timer_Reset(kActorOfficerGrayford, kActorTimerAIScriptCustomTask2); if (_animationState == 35 || _animationState == 34) { @@ -372,13 +378,13 @@ void AIScriptOfficerGrayford::ClickedByPlayer() { } Actor_Face_Actor(kActorOfficerGrayford, kActorMcCoy, true); Actor_Says(kActorOfficerGrayford, 190, 19); - Actor_Set_Goal_Number(kActorOfficerGrayford, 104); + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordPatrolsAtDR04a); break; - case 105: - Actor_Set_Goal_Number(kActorOfficerGrayford, 199); + case kGoalOfficerGrayfordPatrolsAtDR04b: + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordStopAndTalkDR04); Actor_Face_Actor(kActorMcCoy, kActorOfficerGrayford, true); - Actor_Says(kActorMcCoy, 1005, kAnimationModeTalk); + Actor_Says(kActorMcCoy, 1005, kAnimationModeTalk); // Don't miss anything. AI_Movement_Track_Flush(kActorOfficerGrayford); AI_Countdown_Timer_Reset(kActorOfficerGrayford, kActorTimerAIScriptCustomTask2); if (_animationState == 35 || _animationState == 34) { @@ -387,12 +393,12 @@ void AIScriptOfficerGrayford::ClickedByPlayer() { } Actor_Face_Actor(kActorOfficerGrayford, kActorMcCoy, true); Actor_Says(kActorOfficerGrayford, 190, 19); - Actor_Set_Goal_Number(kActorOfficerGrayford, 105); + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordPatrolsAtDR04b); break; default: return; //false; - break; +// break; // redundant } return; //true; @@ -419,14 +425,15 @@ void AIScriptOfficerGrayford::ShotAtAndMissed() { } bool AIScriptOfficerGrayford::ShotAtAndHit() { - if (Actor_Query_Goal_Number(kActorOfficerGrayford) == 307) + // Grayford is invincible while blocking the UG07 (before McCoy visits his apartment in Act 4) + if (Actor_Query_Goal_Number(kActorOfficerGrayford) == kGoalOfficerGrayfordBlockingUG07) { Actor_Set_Health(kActorOfficerGrayford, 50, 50); - + } return false; } void AIScriptOfficerGrayford::Retired(int byActorId) { - Actor_Set_Goal_Number(kActorOfficerGrayford, 599); + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordDead); Game_Flag_Set(kFlagMcCoyRetiredHuman); } @@ -436,61 +443,71 @@ int AIScriptOfficerGrayford::GetFriendlinessModifierIfGetsClue(int otherActorId, bool AIScriptOfficerGrayford::GoalChanged(int currentGoalNumber, int newGoalNumber) { switch (newGoalNumber) { - case 1: + case kGoalOfficerGrayfordWalksInPS03a: + // kSetPS03 AI_Movement_Track_Flush(kActorOfficerGrayford); AI_Movement_Track_Append(kActorOfficerGrayford, 82, Random_Query(5, 20)); AI_Movement_Track_Repeat(kActorOfficerGrayford); return true; - case 2: + case kGoalOfficerGrayfordWalksInPS03b: + // kSetPS03 AI_Movement_Track_Flush(kActorOfficerGrayford); AI_Movement_Track_Append(kActorOfficerGrayford, 76, Random_Query(10, 20)); AI_Movement_Track_Repeat(kActorOfficerGrayford); return true; - case 3: + case kGoalOfficerGrayfordWalksInPS03c: + // kSetPS03 AI_Movement_Track_Flush(kActorOfficerGrayford); AI_Movement_Track_Append(kActorOfficerGrayford, 77, Random_Query(5, 15)); AI_Movement_Track_Repeat(kActorOfficerGrayford); return true; - case 4: + case kGoalOfficerGrayfordWalksInPS03d: + // kSetPS03 AI_Movement_Track_Flush(kActorOfficerGrayford); AI_Movement_Track_Append(kActorOfficerGrayford, 78, Random_Query(5, 15)); AI_Movement_Track_Repeat(kActorOfficerGrayford); return true; - case 5: + case kGoalOfficerGrayfordWalksInFreeSlotC: + // kSetFreeSlotC AI_Movement_Track_Flush(kActorOfficerGrayford); - AI_Movement_Track_Append(kActorOfficerGrayford, 35, 30); + AI_Movement_Track_Append(kActorOfficerGrayford, 35, 30); // kSetFreeSlotC AI_Movement_Track_Repeat(kActorOfficerGrayford); return true; - case 6: + case kGoalOfficerGrayfordWalksInPS09a: + // kSetPS09 AI_Movement_Track_Flush(kActorOfficerGrayford); AI_Movement_Track_Append(kActorOfficerGrayford, 79, Random_Query(5, 15)); AI_Movement_Track_Repeat(kActorOfficerGrayford); return true; - case 7: + case kGoalOfficerGrayfordWalksInPS09b: + // kSetPS09 AI_Movement_Track_Flush(kActorOfficerGrayford); AI_Movement_Track_Append(kActorOfficerGrayford, 80, 1); AI_Movement_Track_Repeat(kActorOfficerGrayford); return true; - case 8: + case kGoalOfficerGrayfordWalksInPS09c: + // kSetPS09 AI_Movement_Track_Flush(kActorOfficerGrayford); AI_Movement_Track_Append(kActorOfficerGrayford, 81, Random_Query(5, 15)); AI_Movement_Track_Repeat(kActorOfficerGrayford); return true; - case 9: + case kGoalOfficerGrayfordWalksInPS03e: + // kSetPS03 AI_Movement_Track_Flush(kActorOfficerGrayford); AI_Movement_Track_Append(kActorOfficerGrayford, 82, Random_Query(5, 15)); AI_Movement_Track_Repeat(kActorOfficerGrayford); return true; - case 101: + case kGoalOfficerGrayfordArrivesToDR04: + // kSetDR01_DR02_DR04 Player_Loses_Control(); AI_Movement_Track_Flush(kActorOfficerGrayford); Actor_Put_In_Set(kActorOfficerGrayford, kSetDR01_DR02_DR04); @@ -513,13 +530,14 @@ bool AIScriptOfficerGrayford::GoalChanged(int currentGoalNumber, int newGoalNumb } return true; - case 102: + case kGoalOfficerGrayfordArrivedAtDR04: return true; - case 103: + case kGoalOfficerGrayfordTalkToMcCoyAndReportAtDR04: + // kSetDR01_DR02_DR04 Actor_Says(kActorOfficerGrayford, 120, 19); - Actor_Says_With_Pause(kActorMcCoy, 970, 0.2f, 13); - Actor_Says(kActorMcCoy, 975, 12); + Actor_Says_With_Pause(kActorMcCoy, 970, 0.2f, 13); // Got a dead man here. Victim of an explosion. + Actor_Says(kActorMcCoy, 975, 12); // TODO - a bug? McCoy may not know Moraji's name here(?) if (Actor_Clue_Query(kActorMcCoy, kClueMorajiInterview) == 1) { Actor_Says(kActorMcCoy, 980, 16); @@ -537,33 +555,35 @@ bool AIScriptOfficerGrayford::GoalChanged(int currentGoalNumber, int newGoalNumb if (Actor_Query_Goal_Number(kActorMoraji) == kGoalMorajiDead) { Actor_Face_Actor(kActorOfficerGrayford, kActorMoraji, true); } else { - Actor_Face_Waypoint(kActorOfficerGrayford, 97, 1); + Actor_Face_Waypoint(kActorOfficerGrayford, 97, true); } Actor_Change_Animation_Mode(kActorOfficerGrayford, 43); if (Player_Query_Current_Scene() == kSceneDR04) { - Actor_Says(kActorOfficerGrayford, 170, kAnimationModeTalk); + Actor_Says(kActorOfficerGrayford, 170, kAnimationModeTalk); // This is 32, Sector 3. Reporting a homicide. Possible act of terrorism. } return true; - case 104: + case kGoalOfficerGrayfordPatrolsAtDR04a: + // kSetDR01_DR02_DR04 AI_Countdown_Timer_Reset(kActorOfficerGrayford, kActorTimerAIScriptCustomTask2); AI_Movement_Track_Flush(kActorOfficerGrayford); AI_Movement_Track_Append(kActorOfficerGrayford, 112, 0); AI_Movement_Track_Repeat(kActorOfficerGrayford); return true; - case 105: + case kGoalOfficerGrayfordPatrolsAtDR04b: + // kSetDR01_DR02_DR04 AI_Countdown_Timer_Reset(kActorOfficerGrayford, kActorTimerAIScriptCustomTask2); AI_Movement_Track_Flush(kActorOfficerGrayford); AI_Movement_Track_Append(kActorOfficerGrayford, 113, 0); AI_Movement_Track_Repeat(kActorOfficerGrayford); return true; - case 106: + case kGoalOfficerGrayfordStopPatrolToTalkToMcCoyAtDR04: Actor_Face_Actor(kActorMcCoy, kActorOfficerGrayford, true); - Actor_Says(kActorMcCoy, 1000, 14); + Actor_Says(kActorMcCoy, 1000, 14); // You got a sheet or something...? AI_Movement_Track_Flush(kActorOfficerGrayford); AI_Countdown_Timer_Reset(kActorOfficerGrayford, kActorTimerAIScriptCustomTask2); @@ -579,23 +599,25 @@ bool AIScriptOfficerGrayford::GoalChanged(int currentGoalNumber, int newGoalNumb Actor_Set_Goal_Number(kActorOfficerGrayford, currentGoalNumber); return true; // possible bugfix: was break; - case 110: + case kGoalOfficerGrayfordLeavesWithMorajiCorpseDR04: + // kSetFreeSlotC AI_Movement_Track_Flush(kActorOfficerGrayford); - AI_Movement_Track_Append(kActorOfficerGrayford, 35, 0); + AI_Movement_Track_Append(kActorOfficerGrayford, 35, 0); // kSetFreeSlotC AI_Movement_Track_Repeat(kActorOfficerGrayford); AI_Movement_Track_Flush(kActorMoraji); - AI_Movement_Track_Append(kActorMoraji, 41, 0); + AI_Movement_Track_Append(kActorMoraji, 41, 0); // kSetFreeSlotI AI_Movement_Track_Repeat(kActorMoraji); return true; - case 300: - Actor_Set_Goal_Number(kActorOfficerGrayford, 305); + case kGoalOfficerGrayfordStartOfAct4: + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordHuntingAroundAct4); return true; - case 305: + case kGoalOfficerGrayfordHuntingAroundAct4: AI_Movement_Track_Flush(kActorOfficerGrayford); switch (Random_Query(1, 10)) { case 1: + // kSetNR01 AI_Movement_Track_Append(kActorOfficerGrayford, 398, 15); AI_Movement_Track_Append(kActorOfficerGrayford, 399, 0); AI_Movement_Track_Append(kActorOfficerGrayford, 400, 0); @@ -604,54 +626,59 @@ bool AIScriptOfficerGrayford::GoalChanged(int currentGoalNumber, int newGoalNumb AI_Movement_Track_Append(kActorOfficerGrayford, 403, 0); AI_Movement_Track_Append(kActorOfficerGrayford, 404, 15); AI_Movement_Track_Repeat(kActorOfficerGrayford); - Actor_Set_Goal_Number(kActorOfficerGrayford, 305); + //Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordHuntingAroundAct4); // redundant return true; case 2: + // kSetCT11 AI_Movement_Track_Append(kActorOfficerGrayford, 385, 10); AI_Movement_Track_Append(kActorOfficerGrayford, 242, 2); AI_Movement_Track_Append(kActorOfficerGrayford, 386, 2); AI_Movement_Track_Append(kActorOfficerGrayford, 387, 15); AI_Movement_Track_Repeat(kActorOfficerGrayford); - Actor_Set_Goal_Number(kActorOfficerGrayford, 305); + //Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordHuntingAroundAct4); // redundant return true; case 3: + // kSetDR01_DR02_DR04 AI_Movement_Track_Append(kActorOfficerGrayford, 390, 10); AI_Movement_Track_Append(kActorOfficerGrayford, 391, 0); AI_Movement_Track_Append(kActorOfficerGrayford, 392, 5); AI_Movement_Track_Append(kActorOfficerGrayford, 345, 0); AI_Movement_Track_Append(kActorOfficerGrayford, 393, 15); AI_Movement_Track_Repeat(kActorOfficerGrayford); - Actor_Set_Goal_Number(kActorOfficerGrayford, 305); + //Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordHuntingAroundAct4); // redundant return true; case 4: + // kSetRC03 -> kSetFreeSlotC AI_Movement_Track_Append(kActorOfficerGrayford, 381, 15); AI_Movement_Track_Append(kActorOfficerGrayford, 382, 0); AI_Movement_Track_Append(kActorOfficerGrayford, 383, 15); AI_Movement_Track_Append(kActorOfficerGrayford, 382, 3); AI_Movement_Track_Append(kActorOfficerGrayford, 384, 0); - AI_Movement_Track_Append(kActorOfficerGrayford, 35, 30); + AI_Movement_Track_Append(kActorOfficerGrayford, 35, 30); // kSetFreeSlotC AI_Movement_Track_Repeat(kActorOfficerGrayford); - Actor_Set_Goal_Number(kActorOfficerGrayford, 305); + //Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordHuntingAroundAct4); // redundant return true; case 5: + // kSetBB01 -> kSetFreeSlotC AI_Movement_Track_Append(kActorOfficerGrayford, 388, 10); AI_Movement_Track_Append(kActorOfficerGrayford, 389, 10); - AI_Movement_Track_Append(kActorOfficerGrayford, 35, 30); + AI_Movement_Track_Append(kActorOfficerGrayford, 35, 30); // kSetFreeSlotC AI_Movement_Track_Repeat(kActorOfficerGrayford); - Actor_Set_Goal_Number(kActorOfficerGrayford, 305); + //Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordHuntingAroundAct4); // redundant return true; case 6: + // kSetCT11 - identical to case 2 AI_Movement_Track_Append(kActorOfficerGrayford, 385, 10); AI_Movement_Track_Append(kActorOfficerGrayford, 242, 2); AI_Movement_Track_Append(kActorOfficerGrayford, 386, 2); AI_Movement_Track_Append(kActorOfficerGrayford, 387, 15); AI_Movement_Track_Repeat(kActorOfficerGrayford); - Actor_Set_Goal_Number(kActorOfficerGrayford, 305); + //Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordHuntingAroundAct4); // redundant return true; #if BLADERUNNER_ORIGINAL_BUGS @@ -659,6 +686,7 @@ bool AIScriptOfficerGrayford::GoalChanged(int currentGoalNumber, int newGoalNumb // When the police officer is there as well he will kill McCoy because player cannot control him. case 7: + // kSetMA07 -> kSetFreeSlotC AI_Movement_Track_Append(kActorOfficerGrayford, 394, 15); AI_Movement_Track_Append(kActorOfficerGrayford, 395, 0); AI_Movement_Track_Append(kActorOfficerGrayford, 396, 0); @@ -666,141 +694,165 @@ bool AIScriptOfficerGrayford::GoalChanged(int currentGoalNumber, int newGoalNumb AI_Movement_Track_Append(kActorOfficerGrayford, 396, 0); AI_Movement_Track_Append(kActorOfficerGrayford, 395, 0); AI_Movement_Track_Append(kActorOfficerGrayford, 430, 15); - AI_Movement_Track_Append(kActorOfficerGrayford, 35, 30); + AI_Movement_Track_Append(kActorOfficerGrayford, 35, 30); // kSetFreeSlotC AI_Movement_Track_Repeat(kActorOfficerGrayford); - Actor_Set_Goal_Number(kActorOfficerGrayford, 305); + //Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordHuntingAroundAct4); // redundant return true; #else case 7: - // fall through -#endif + // just put him away for a few seconds + AI_Movement_Track_Append(kActorOfficerGrayford, 35, 30); // kSetFreeSlotC + AI_Movement_Track_Repeat(kActorOfficerGrayford); + return true; +#endif // BLADERUNNER_ORIGINAL_BUGS case 8: switch (Random_Query(1, 7)) { case 1: + // kSetUG10 -> kSetFreeSlotC AI_Movement_Track_Append(kActorOfficerGrayford, 302, 0); AI_Movement_Track_Append(kActorOfficerGrayford, 407, 0); AI_Movement_Track_Append(kActorOfficerGrayford, 408, 0); - AI_Movement_Track_Append(kActorOfficerGrayford, 35, 30); + AI_Movement_Track_Append(kActorOfficerGrayford, 35, 30); // kSetFreeSlotC AI_Movement_Track_Repeat(kActorOfficerGrayford); - break; // and go to case 9 below + break; case 2: + // kSetUG14 AI_Movement_Track_Append(kActorOfficerGrayford, 536, 0); AI_Movement_Track_Append(kActorOfficerGrayford, 537, 0); AI_Movement_Track_Append(kActorOfficerGrayford, 538, 5); AI_Movement_Track_Append(kActorOfficerGrayford, 537, 0); AI_Movement_Track_Append(kActorOfficerGrayford, 536, 0); AI_Movement_Track_Repeat(kActorOfficerGrayford); - break; // and go to case 9 below + break; case 3: + // kSetUG04 -> kSetFreeSlotC AI_Movement_Track_Append(kActorOfficerGrayford, 296, 10); AI_Movement_Track_Append(kActorOfficerGrayford, 409, 2); AI_Movement_Track_Append(kActorOfficerGrayford, 296, 10); - AI_Movement_Track_Append(kActorOfficerGrayford, 35, 30); + AI_Movement_Track_Append(kActorOfficerGrayford, 35, 30); // kSetFreeSlotC AI_Movement_Track_Repeat(kActorOfficerGrayford); - break; // and go to case 9 below + break; case 4: + // kSetUG05 -> kSetFreeSlotC AI_Movement_Track_Append(kActorOfficerGrayford, 411, 10); AI_Movement_Track_Append(kActorOfficerGrayford, 412, 5); AI_Movement_Track_Append(kActorOfficerGrayford, 411, 0); - AI_Movement_Track_Append(kActorOfficerGrayford, 35, 30); + AI_Movement_Track_Append(kActorOfficerGrayford, 35, 30); // kSetFreeSlotC AI_Movement_Track_Repeat(kActorOfficerGrayford); - break; // and go to case 9 below + break; case 5: + // kSetUG06 -> kSetFreeSlotC AI_Movement_Track_Append(kActorOfficerGrayford, 413, 10); AI_Movement_Track_Append(kActorOfficerGrayford, 414, 0); AI_Movement_Track_Append_With_Facing(kActorOfficerGrayford, 431, 0, 1017); AI_Movement_Track_Append(kActorOfficerGrayford, 432, 10); - AI_Movement_Track_Append(kActorOfficerGrayford, 35, 30); + AI_Movement_Track_Append(kActorOfficerGrayford, 35, 30); // kSetFreeSlotC AI_Movement_Track_Repeat(kActorOfficerGrayford); - break; // and go to case 9 below + break; case 6: + // kSetUG07 -> kSetFreeSlotC AI_Movement_Track_Append(kActorOfficerGrayford, 415, 0); AI_Movement_Track_Append_With_Facing(kActorOfficerGrayford, 416, 0, 620); AI_Movement_Track_Append(kActorOfficerGrayford, 417, 0); AI_Movement_Track_Append(kActorOfficerGrayford, 418, 0); - AI_Movement_Track_Append(kActorOfficerGrayford, 35, 30); + AI_Movement_Track_Append(kActorOfficerGrayford, 35, 30); // kSetFreeSlotC AI_Movement_Track_Repeat(kActorOfficerGrayford); - break; // and go to case 9 below + break; case 7: + // kSetUG01 -> kSetFreeSlotC AI_Movement_Track_Append(kActorOfficerGrayford, 405, 10); AI_Movement_Track_Append(kActorOfficerGrayford, 406, 0); - AI_Movement_Track_Append(kActorOfficerGrayford, 35, 30); + AI_Movement_Track_Append(kActorOfficerGrayford, 35, 30); // kSetFreeSlotC AI_Movement_Track_Repeat(kActorOfficerGrayford); return false; } +#if BLADERUNNER_ORIGINAL_BUGS // fall through - // TODO bug in the game? there should be nothing track related after AI_Movement_Track_Repeat - + // bug in the game - there should be nothing track related after AI_Movement_Track_Repeat +#else + return false; // does it matter if false or true? case 9 and 10 return false +#endif // BLADERUNNER_ORIGINAL_BUGS case 9: if (Random_Query(0, 1)) { + // kSetUG09 -> kSetFreeSlotC AI_Movement_Track_Append(kActorOfficerGrayford, 433, 10); AI_Movement_Track_Append(kActorOfficerGrayford, 434, 0); AI_Movement_Track_Append(kActorOfficerGrayford, 435, 0); - AI_Movement_Track_Append(kActorOfficerGrayford, 35, 30); + AI_Movement_Track_Append(kActorOfficerGrayford, 35, 30); // kSetFreeSlotC AI_Movement_Track_Repeat(kActorOfficerGrayford); } else { + // kSetUG08 -> kSetFreeSlotC AI_Movement_Track_Append(kActorOfficerGrayford, 420, 10); AI_Movement_Track_Append(kActorOfficerGrayford, 422, 2); AI_Movement_Track_Append(kActorOfficerGrayford, 421, 1); AI_Movement_Track_Append_With_Facing(kActorOfficerGrayford, 422, 4, 182); AI_Movement_Track_Append(kActorOfficerGrayford, 420, 10); - AI_Movement_Track_Append(kActorOfficerGrayford, 35, 30); + AI_Movement_Track_Append(kActorOfficerGrayford, 35, 30); // kSetFreeSlotC AI_Movement_Track_Repeat(kActorOfficerGrayford); - // TODO bug in the game? Same code bellow looks like a case 10 and are from set 84 whereas upper one are from set 81 +#if BLADERUNNER_ORIGINAL_BUGS + // bug in the game? Same code bellow looks like a case 10 and are from set 84 whereas upper one are from set 81 AI_Movement_Track_Append(kActorOfficerGrayford, 310, 0); AI_Movement_Track_Append(kActorOfficerGrayford, 307, 0); AI_Movement_Track_Append(kActorOfficerGrayford, 309, 0); AI_Movement_Track_Append(kActorOfficerGrayford, 310, 0); - AI_Movement_Track_Append(kActorOfficerGrayford, 35, 30); + AI_Movement_Track_Append(kActorOfficerGrayford, 35, 30); // kSetFreeSlotC AI_Movement_Track_Repeat(kActorOfficerGrayford); +#endif } return false; case 10: + // kSetUG12 -> kSetFreeSlotC AI_Movement_Track_Append(kActorOfficerGrayford, 310, 0); AI_Movement_Track_Append(kActorOfficerGrayford, 307, 0); AI_Movement_Track_Append(kActorOfficerGrayford, 309, 0); AI_Movement_Track_Append(kActorOfficerGrayford, 310, 0); - AI_Movement_Track_Append(kActorOfficerGrayford, 35, 30); + AI_Movement_Track_Append(kActorOfficerGrayford, 35, 30); // kSetFreeSlotC AI_Movement_Track_Repeat(kActorOfficerGrayford); return false; } return false; - case 306: - Actor_Set_Goal_Number(kActorOfficerGrayford, 305); + case kGoalOfficerGrayfordPrepareToHuntAroundAct4: + // aux goal in order to immediately switch back to kGoalOfficerGrayfordHuntingAroundAct4 goal + // and run GoalChanged() for kGoalOfficerGrayfordHuntingAroundAct4 again + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordHuntingAroundAct4); return true; - case 307: + case kGoalOfficerGrayfordBlockingUG07: + // kSetUG07 AI_Movement_Track_Flush(kActorOfficerGrayford); AI_Movement_Track_Append_With_Facing(kActorOfficerGrayford, 419, 0, 512); AI_Movement_Track_Repeat(kActorOfficerGrayford); return true; - case 308: + case kGoalOfficerGrayfordArrestsMcCoyAct4CT12: + // kSetCT01_CT12 + // never triggered in original game AI_Movement_Track_Flush(kActorOfficerGrayford); AI_Movement_Track_Append_Run(kActorOfficerGrayford, 440, 0); AI_Movement_Track_Append_Run(kActorOfficerGrayford, 441, 0); AI_Movement_Track_Repeat(kActorOfficerGrayford); return true; - case 399: + case kGoalOfficerGrayfordArrestMcCoyInTB03Act4: + // kSetTB02_TB03 AI_Movement_Track_Flush(kActorOfficerGrayford); Actor_Put_In_Set(kActorOfficerGrayford, kSetTB02_TB03); Actor_Set_At_XYZ(kActorOfficerGrayford, -173.89f, 0.0f, 2084.22f, 859); Actor_Change_Animation_Mode(kActorOfficerGrayford, kAnimationModeCombatIdle); return true; - case 599: + case kGoalOfficerGrayfordDead: _animationState = 32; _animationFrame = Slice_Animation_Query_Number_Of_Frames(624) - 1; return true; @@ -988,8 +1040,8 @@ bool AIScriptOfficerGrayford::UpdateAnimation(int *animation, int *frame) { _animationFrame = 0; _animationState = 0; _var1 = 0; - if (Actor_Query_Goal_Number(kActorOfficerGrayford) == 101) { - Actor_Set_Goal_Number(kActorOfficerGrayford, 102); + if (Actor_Query_Goal_Number(kActorOfficerGrayford) == kGoalOfficerGrayfordArrivesToDR04) { + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordArrivedAtDR04); } } break; @@ -1156,13 +1208,14 @@ bool AIScriptOfficerGrayford::UpdateAnimation(int *animation, int *frame) { _animationFrame = 0; switch (Actor_Query_Goal_Number(kActorOfficerGrayford)) { - case 103: - case 104: - Actor_Set_Goal_Number(kActorOfficerGrayford, 105); + case kGoalOfficerGrayfordTalkToMcCoyAndReportAtDR04: + // fall through + case kGoalOfficerGrayfordPatrolsAtDR04a: + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordPatrolsAtDR04b); break; - case 105: - Actor_Set_Goal_Number(kActorOfficerGrayford, 104); + case kGoalOfficerGrayfordPatrolsAtDR04b: + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordPatrolsAtDR04a); break; } } @@ -1223,7 +1276,7 @@ bool AIScriptOfficerGrayford::ChangeAnimationMode(int mode) { break; case kAnimationModeWalk: - if (Actor_Query_Goal_Number(kActorOfficerGrayford) == 101) { + if (Actor_Query_Goal_Number(kActorOfficerGrayford) == kGoalOfficerGrayfordArrivesToDR04) { _animationState = 6; _animationFrame = 0; } else if (_animationState != 1) { @@ -1233,7 +1286,7 @@ bool AIScriptOfficerGrayford::ChangeAnimationMode(int mode) { break; case kAnimationModeRun: - if (Actor_Query_Goal_Number(kActorOfficerGrayford) == 101) { + if (Actor_Query_Goal_Number(kActorOfficerGrayford) == kGoalOfficerGrayfordArrivesToDR04) { _animationState = 5; _animationFrame = 0; } else if (_animationState != 2) { diff --git a/engines/bladerunner/script/ai/officer_leary.cpp b/engines/bladerunner/script/ai/officer_leary.cpp index 9b9fa3fabf..d803b06c31 100644 --- a/engines/bladerunner/script/ai/officer_leary.cpp +++ b/engines/bladerunner/script/ai/officer_leary.cpp @@ -45,18 +45,18 @@ void AIScriptOfficerLeary::Initialize() { bool AIScriptOfficerLeary::Update() { if (Global_Variable_Query(kVariableChapter) == 4 - && Actor_Query_Goal_Number(kActorOfficerLeary) < 300 + && Actor_Query_Goal_Number(kActorOfficerLeary) < kGoalOfficerLearyStartOfAct4 ) { AI_Movement_Track_Flush(kActorOfficerLeary); - Actor_Set_Goal_Number(kActorOfficerLeary, 300); + Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyStartOfAct4); return false; } if (Global_Variable_Query(kVariableChapter) == 5 - && Actor_Query_Goal_Number(kActorOfficerLeary) < 400 + && Actor_Query_Goal_Number(kActorOfficerLeary) < kGoalOfficerLearyStartOfAct5 ) { AI_Movement_Track_Flush(kActorOfficerLeary); - Actor_Set_Goal_Number(kActorOfficerLeary, 400); + Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyStartOfAct5); return false; } @@ -68,7 +68,7 @@ bool AIScriptOfficerLeary::Update() { && Global_Variable_Query(kVariableChapter) < 3 ) { Game_Flag_Set(kFlagRC01PoliceDone); - Actor_Set_Goal_Number(kActorOfficerLeary, 3); + Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyPoliceDoneFromRC01); return false; } @@ -96,67 +96,68 @@ bool AIScriptOfficerLeary::Update() { && !Game_Flag_Query(kFlagUG07PoliceLeave) ) { Game_Flag_Set(kFlagUG07PoliceLeave); - Actor_Set_Goal_Number(kActorOfficerLeary, 305); + Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyHuntingAroundAct4); return false; } - if (Actor_Query_Goal_Number(kActorOfficerLeary) == 310 + if (Actor_Query_Goal_Number(kActorOfficerLeary) == kGoalOfficerLearyAttackMcCoyAct4 && Actor_Query_Which_Set_In(kActorOfficerLeary) != Player_Query_Current_Set() ) { Non_Player_Actor_Combat_Mode_Off(kActorOfficerLeary); - Actor_Set_Goal_Number(kActorOfficerLeary, 305); + Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyHuntingAroundAct4); return false; } - if (Actor_Query_Goal_Number(kActorOfficerLeary) == 599 + if (Actor_Query_Goal_Number(kActorOfficerLeary) == kGoalOfficerLearyDead && Actor_Query_Which_Set_In(kActorOfficerLeary) != Player_Query_Current_Set() ) { + // dead officer gets revived and re-used Actor_Set_Health(kActorOfficerLeary, 40, 40); - Actor_Set_Goal_Number(kActorOfficerLeary, 305); + Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyHuntingAroundAct4); return false; } - if (Actor_Query_Goal_Number(kActorOfficerLeary) == 305) { + if (Actor_Query_Goal_Number(kActorOfficerLeary) == kGoalOfficerLearyHuntingAroundAct4) { switch (Actor_Query_Which_Set_In(kActorOfficerLeary)) { case kSetDR01_DR02_DR04: if (Actor_Query_Which_Set_In(kActorOfficerLeary) == Player_Query_Current_Set()) { - Actor_Set_Goal_Number(kActorOfficerLeary, 310); + Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyAttackMcCoyAct4); Non_Player_Actor_Combat_Mode_On(kActorOfficerLeary, 0, 1, kActorMcCoy, 0, 4, 7, 8, -1, -1, -1, 10, 300, 0); } break; case kSetBB01: if (Actor_Query_Which_Set_In(kActorOfficerLeary) == Player_Query_Current_Set()) { - Actor_Set_Goal_Number(kActorOfficerLeary, 310); + Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyAttackMcCoyAct4); Non_Player_Actor_Combat_Mode_On(kActorOfficerLeary, 0, 1, kActorMcCoy, 1, 4, 7, 8, -1, -1, -1, 10, 300, 0); } break; case kSetCT11: if (Actor_Query_Which_Set_In(kActorOfficerLeary) == Player_Query_Current_Set()) { - Actor_Set_Goal_Number(kActorOfficerLeary, 310); + Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyAttackMcCoyAct4); Non_Player_Actor_Combat_Mode_On(kActorOfficerLeary, 0, 1, kActorMcCoy, 5, 4, 7, 8, -1, -1, -1, 10, 300, 0); } break; case kSetMA07: if (Actor_Query_Which_Set_In(kActorOfficerLeary) == Player_Query_Current_Set()) { - Actor_Set_Goal_Number(kActorOfficerLeary, 310); + Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyAttackMcCoyAct4); Non_Player_Actor_Combat_Mode_On(kActorOfficerLeary, 0, 1, kActorMcCoy, 7, 4, 7, 8, -1, -1, -1, 10, 300, 0); } break; case kSetNR01: if (Actor_Query_Which_Set_In(kActorOfficerLeary) == Player_Query_Current_Set()) { - Actor_Set_Goal_Number(kActorOfficerLeary, 310); + Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyAttackMcCoyAct4); Non_Player_Actor_Combat_Mode_On(kActorOfficerLeary, 0, 1, kActorMcCoy, 3, 4, 7, 8, -1, -1, -1, 10, 300, 0); } break; case kSetRC03: if (Actor_Query_Which_Set_In(kActorOfficerLeary) == Player_Query_Current_Set()) { - Actor_Set_Goal_Number(kActorOfficerLeary, 310); + Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyAttackMcCoyAct4); Non_Player_Actor_Combat_Mode_On(kActorOfficerLeary, 0, 1, kActorMcCoy, 18, 4, 7, 8, -1, -1, -1, 10, 300, 0); } break; case kSetUG01: if (Actor_Query_Which_Set_In(kActorOfficerLeary) == Player_Query_Current_Set()) { - Actor_Set_Goal_Number(kActorOfficerLeary, 310); + Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyAttackMcCoyAct4); Non_Player_Actor_Combat_Mode_On(kActorOfficerLeary, 0, 1, kActorMcCoy, 11, 4, 7, 8, -1, -1, -1, 10, 300, 0); } break; @@ -164,31 +165,31 @@ bool AIScriptOfficerLeary::Update() { case kSetUG05: case kSetUG06: if (Actor_Query_Which_Set_In(kActorOfficerLeary) == Player_Query_Current_Set()) { - Actor_Set_Goal_Number(kActorOfficerLeary, 310); + Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyAttackMcCoyAct4); Non_Player_Actor_Combat_Mode_On(kActorOfficerLeary, 0, 1, kActorMcCoy, 10, 4, 7, 8, -1, -1, -1, 10, 300, 0); } break; case kSetUG08: if (Actor_Query_Which_Set_In(kActorOfficerLeary) == Player_Query_Current_Set()) { - Actor_Set_Goal_Number(kActorOfficerLeary, 310); + Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyAttackMcCoyAct4); Non_Player_Actor_Combat_Mode_On(kActorOfficerLeary, 0, 1, kActorMcCoy, 13, 4, 7, 8, -1, -1, -1, 10, 300, 0); } break; case kSetUG10: if (Actor_Query_Which_Set_In(kActorOfficerLeary) == Player_Query_Current_Set()) { - Actor_Set_Goal_Number(kActorOfficerLeary, 310); + Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyAttackMcCoyAct4); Non_Player_Actor_Combat_Mode_On(kActorOfficerLeary, 0, 1, kActorMcCoy, 14, 4, 7, 8, -1, -1, -1, 10, 300, 0); } break; case kSetUG12: if (Actor_Query_Which_Set_In(kActorOfficerLeary) == Player_Query_Current_Set()) { - Actor_Set_Goal_Number(kActorOfficerLeary, 310); + Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyAttackMcCoyAct4); Non_Player_Actor_Combat_Mode_On(kActorOfficerLeary, 0, 1, kActorMcCoy, 16, 4, 7, 8, -1, -1, -1, 10, 300, 0); } break; case kSetUG14: if (Actor_Query_Which_Set_In(kActorOfficerLeary) == Player_Query_Current_Set()) { - Actor_Set_Goal_Number(kActorOfficerLeary, 310); + Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyAttackMcCoyAct4); Non_Player_Actor_Combat_Mode_On(kActorOfficerLeary, 0, 1, kActorMcCoy, 17, 4, 7, 8, -1, -1, -1, 10, 300, 0); } break; @@ -201,8 +202,8 @@ void AIScriptOfficerLeary::TimerExpired(int timer) { if (timer == kActorTimerAIScriptCustomTask1) { AI_Countdown_Timer_Reset(kActorOfficerLeary, kActorTimerAIScriptCustomTask1); if (Actor_Query_In_Set(kActorMcCoy, kSetHF05)) { - Actor_Set_Goal_Number(kActorOfficerLeary, 430); - Actor_Set_Goal_Number(kActorOfficerGrayford, 430); + Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyPoliceAboutToAttackHF05); + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordPoliceAboutToAttackHF05); } else { Game_Flag_Set(kFlagHF05PoliceAttacked); } @@ -231,14 +232,16 @@ void AIScriptOfficerLeary::CompletedMovementTrack() { if (goal > 308) { return; } - if (goal == 305) { - Actor_Set_Goal_Number(kActorOfficerLeary, 306); + if (goal == kGoalOfficerLearyHuntingAroundAct4) { + Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyPrepareToHuntAroundAct4); return; } - if (goal == 307) { + if (goal == kGoalOfficerLearyBlockingUG07) { + // UG07 before McCoy visits his apartment in Act 4 Non_Player_Actor_Combat_Mode_On(kActorOfficerLeary, 0, 1, kActorMcCoy, 12, kAnimationModeCombatIdle, kAnimationModeCombatWalk, kAnimationModeCombatRun, 0, -1, -1, 15, 300, 0); } if (goal == 308) { + // goal 308 (and 309) are never triggered in the original code Actor_Change_Animation_Mode(kActorOfficerLeary, 4); Actor_Face_Actor(kActorOfficerLeary, kActorMcCoy, true); Actor_Set_Goal_Number(kActorOfficerLeary, 309); @@ -246,10 +249,10 @@ void AIScriptOfficerLeary::CompletedMovementTrack() { } void AIScriptOfficerLeary::ReceivedClue(int clueId, int fromActorId) { - if (clueId == 222) { + if (clueId == kClueMcCoyRetiredZuben) { Actor_Modify_Friendliness_To_Other(kActorOfficerLeary, kActorMcCoy, 5); } - if (clueId == 215) { + if (clueId == kClueMcCoyLetZubenEscape) { Actor_Modify_Friendliness_To_Other(kActorOfficerLeary, kActorMcCoy, -4); } } @@ -267,14 +270,15 @@ void AIScriptOfficerLeary::OtherAgentEnteredCombatMode(int otherActorId, int com void AIScriptOfficerLeary::ShotAtAndMissed() {} bool AIScriptOfficerLeary::ShotAtAndHit() { - if (Actor_Query_Goal_Number(kActorOfficerLeary) == 307) { + // Leary is invincible while blocking the UG07 (before McCoy visits his apartment in Act 4) + if (Actor_Query_Goal_Number(kActorOfficerLeary) == kGoalOfficerLearyBlockingUG07) { Actor_Set_Health(kActorOfficerLeary, 50, 50); } return false; } void AIScriptOfficerLeary::Retired(int byActorId) { - Actor_Set_Goal_Number(kActorOfficerLeary, 599); + Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyDead); Game_Flag_Set(kFlagMcCoyRetiredHuman); } @@ -283,27 +287,27 @@ int AIScriptOfficerLeary::GetFriendlinessModifierIfGetsClue(int otherActorId, in return 0; } switch (clueId) { - case 242: + case kClueMcCoyIsInsane: return -6; - case 240: + case kClueMcCoyIsAnnoying: return -2; - case 239: + case kClueMcCoyIsStupid: return -5; - case 228: + case kClueMcCoyRetiredLutherLance: return 2; - case 227: + case kClueMcCoyShotZubenInTheBack: return 4; - case 226: + case kClueMcCoyRetiredSadik: return 4; - case 225: + case kClueMcCoyRetiredGordo: return 3; - case 224: + case kClueMcCoyRetiredDektora: return 3; - case 223: + case kClueMcCoyRetiredLucy: return 2; - case 222: + case kClueMcCoyRetiredZuben: return 3; - case 215: + case kClueMcCoyLetZubenEscape: return -5; } return 0; @@ -312,6 +316,7 @@ int AIScriptOfficerLeary::GetFriendlinessModifierIfGetsClue(int otherActorId, in bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber) { switch (newGoalNumber) { case kGoalOfficerLearyRC01WalkToCrowd: + // kSetRC01 AI_Movement_Track_Flush(kActorOfficerLeary); if (Random_Query(1, 2) == 1) { AI_Movement_Track_Append(kActorOfficerLeary, 57, 7); @@ -344,10 +349,11 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber) Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyDefault); } return true; - case 3: + case kGoalOfficerLearyPoliceDoneFromRC01: + // kSetFreeSlotG -> kSetFreeSlotC AI_Movement_Track_Flush(kActorOfficerLeary); - AI_Movement_Track_Append(kActorOfficerLeary, 39, Random_Query(120, 240)); - AI_Movement_Track_Append(kActorOfficerLeary, 35, 0); + AI_Movement_Track_Append(kActorOfficerLeary, 39, Random_Query(120, 240)); // kSetFreeSlotG + AI_Movement_Track_Append(kActorOfficerLeary, 35, 0); // kSetFreeSlotC AI_Movement_Track_Repeat(kActorOfficerLeary); return true; #if BLADERUNNER_ORIGINAL_BUGS @@ -357,22 +363,25 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber) AI_Countdown_Timer_Start(kActorOfficerLeary, kActorTimerAIScriptCustomTask0, 4); // wait a few seconds before starting taking notes again return true; #endif // BLADERUNNER_ORIGINAL_BUGS - case 99: + case kGoalOfficerLearyEndOfAct1: AI_Movement_Track_Flush(kActorOfficerLeary); return false; - case 102: + case kGoalOfficerLearyVisitsBulletBob: + // kSetRC04 + // Leary visits Bullet Bob shop - un-triggered AI_Movement_Track_Flush(kActorOfficerLeary); AI_Movement_Track_Append(kActorOfficerLeary, 107, 0); AI_Movement_Track_Append(kActorOfficerLeary, 108, 0); AI_Movement_Track_Repeat(kActorOfficerLeary); return true; - case 300: - Actor_Set_Goal_Number(kActorOfficerLeary, 305); + case kGoalOfficerLearyStartOfAct4: + Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyHuntingAroundAct4); return true; - case 305: + case kGoalOfficerLearyHuntingAroundAct4: AI_Movement_Track_Flush(kActorOfficerLeary); switch (Random_Query(1, 10)) { case 1: + // kSetNR01 AI_Movement_Track_Append(kActorOfficerLeary, 398, 15); AI_Movement_Track_Append(kActorOfficerLeary, 399, 0); AI_Movement_Track_Append(kActorOfficerLeary, 400, 0); @@ -383,6 +392,7 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber) AI_Movement_Track_Repeat(kActorOfficerLeary); break; case 2: + // kSetCT11 AI_Movement_Track_Append(kActorOfficerLeary, 385, 10); AI_Movement_Track_Append(kActorOfficerLeary, 242, 2); AI_Movement_Track_Append(kActorOfficerLeary, 386, 2); @@ -390,6 +400,7 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber) AI_Movement_Track_Repeat(kActorOfficerLeary); break; case 3: + // kSetDR01_DR02_DR04 AI_Movement_Track_Append(kActorOfficerLeary, 390, 10); AI_Movement_Track_Append(kActorOfficerLeary, 391, 0); AI_Movement_Track_Append(kActorOfficerLeary, 392, 5); @@ -398,21 +409,24 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber) AI_Movement_Track_Repeat(kActorOfficerLeary); break; case 4: + // kSetRC03 -> kSetFreeSlotC AI_Movement_Track_Append(kActorOfficerLeary, 381, 15); AI_Movement_Track_Append(kActorOfficerLeary, 382, 0); AI_Movement_Track_Append(kActorOfficerLeary, 383, 15); AI_Movement_Track_Append(kActorOfficerLeary, 382, 3); AI_Movement_Track_Append(kActorOfficerLeary, 384, 0); - AI_Movement_Track_Append(kActorOfficerLeary, 35, 30); + AI_Movement_Track_Append(kActorOfficerLeary, 35, 30); // kSetFreeSlotC AI_Movement_Track_Repeat(kActorOfficerLeary); break; case 5: + // kSetBB01 -> kSetFreeSlotC AI_Movement_Track_Append(kActorOfficerLeary, 388, 10); AI_Movement_Track_Append(kActorOfficerLeary, 389, 10); - AI_Movement_Track_Append(kActorOfficerLeary, 35, 30); + AI_Movement_Track_Append(kActorOfficerLeary, 35, 30); // kSetFreeSlotC AI_Movement_Track_Repeat(kActorOfficerLeary); break; case 6: + // kSetCT11 - identical to case 2 AI_Movement_Track_Append(kActorOfficerLeary, 385, 10); AI_Movement_Track_Append(kActorOfficerLeary, 242, 2); AI_Movement_Track_Append(kActorOfficerLeary, 386, 2); @@ -424,6 +438,7 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber) // When the police officer is there as well he will kill McCoy because player cannot control him. case 7: + // kSetMA07 -> kSetFreeSlotC AI_Movement_Track_Append(kActorOfficerLeary, 394, 15); AI_Movement_Track_Append(kActorOfficerLeary, 395, 0); AI_Movement_Track_Append(kActorOfficerLeary, 396, 0); @@ -431,23 +446,29 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber) AI_Movement_Track_Append(kActorOfficerLeary, 396, 0); AI_Movement_Track_Append(kActorOfficerLeary, 395, 0); AI_Movement_Track_Append(kActorOfficerLeary, 430, 15); - AI_Movement_Track_Append(kActorOfficerLeary, 35, 30); + AI_Movement_Track_Append(kActorOfficerLeary, 35, 30); // kSetFreeSlotC AI_Movement_Track_Repeat(kActorOfficerLeary); break; #else case 7: - // fall through -#endif + // kSetFreeSlotC + // just put him away for a few seconds + AI_Movement_Track_Append(kActorOfficerLeary, 35, 30); // kSetFreeSlotC + AI_Movement_Track_Repeat(kActorOfficerLeary); + break; +#endif // BLADERUNNER_ORIGINAL_BUGS case 8: switch (Random_Query(1, 7)) { case 1: + // kSetUG10 -> kSetFreeSlotC AI_Movement_Track_Append(kActorOfficerLeary, 302, 0); AI_Movement_Track_Append(kActorOfficerLeary, 407, 0); AI_Movement_Track_Append(kActorOfficerLeary, 408, 0); - AI_Movement_Track_Append(kActorOfficerLeary, 35, 30); + AI_Movement_Track_Append(kActorOfficerLeary, 35, 30); // kSetFreeSlotC AI_Movement_Track_Repeat(kActorOfficerLeary); break; case 2: + // kSetUG14 AI_Movement_Track_Append(kActorOfficerLeary, 536, 0); AI_Movement_Track_Append(kActorOfficerLeary, 537, 0); AI_Movement_Track_Append(kActorOfficerLeary, 538, 1); @@ -456,110 +477,134 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber) AI_Movement_Track_Repeat(kActorOfficerLeary); break; case 3: + // kSetUG04 -> kSetFreeSlotC AI_Movement_Track_Append(kActorOfficerLeary, 296, 10); AI_Movement_Track_Append(kActorOfficerLeary, 409, 2); AI_Movement_Track_Append(kActorOfficerLeary, 296, 10); - AI_Movement_Track_Append(kActorOfficerLeary, 35, 30); + AI_Movement_Track_Append(kActorOfficerLeary, 35, 30); // kSetFreeSlotC AI_Movement_Track_Repeat(kActorOfficerLeary); break; case 4: + // kSetUG05 -> kSetFreeSlotC AI_Movement_Track_Append(kActorOfficerLeary, 411, 10); AI_Movement_Track_Append(kActorOfficerLeary, 412, 5); AI_Movement_Track_Append(kActorOfficerLeary, 411, 0); - AI_Movement_Track_Append(kActorOfficerLeary, 35, 30); + AI_Movement_Track_Append(kActorOfficerLeary, 35, 30); // kSetFreeSlotC AI_Movement_Track_Repeat(kActorOfficerLeary); break; case 5: + // kSetUG06 -> kSetFreeSlotC AI_Movement_Track_Append(kActorOfficerLeary, 413, 10); AI_Movement_Track_Append(kActorOfficerLeary, 414, 0); AI_Movement_Track_Append_With_Facing(kActorOfficerLeary, 431, 0, 1017); AI_Movement_Track_Append(kActorOfficerLeary, 432, 10); - AI_Movement_Track_Append(kActorOfficerLeary, 35, 30); + AI_Movement_Track_Append(kActorOfficerLeary, 35, 30); // kSetFreeSlotC AI_Movement_Track_Repeat(kActorOfficerLeary); break; case 6: + // kSetUG07 -> kSetFreeSlotC AI_Movement_Track_Append(kActorOfficerLeary, 415, 0); AI_Movement_Track_Append_With_Facing(kActorOfficerLeary, 416, 0, 620); AI_Movement_Track_Append(kActorOfficerLeary, 417, 0); AI_Movement_Track_Append(kActorOfficerLeary, 418, 0); - AI_Movement_Track_Append(kActorOfficerLeary, 35, 30); + AI_Movement_Track_Append(kActorOfficerLeary, 35, 30); // kSetFreeSlotC AI_Movement_Track_Repeat(kActorOfficerLeary); break; case 7: + // kSetUG01 -> kSetFreeSlotC AI_Movement_Track_Append(kActorOfficerLeary, 405, 10); AI_Movement_Track_Append(kActorOfficerLeary, 406, 0); - AI_Movement_Track_Append(kActorOfficerLeary, 35, 30); + AI_Movement_Track_Append(kActorOfficerLeary, 35, 30); // kSetFreeSlotC AI_Movement_Track_Repeat(kActorOfficerLeary); return false; default: return false; } - // is falling through here - a bug in original game? - // fall through +#if BLADERUNNER_ORIGINAL_BUGS + // fall through - a bug in original game +#else + break; +#endif // BLADERUNNER_ORIGINAL_BUGS case 9: - if (Random_Query(1, 2) - 1 == 1) { + if (Random_Query(1, 2) == 2) { + // kSetUG09 -> kSetFreeSlotC AI_Movement_Track_Append(kActorOfficerLeary, 433, 10); AI_Movement_Track_Append(kActorOfficerLeary, 434, 0); AI_Movement_Track_Append(kActorOfficerLeary, 435, 0); - AI_Movement_Track_Append(kActorOfficerLeary, 35, 30); + AI_Movement_Track_Append(kActorOfficerLeary, 35, 30); // kSetFreeSlotC AI_Movement_Track_Repeat(kActorOfficerLeary); return false; } + // kSetUG08 -> kSetFreeSlotC AI_Movement_Track_Append(kActorOfficerLeary, 420, 10); AI_Movement_Track_Append(kActorOfficerLeary, 422, 2); AI_Movement_Track_Append(kActorOfficerLeary, 421, 1); AI_Movement_Track_Append_With_Facing(kActorOfficerLeary, 422, 4, 182); AI_Movement_Track_Append(kActorOfficerLeary, 420, 10); - AI_Movement_Track_Append(kActorOfficerLeary, 35, 30); + AI_Movement_Track_Append(kActorOfficerLeary, 35, 30); // kSetFreeSlotC AI_Movement_Track_Repeat(kActorOfficerLeary); - // is falling through here - a bug in original game? - // fall through +#if BLADERUNNER_ORIGINAL_BUGS + // fall through - a bug in original game +#else + return false; +#endif // BLADERUNNER_ORIGINAL_BUGS case 10: + // kSetUG12 -> kSetFreeSlotC AI_Movement_Track_Append(kActorOfficerLeary, 310, 0); AI_Movement_Track_Append(kActorOfficerLeary, 307, 0); AI_Movement_Track_Append(kActorOfficerLeary, 309, 0); AI_Movement_Track_Append(kActorOfficerLeary, 310, 0); - AI_Movement_Track_Append(kActorOfficerLeary, 35, 30); + AI_Movement_Track_Append(kActorOfficerLeary, 35, 30); // kSetFreeSlotC AI_Movement_Track_Repeat(kActorOfficerLeary); return false; default: return false; } - // fall through - case 306: - Actor_Set_Goal_Number(kActorOfficerLeary, 305); +#if BLADERUNNER_ORIGINAL_BUGS + // fall through - a bug in original game +#else + return false; +#endif // BLADERUNNER_ORIGINAL_BUGS + case kGoalOfficerLearyPrepareToHuntAroundAct4: + // aux goal in order to immediately switch back to kGoalOfficerLearyHuntingAroundAct4 goal + // and run GoalChanged() for kGoalOfficerLearyHuntingAroundAct4 again + Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyHuntingAroundAct4); return true; - case 307: + case kGoalOfficerLearyBlockingUG07: + // kSetUG07 AI_Movement_Track_Flush(kActorOfficerLeary); AI_Movement_Track_Append_With_Facing(kActorOfficerLeary, 416, 0, 556); Actor_Change_Animation_Mode(kActorOfficerLeary, 4); AI_Movement_Track_Repeat(kActorOfficerLeary); return true; case 308: + // kSetCT01_CT12 + // never triggered - TODO a bug? Could be related to cut McCoy's arrest from Grayford AI_Movement_Track_Flush(kActorOfficerLeary); AI_Movement_Track_Append_Run_With_Facing(kActorOfficerLeary, 440, 2, 355); AI_Movement_Track_Append_Run_With_Facing(kActorOfficerLeary, 441, 0, 825); AI_Movement_Track_Repeat(kActorOfficerLeary); return true; - case 400: + case kGoalOfficerLearyStartOfAct5: + // kSetFreeSlotC AI_Movement_Track_Flush(kActorOfficerLeary); - AI_Movement_Track_Append(kActorOfficerLeary, 35, 0); + AI_Movement_Track_Append(kActorOfficerLeary, 35, 0); // kSetFreeSlotC AI_Movement_Track_Repeat(kActorOfficerLeary); - Actor_Set_Goal_Number(kActorOfficerLeary, 410); + Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyDummyGoalAct5); return true; - case 420: + case kGoalOfficerLearyPoliceWait120SecondsToAttackHF05: AI_Countdown_Timer_Reset(kActorOfficerLeary, kActorTimerAIScriptCustomTask1); AI_Countdown_Timer_Start(kActorOfficerLeary, kActorTimerAIScriptCustomTask1, 120); - Actor_Set_Goal_Number(kActorOfficerLeary, 410); + Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyDummyGoalAct5); return true; - case 425: + case kGoalOfficerLearyPoliceWait60SecondsToAttackHF05: AI_Countdown_Timer_Reset(kActorOfficerLeary, kActorTimerAIScriptCustomTask1); AI_Countdown_Timer_Start(kActorOfficerLeary, kActorTimerAIScriptCustomTask1, 60); - Actor_Set_Goal_Number(kActorOfficerLeary, 410); + Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyDummyGoalAct5); return true; - case 430: - Actor_Set_Goal_Number(kActorOfficerLeary, 410); - Actor_Set_Goal_Number(kActorOfficerGrayford, 410); + case kGoalOfficerLearyPoliceAboutToAttackHF05: + Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyDummyGoalAct5); + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordDummyGoalAct5); return false; default: return false; @@ -1252,6 +1297,7 @@ void AIScriptOfficerLeary::SetAnimationState(int animationState, int animationFr bool AIScriptOfficerLeary::ReachedMovementTrackWaypoint(int waypointId) { if (waypointId == 57 || waypointId == 58) { + // Interrogating crowd in kSetRC01 Game_Flag_Set(kFlagOfficerLearyTakingNotes); AI_Countdown_Timer_Reset(kActorOfficerLeary, kActorTimerAIScriptCustomTask2); AI_Countdown_Timer_Start(kActorOfficerLeary, kActorTimerAIScriptCustomTask2, 6); @@ -1260,7 +1306,7 @@ bool AIScriptOfficerLeary::ReachedMovementTrackWaypoint(int waypointId) { } void AIScriptOfficerLeary::FledCombat() { - Actor_Set_Goal_Number(kActorOfficerLeary, 300); + Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyStartOfAct4); } } // End of namespace BladeRunner diff --git a/engines/bladerunner/script/init_script.cpp b/engines/bladerunner/script/init_script.cpp index aa16a3b83e..32ad965e31 100644 --- a/engines/bladerunner/script/init_script.cpp +++ b/engines/bladerunner/script/init_script.cpp @@ -2978,123 +2978,123 @@ void InitScript::Init_Actor_Health() { } void InitScript::Init_Combat_Cover_Waypoints() { - Combat_Cover_Waypoint_Set_Data(0, 0, 7, 25, -603.0f, 0.0f, 32.0f); - Combat_Cover_Waypoint_Set_Data(1, 0, 7, 25, -670.0f, 0.0f, -24.0f); - Combat_Cover_Waypoint_Set_Data(2, 0, 7, 25, -604.0f, 0.0f, -96.0f); - Combat_Cover_Waypoint_Set_Data(3, 0, 7, 25, -490.0f, 0.0f, -20.0f); - Combat_Cover_Waypoint_Set_Data(4, 0, 7, 25, -667.0f, 0.0f, -164.0f); - Combat_Cover_Waypoint_Set_Data(5, 0, 7, 25, -606.0f, 0.0f, -222.0f); - Combat_Cover_Waypoint_Set_Data(6, 0, 7, 25, -534.0f, 0.0f, -170.0f); - Combat_Cover_Waypoint_Set_Data(7, 3, 54, 54, 76.06f, 23.83f, -1058.49f); - Combat_Cover_Waypoint_Set_Data(8, 3, 54, 54, -335.94f, 31.55f, -1406.49f); - Combat_Cover_Waypoint_Set_Data(9, 15, 42, 39, 286.0f, 367.93f, 330.0f); - Combat_Cover_Waypoint_Set_Data(10, 15, 42, 39, -58.0f, 367.93f, 294.0f); - Combat_Cover_Waypoint_Set_Data(11, 4, 37, 34, -30.0f, 8.0f, -759.0f); - Combat_Cover_Waypoint_Set_Data(12, 4, 37, 34, -93.0f, 8.0f, -693.0f); - Combat_Cover_Waypoint_Set_Data(13, 4, 37, 34, -6.0f, 8.0f, -607.0f); - Combat_Cover_Waypoint_Set_Data(14, 4, 37, 34, 78.0f, 8.0f, -687.0f); - Combat_Cover_Waypoint_Set_Data(15, 4, 37, 34, 262.0f, 8.0f, -683.0f); - Combat_Cover_Waypoint_Set_Data(16, 4, 37, 34, 334.0f, 8.0f, -607.0f); - Combat_Cover_Waypoint_Set_Data(17, 4, 37, 34, 426.0f, 8.0f, -679.0f); - Combat_Cover_Waypoint_Set_Data(18, 5, 4, 24, -318.0f, -6.5f, 1117.0f); - Combat_Cover_Waypoint_Set_Data(19, 5, 4, 24, -330.0f, -6.5f, 981.0f); - Combat_Cover_Waypoint_Set_Data(20, 5, 4, 24, -294.0f, -6.5f, 725.0f); - Combat_Cover_Waypoint_Set_Data(21, 16, 84, 96, 380.0f, -126.21f, 198.0f); - Combat_Cover_Waypoint_Set_Data(22, 16, 84, 96, 364.0f, -126.21f, -66.0f); - Combat_Cover_Waypoint_Set_Data(23, 18, 70, 80, 8.0f, 1.72f, 8.0f); - Combat_Cover_Waypoint_Set_Data(24, 18, 70, 80, 188.0f, 1.72f, 92.0f); - Combat_Cover_Waypoint_Set_Data(25, 18, 70, 80, 216.0f, -4.01f, 196.0f); - Combat_Cover_Waypoint_Set_Data(26, 18, 70, 80, -420.0f, 1.72f, 100.0f); - Combat_Cover_Waypoint_Set_Data(27, 18, 70, 80, -672.0f, 1.72f, -44.0f); - Combat_Cover_Waypoint_Set_Data(28, 10, 78, 90, -128.77f, -5.21f, -435.0f); - Combat_Cover_Waypoint_Set_Data(29, 10, 78, 90, -20.77f, 0.81f, -199.0f); - Combat_Cover_Waypoint_Set_Data(30, 10, 77, 89, -216.0f, 39.15f, -819.0f); - Combat_Cover_Waypoint_Set_Data(31, 10, 77, 89, 144.0f, -1.74f, -1015.0f); - Combat_Cover_Waypoint_Set_Data(32, 10, 77, 89, 152.0f, 4.14f, -811.0f); - Combat_Cover_Waypoint_Set_Data(33, 10, 79, 91, -121.0f, 0.0f, -39.0f); - Combat_Cover_Waypoint_Set_Data(34, 10, 80, 92, 86.0f, -12.21f, -278.0f); - Combat_Cover_Waypoint_Set_Data(35, 20, 41, 38, 407.82f, 40.63f, 95.25f); - Combat_Cover_Waypoint_Set_Data(36, 20, 41, 38, 357.81f, 40.63f, 387.9f); + Combat_Cover_Waypoint_Set_Data( 0, 0, kSetDR01_DR02_DR04, kSceneDR01, -603.0f, 0.0f, 32.0f); + Combat_Cover_Waypoint_Set_Data( 1, 0, kSetDR01_DR02_DR04, kSceneDR01, -670.0f, 0.0f, -24.0f); + Combat_Cover_Waypoint_Set_Data( 2, 0, kSetDR01_DR02_DR04, kSceneDR01, -604.0f, 0.0f, -96.0f); + Combat_Cover_Waypoint_Set_Data( 3, 0, kSetDR01_DR02_DR04, kSceneDR01, -490.0f, 0.0f, -20.0f); + Combat_Cover_Waypoint_Set_Data( 4, 0, kSetDR01_DR02_DR04, kSceneDR01, -667.0f, 0.0f, -164.0f); + Combat_Cover_Waypoint_Set_Data( 5, 0, kSetDR01_DR02_DR04, kSceneDR01, -606.0f, 0.0f, -222.0f); + Combat_Cover_Waypoint_Set_Data( 6, 0, kSetDR01_DR02_DR04, kSceneDR01, -534.0f, 0.0f, -170.0f); + Combat_Cover_Waypoint_Set_Data( 7, 3, kSetNR01, kSceneNR01, 76.06f, 23.83f, -1058.49f); + Combat_Cover_Waypoint_Set_Data( 8, 3, kSetNR01, kSceneNR01, -335.94f, 31.55f, -1406.49f); + Combat_Cover_Waypoint_Set_Data( 9, 15, kSetHF06, kSceneHF06, 286.0f, 367.93f, 330.0f); + Combat_Cover_Waypoint_Set_Data(10, 15, kSetHF06, kSceneHF06, -58.0f, 367.93f, 294.0f); + Combat_Cover_Waypoint_Set_Data(11, 4, kSetHF01, kSceneHF01, -30.0f, 8.0f, -759.0f); + Combat_Cover_Waypoint_Set_Data(12, 4, kSetHF01, kSceneHF01, -93.0f, 8.0f, -693.0f); + Combat_Cover_Waypoint_Set_Data(13, 4, kSetHF01, kSceneHF01, -6.0f, 8.0f, -607.0f); + Combat_Cover_Waypoint_Set_Data(14, 4, kSetHF01, kSceneHF01, 78.0f, 8.0f, -687.0f); + Combat_Cover_Waypoint_Set_Data(15, 4, kSetHF01, kSceneHF01, 262.0f, 8.0f, -683.0f); + Combat_Cover_Waypoint_Set_Data(16, 4, kSetHF01, kSceneHF01, 334.0f, 8.0f, -607.0f); + Combat_Cover_Waypoint_Set_Data(17, 4, kSetHF01, kSceneHF01, 426.0f, 8.0f, -679.0f); + Combat_Cover_Waypoint_Set_Data(18, 5, kSetCT01_CT12, kSceneCT12, -318.0f, -6.5f, 1117.0f); + Combat_Cover_Waypoint_Set_Data(19, 5, kSetCT01_CT12, kSceneCT12, -330.0f, -6.5f, 981.0f); + Combat_Cover_Waypoint_Set_Data(20, 5, kSetCT01_CT12, kSceneCT12, -294.0f, -6.5f, 725.0f); + Combat_Cover_Waypoint_Set_Data(21, 16, kSetUG12, kSceneUG12, 380.0f, -126.21f, 198.0f); + Combat_Cover_Waypoint_Set_Data(22, 16, kSetUG12, kSceneUG12, 364.0f, -126.21f, -66.0f); + Combat_Cover_Waypoint_Set_Data(23, 18, kSetRC03, kSceneRC03, 8.0f, 1.72f, 8.0f); + Combat_Cover_Waypoint_Set_Data(24, 18, kSetRC03, kSceneRC03, 188.0f, 1.72f, 92.0f); + Combat_Cover_Waypoint_Set_Data(25, 18, kSetRC03, kSceneRC03, 216.0f, -4.01f, 196.0f); + Combat_Cover_Waypoint_Set_Data(26, 18, kSetRC03, kSceneRC03, -420.0f, 1.72f, 100.0f); + Combat_Cover_Waypoint_Set_Data(27, 18, kSetRC03, kSceneRC03, -672.0f, 1.72f, -44.0f); + Combat_Cover_Waypoint_Set_Data(28, 10, kSetUG05, kSceneUG05, -128.77f, -5.21f, -435.0f); + Combat_Cover_Waypoint_Set_Data(29, 10, kSetUG05, kSceneUG05, -20.77f, 0.81f, -199.0f); + Combat_Cover_Waypoint_Set_Data(30, 10, kSetUG04, kSceneUG04, -216.0f, 39.15f, -819.0f); + Combat_Cover_Waypoint_Set_Data(31, 10, kSetUG04, kSceneUG04, 144.0f, -1.74f, -1015.0f); + Combat_Cover_Waypoint_Set_Data(32, 10, kSetUG04, kSceneUG04, 152.0f, 4.14f, -811.0f); + Combat_Cover_Waypoint_Set_Data(33, 10, kSetUG06, kSceneUG06, -121.0f, 0.0f, -39.0f); + Combat_Cover_Waypoint_Set_Data(34, 10, kSetUG07, kSceneUG07, 86.0f, -12.21f, -278.0f); + Combat_Cover_Waypoint_Set_Data(35, 20, kSetHF05, kSceneHF05, 407.82f, 40.63f, 95.25f); + Combat_Cover_Waypoint_Set_Data(36, 20, kSetHF05, kSceneHF05, 357.81f, 40.63f, 387.9f); } void InitScript::Init_Combat_Flee_Waypoints() { - Combat_Flee_Waypoint_Set_Data(0, 4, 37, 34, 187.0f, 8.0f, -197.0f, -1); - Combat_Flee_Waypoint_Set_Data(1, 4, 37, 34, 454.0f, 8.0f, -717.0f, -1); - Combat_Flee_Waypoint_Set_Data(2, 4, 38, 35, -10.87f, 47.76f, -141.32f, -1); - Combat_Flee_Waypoint_Set_Data(3, 4, 38, 35, 466.0f, 47.76f, -532.0f, -1); - Combat_Flee_Waypoint_Set_Data(4, 4, 39, 36, 199.0f, 47.76f, -880.0f, -1); - Combat_Flee_Waypoint_Set_Data(5, 4, 39, 36, 594.0f, 47.76f, -1141.0f, -1); - Combat_Flee_Waypoint_Set_Data(6, 4, 39, 36, 912.0f, 47.76f, -447.0f, -1); - Combat_Flee_Waypoint_Set_Data(7, 4, 39, 36, 492.0f, 47.76f, -459.0f, -1); - Combat_Flee_Waypoint_Set_Data(8, 1, 20, 2, 271.0f, 0.0f, 1038.0f, -1); - Combat_Flee_Waypoint_Set_Data(9, 1, 20, 2, -175.0f, 9.04f, 8.59f, -1); - Combat_Flee_Waypoint_Set_Data(10, 1, 20, 2, -343.05f, 9.04f, 260.0f, -1); - Combat_Flee_Waypoint_Set_Data(11, 0, 7, 25, -443.0f, -0.04f, -180.0f, -1); - Combat_Flee_Waypoint_Set_Data(12, 0, 7, 26, -1485.0f, 6.98f, -393.0f, -1); - Combat_Flee_Waypoint_Set_Data(13, 0, 7, 28, -652.0f, 7.18f, 354.0f, -1); - Combat_Flee_Waypoint_Set_Data(14, 6, 49, 48, 25.0f, 0.0f, -314.0f, -1); - Combat_Flee_Waypoint_Set_Data(15, 6, 49, 48, 980.0f, 0.0f, 189.0f, -1); - Combat_Flee_Waypoint_Set_Data(16, 6, 49, 48, 601.0f, 0.0f, -1641.0f, -1); - Combat_Flee_Waypoint_Set_Data(17, 12, 80, 92, 218.0f, -12.21f, -290.0f, -1); - Combat_Flee_Waypoint_Set_Data(18, 12, 80, 92, -150.0f, -12.21f, -962.0f, -1); - Combat_Flee_Waypoint_Set_Data(19, 13, 81, 93, -524.0f, 0.0f, -172.0f, -1); - Combat_Flee_Waypoint_Set_Data(20, 13, 81, 93, -427.0f, 0.0f, 199.0f, -1); - Combat_Flee_Waypoint_Set_Data(21, 13, 81, 93, -121.0f, 0.0f, -145.0f, -1); - Combat_Flee_Waypoint_Set_Data(22, 14, 83, 95, 2.0f, 1.15f, 412.0f, -1); - Combat_Flee_Waypoint_Set_Data(23, 14, 83, 95, -327.0f, 1.15f, -384.0f, -1); - Combat_Flee_Waypoint_Set_Data(24, 14, 83, 95, -253.0f, 81.33f, -620.0f, -1); - Combat_Flee_Waypoint_Set_Data(25, 5, 28, 17, -518.52f, -109.91f, 312.0f, -1); - Combat_Flee_Waypoint_Set_Data(26, 5, 28, 17, 141.0f, -109.91f, 452.0f, -1); - Combat_Flee_Waypoint_Set_Data(27, 5, 33, 23, 516.0f, 0.56f, 779.0f, -1); - Combat_Flee_Waypoint_Set_Data(28, 5, 33, 23, 388.0f, 9.68f, 190.0f, -1); - Combat_Flee_Waypoint_Set_Data(29, 5, 33, 23, -429.0f, 9.68f, -115.0f, -1); - Combat_Flee_Waypoint_Set_Data(30, 7, 68, 77, -997.0f, 508.14f, -630.84f, -1); - Combat_Flee_Waypoint_Set_Data(31, 7, 68, 77, -416.27f, 508.14f, -574.84f, -1); - Combat_Flee_Waypoint_Set_Data(32, 7, 68, 77, -416.0f, 508.14f, -906.84f, -1); - Combat_Flee_Waypoint_Set_Data(33, 7, 68, 77, -1168.0f, 508.14f, -1666.84f, -1); - Combat_Flee_Waypoint_Set_Data(34, 10, 79, 91, 75.0f, 153.0f, -485.0f, -1); - Combat_Flee_Waypoint_Set_Data(35, 10, 79, 91, -18.0f, 0.0f, 321.0f, -1); - Combat_Flee_Waypoint_Set_Data(36, 11, 74, 86, -190.0f, -50.13f, -298.0f, -1); - Combat_Flee_Waypoint_Set_Data(37, 11, 74, 86, 126.0f, -50.13f, -150.0f, -1); - Combat_Flee_Waypoint_Set_Data(38, 11, 74, 86, 187.78f, -50.13f, -1262.0f, -1); - Combat_Flee_Waypoint_Set_Data(39, 11, 74, 86, -20.22f, -30.13f, -2338.3f, -1); - Combat_Flee_Waypoint_Set_Data(40, 3, 54, 54, -416.0f, 31.55f, -829.0f, -1); - Combat_Flee_Waypoint_Set_Data(41, 3, 54, 54, -412.0f, 31.55f, -1357.0f, -1); - Combat_Flee_Waypoint_Set_Data(42, 3, 54, 54, -208.0f, 23.0f, -1693.0f, -1); - Combat_Flee_Waypoint_Set_Data(43, 3, 54, 54, -64.0f, 23.83f, -2097.0f, -1); - Combat_Flee_Waypoint_Set_Data(44, 3, 54, 54, 320.0f, 23.83f, -1058.49f, -1); - Combat_Flee_Waypoint_Set_Data(45, 3, 54, 54, 252.0f, 31.65f, -674.49f, -1); - Combat_Flee_Waypoint_Set_Data(46, 8, 45, 42, -803.0f, -615.49f, 2619.0f, -1); - Combat_Flee_Waypoint_Set_Data(47, 8, 45, 42, -1027.0f, -614.49f, 3151.24f, -1); - Combat_Flee_Waypoint_Set_Data(48, 9, 9, 45, -1190.0f, 0.0f, 876.0f, -1); - Combat_Flee_Waypoint_Set_Data(49, 9, 9, 45, -687.0f, 0.0f, 910.0f, -1); - Combat_Flee_Waypoint_Set_Data(50, 9, 9, 46, -455.0f, 8.26f, -453.26f, -1); - Combat_Flee_Waypoint_Set_Data(51, 9, 9, 46, -1127.0f, 8.26f, -705.26f, -1); - Combat_Flee_Waypoint_Set_Data(52, 9, 9, 46, -1143.0f, 8.26f, -261.26f, -1); - Combat_Flee_Waypoint_Set_Data(53, 9, 9, 46, -703.0f, 8.26f, -157.26f, -1); - Combat_Flee_Waypoint_Set_Data(54, 10, 77, 89, 166.0f, 11.87f, -250.8f, -1); - Combat_Flee_Waypoint_Set_Data(55, 10, 77, 89, 158.0f, 4.14f, -10.8f, -1); - Combat_Flee_Waypoint_Set_Data(56, 10, 77, 89, -310.0f, 39.15f, -822.0f, -1); - Combat_Flee_Waypoint_Set_Data(57, 10, 77, 89, -302.0f, -1.74f, -5847.0f, -1); - Combat_Flee_Waypoint_Set_Data(58, 10, 78, 90, 4.0f, 1.37f, -3684.0f, -1); - Combat_Flee_Waypoint_Set_Data(59, 10, 78, 90, 146.28f, -6.05f, -135.93f, -1); - Combat_Flee_Waypoint_Set_Data(60, 7, 53, 53, 212.0f, -162.8f, -108.0f, -1); - Combat_Flee_Waypoint_Set_Data(61, 7, 53, 53, -28.0f, -162.8f, -104.0f, -1); - Combat_Flee_Waypoint_Set_Data(62, 7, 53, 53, 504.0f, -162.8f, 224.0f, -1); - Combat_Flee_Waypoint_Set_Data(63, 7, 53, 53, -301.0f, -162.8f, 275.0f, -1); - Combat_Flee_Waypoint_Set_Data(64, 15, 42, 39, 98.0f, 367.93f, -10.0f, -1); - Combat_Flee_Waypoint_Set_Data(65, 15, 42, 39, -206.0f, 367.69f, 386.0f, -1); - Combat_Flee_Waypoint_Set_Data(66, 5, 4, 24, -190.0f, -6.5f, 789.0f, -1); - Combat_Flee_Waypoint_Set_Data(67, 5, 4, 24, 123.0f, -6.5f, 1002.0f, -1); - Combat_Flee_Waypoint_Set_Data(68, 5, 4, 24, -573.0f, -6.5f, 1202.0f, -1); - Combat_Flee_Waypoint_Set_Data(69, 16, 84, 96, 120.0f, -126.21f, -350.0f, -1); - Combat_Flee_Waypoint_Set_Data(70, 16, 84, 96, 524.0f, -126.21f, 158.0f, -1); - Combat_Flee_Waypoint_Set_Data(71, 16, 84, 96, 276.0f, -126.21f, 537.0f, -1); - Combat_Flee_Waypoint_Set_Data(72, 17, 86, 98, -334.7f, 12.97f, -332.0f, -1); - Combat_Flee_Waypoint_Set_Data(73, 18, 70, 80, -672.0f, 1.72f, -96.0f, -1); - Combat_Flee_Waypoint_Set_Data(74, 18, 70, 80, -552.0f, -4.01f, 268.0f, -1); - Combat_Flee_Waypoint_Set_Data(75, 18, 70, 80, 293.06f, 1.72f, 112.25f, -1); - Combat_Flee_Waypoint_Set_Data(76, 20, 41, 38, 435.13f, 37.18f, -292.34f, -1); + Combat_Flee_Waypoint_Set_Data( 0, 4, kSetHF01, kSceneHF01, 187.0f, 8.0f, -197.0f, -1); + Combat_Flee_Waypoint_Set_Data( 1, 4, kSetHF01, kSceneHF01, 454.0f, 8.0f, -717.0f, -1); + Combat_Flee_Waypoint_Set_Data( 2, 4, kSetHF02, kSceneHF02, -10.87f, 47.76f, -141.32f, -1); + Combat_Flee_Waypoint_Set_Data( 3, 4, kSetHF02, kSceneHF02, 466.0f, 47.76f, -532.0f, -1); + Combat_Flee_Waypoint_Set_Data( 4, 4, kSetHF03, kSceneHF03, 199.0f, 47.76f, -880.0f, -1); + Combat_Flee_Waypoint_Set_Data( 5, 4, kSetHF03, kSceneHF03, 594.0f, 47.76f, -1141.0f, -1); + Combat_Flee_Waypoint_Set_Data( 6, 4, kSetHF03, kSceneHF03, 912.0f, 47.76f, -447.0f, -1); + Combat_Flee_Waypoint_Set_Data( 7, 4, kSetHF03, kSceneHF03, 492.0f, 47.76f, -459.0f, -1); + Combat_Flee_Waypoint_Set_Data( 8, 1, kSetBB01, kSceneBB01, 271.0f, 0.0f, 1038.0f, -1); + Combat_Flee_Waypoint_Set_Data( 9, 1, kSetBB01, kSceneBB01, -175.0f, 9.04f, 8.59f, -1); + Combat_Flee_Waypoint_Set_Data(10, 1, kSetBB01, kSceneBB01, -343.05f, 9.04f, 260.0f, -1); + Combat_Flee_Waypoint_Set_Data(11, 0, kSetDR01_DR02_DR04, kSceneDR01, -443.0f, -0.04f, -180.0f, -1); + Combat_Flee_Waypoint_Set_Data(12, 0, kSetDR01_DR02_DR04, kSceneDR02, -1485.0f, 6.98f, -393.0f, -1); + Combat_Flee_Waypoint_Set_Data(13, 0, kSetDR01_DR02_DR04, kSceneDR04, -652.0f, 7.18f, 354.0f, -1); + Combat_Flee_Waypoint_Set_Data(14, 6, kSetMA01, kSceneMA01, 25.0f, 0.0f, -314.0f, -1); + Combat_Flee_Waypoint_Set_Data(15, 6, kSetMA01, kSceneMA01, 980.0f, 0.0f, 189.0f, -1); + Combat_Flee_Waypoint_Set_Data(16, 6, kSetMA01, kSceneMA01, 601.0f, 0.0f, -1641.0f, -1); + Combat_Flee_Waypoint_Set_Data(17, 12, kSetUG07, kSceneUG07, 218.0f, -12.21f, -290.0f, -1); + Combat_Flee_Waypoint_Set_Data(18, 12, kSetUG07, kSceneUG07, -150.0f, -12.21f, -962.0f, -1); + Combat_Flee_Waypoint_Set_Data(19, 13, kSetUG08, kSceneUG08, -524.0f, 0.0f, -172.0f, -1); + Combat_Flee_Waypoint_Set_Data(20, 13, kSetUG08, kSceneUG08, -427.0f, 0.0f, 199.0f, -1); + Combat_Flee_Waypoint_Set_Data(21, 13, kSetUG08, kSceneUG08, -121.0f, 0.0f, -145.0f, -1); + Combat_Flee_Waypoint_Set_Data(22, 14, kSetUG10, kSceneUG10, 2.0f, 1.15f, 412.0f, -1); + Combat_Flee_Waypoint_Set_Data(23, 14, kSetUG10, kSceneUG10, -327.0f, 1.15f, -384.0f, -1); + Combat_Flee_Waypoint_Set_Data(24, 14, kSetUG10, kSceneUG10, -253.0f, 81.33f, -620.0f, -1); + Combat_Flee_Waypoint_Set_Data(25, 5, kSetCT05, kSceneCT05, -518.52f, -109.91f, 312.0f, -1); + Combat_Flee_Waypoint_Set_Data(26, 5, kSetCT05, kSceneCT05, 141.0f, -109.91f, 452.0f, -1); + Combat_Flee_Waypoint_Set_Data(27, 5, kSetCT11, kSceneCT11, 516.0f, 0.56f, 779.0f, -1); + Combat_Flee_Waypoint_Set_Data(28, 5, kSetCT11, kSceneCT11, 388.0f, 9.68f, 190.0f, -1); + Combat_Flee_Waypoint_Set_Data(29, 5, kSetCT11, kSceneCT11, -429.0f, 9.68f, -115.0f, -1); + Combat_Flee_Waypoint_Set_Data(30, 7, kSetPS14, kScenePS14, -997.0f, 508.14f, -630.84f, -1); + Combat_Flee_Waypoint_Set_Data(31, 7, kSetPS14, kScenePS14, -416.27f, 508.14f, -574.84f, -1); + Combat_Flee_Waypoint_Set_Data(32, 7, kSetPS14, kScenePS14, -416.0f, 508.14f, -906.84f, -1); + Combat_Flee_Waypoint_Set_Data(33, 7, kSetPS14, kScenePS14, -1168.0f, 508.14f, -1666.84f, -1); + Combat_Flee_Waypoint_Set_Data(34, 10, kSetUG06, kSceneUG06, 75.0f, 153.0f, -485.0f, -1); + Combat_Flee_Waypoint_Set_Data(35, 10, kSetUG06, kSceneUG06, -18.0f, 0.0f, 321.0f, -1); + Combat_Flee_Waypoint_Set_Data(36, 11, kSetUG01, kSceneUG01, -190.0f, -50.13f, -298.0f, -1); + Combat_Flee_Waypoint_Set_Data(37, 11, kSetUG01, kSceneUG01, 126.0f, -50.13f, -150.0f, -1); + Combat_Flee_Waypoint_Set_Data(38, 11, kSetUG01, kSceneUG01, 187.78f, -50.13f, -1262.0f, -1); + Combat_Flee_Waypoint_Set_Data(39, 11, kSetUG01, kSceneUG01, -20.22f, -30.13f, -2338.3f, -1); + Combat_Flee_Waypoint_Set_Data(40, 3, kSetNR01, kSceneNR01, -416.0f, 31.55f, -829.0f, -1); + Combat_Flee_Waypoint_Set_Data(41, 3, kSetNR01, kSceneNR01, -412.0f, 31.55f, -1357.0f, -1); + Combat_Flee_Waypoint_Set_Data(42, 3, kSetNR01, kSceneNR01, -208.0f, 23.0f, -1693.0f, -1); + Combat_Flee_Waypoint_Set_Data(43, 3, kSetNR01, kSceneNR01, -64.0f, 23.83f, -2097.0f, -1); + Combat_Flee_Waypoint_Set_Data(44, 3, kSetNR01, kSceneNR01, 320.0f, 23.83f, -1058.49f, -1); + Combat_Flee_Waypoint_Set_Data(45, 3, kSetNR01, kSceneNR01, 252.0f, 31.65f, -674.49f, -1); + Combat_Flee_Waypoint_Set_Data(46, 8, kSetKP02, kSceneKP02, -803.0f, -615.49f, 2619.0f, -1); + Combat_Flee_Waypoint_Set_Data(47, 8, kSetKP02, kSceneKP02, -1027.0f, -614.49f, 3151.24f, -1); + Combat_Flee_Waypoint_Set_Data(48, 9, kSetKP05_KP06, kSceneKP05, -1190.0f, 0.0f, 876.0f, -1); + Combat_Flee_Waypoint_Set_Data(49, 9, kSetKP05_KP06, kSceneKP05, -687.0f, 0.0f, 910.0f, -1); + Combat_Flee_Waypoint_Set_Data(50, 9, kSetKP05_KP06, kSceneKP06, -455.0f, 8.26f, -453.26f, -1); + Combat_Flee_Waypoint_Set_Data(51, 9, kSetKP05_KP06, kSceneKP06, -1127.0f, 8.26f, -705.26f, -1); + Combat_Flee_Waypoint_Set_Data(52, 9, kSetKP05_KP06, kSceneKP06, -1143.0f, 8.26f, -261.26f, -1); + Combat_Flee_Waypoint_Set_Data(53, 9, kSetKP05_KP06, kSceneKP06, -703.0f, 8.26f, -157.26f, -1); + Combat_Flee_Waypoint_Set_Data(54, 10, kSetUG04, kSceneUG04, 166.0f, 11.87f, -250.8f, -1); + Combat_Flee_Waypoint_Set_Data(55, 10, kSetUG04, kSceneUG04, 158.0f, 4.14f, -10.8f, -1); + Combat_Flee_Waypoint_Set_Data(56, 10, kSetUG04, kSceneUG04, -310.0f, 39.15f, -822.0f, -1); + Combat_Flee_Waypoint_Set_Data(57, 10, kSetUG04, kSceneUG04, -302.0f, -1.74f, -5847.0f, -1); + Combat_Flee_Waypoint_Set_Data(58, 10, kSetUG05, kSceneUG05, 4.0f, 1.37f, -3684.0f, -1); + Combat_Flee_Waypoint_Set_Data(59, 10, kSetUG05, kSceneUG05, 146.28f, -6.05f, -135.93f, -1); + Combat_Flee_Waypoint_Set_Data(60, 7, kSetMA07, kSceneMA07, 212.0f, -162.8f, -108.0f, -1); + Combat_Flee_Waypoint_Set_Data(61, 7, kSetMA07, kSceneMA07, -28.0f, -162.8f, -104.0f, -1); + Combat_Flee_Waypoint_Set_Data(62, 7, kSetMA07, kSceneMA07, 504.0f, -162.8f, 224.0f, -1); + Combat_Flee_Waypoint_Set_Data(63, 7, kSetMA07, kSceneMA07, -301.0f, -162.8f, 275.0f, -1); + Combat_Flee_Waypoint_Set_Data(64, 15, kSetHF06, kSceneHF06, 98.0f, 367.93f, -10.0f, -1); + Combat_Flee_Waypoint_Set_Data(65, 15, kSetHF06, kSceneHF06, -206.0f, 367.69f, 386.0f, -1); + Combat_Flee_Waypoint_Set_Data(66, 5, kSetCT01_CT12, kSceneCT12, -190.0f, -6.5f, 789.0f, -1); + Combat_Flee_Waypoint_Set_Data(67, 5, kSetCT01_CT12, kSceneCT12, 123.0f, -6.5f, 1002.0f, -1); + Combat_Flee_Waypoint_Set_Data(68, 5, kSetCT01_CT12, kSceneCT12, -573.0f, -6.5f, 1202.0f, -1); + Combat_Flee_Waypoint_Set_Data(69, 16, kSetUG12, kSceneUG12, 120.0f, -126.21f, -350.0f, -1); + Combat_Flee_Waypoint_Set_Data(70, 16, kSetUG12, kSceneUG12, 524.0f, -126.21f, 158.0f, -1); + Combat_Flee_Waypoint_Set_Data(71, 16, kSetUG12, kSceneUG12, 276.0f, -126.21f, 537.0f, -1); + Combat_Flee_Waypoint_Set_Data(72, 17, kSetUG14, kSceneUG14, -334.7f, 12.97f, -332.0f, -1); + Combat_Flee_Waypoint_Set_Data(73, 18, kSetRC03, kSceneRC03, -672.0f, 1.72f, -96.0f, -1); + Combat_Flee_Waypoint_Set_Data(74, 18, kSetRC03, kSceneRC03, -552.0f, -4.01f, 268.0f, -1); + Combat_Flee_Waypoint_Set_Data(75, 18, kSetRC03, kSceneRC03, 293.06f, 1.72f, 112.25f, -1); + Combat_Flee_Waypoint_Set_Data(76, 20, kSetHF05, kSceneHF05, 435.13f, 37.18f, -292.34f, -1); } void InitScript::Init_Shadows() { diff --git a/engines/bladerunner/script/scene/ct12.cpp b/engines/bladerunner/script/scene/ct12.cpp index 27995a8645..7c69762061 100644 --- a/engines/bladerunner/script/scene/ct12.cpp +++ b/engines/bladerunner/script/scene/ct12.cpp @@ -145,7 +145,7 @@ bool SceneScriptCT12::ClickedOnActor(int actorId) { ) { Actor_Face_Actor(kActorOfficerGrayford, kActorMcCoy, true); Actor_Face_Actor(kActorMcCoy, kActorOfficerGrayford, true); - Actor_Says(kActorMcCoy, 710, kAnimationModeTalk); + Actor_Says(kActorMcCoy, 710, kAnimationModeTalk); // Hold it! I'm not a Replicant, I got proof! Actor_Says(kActorOfficerGrayford, 20, kAnimationModeTalk); Actor_Says(kActorMcCoy, 715, kAnimationModeTalk); Actor_Says(kActorOfficerGrayford, 30, kAnimationModeTalk); @@ -156,9 +156,9 @@ bool SceneScriptCT12::ClickedOnActor(int actorId) { Actor_Says(kActorMcCoy, 725, kAnimationModeTalk); Actor_Says(kActorOfficerGrayford, 70, kAnimationModeTalk); Actor_Says(kActorOfficerGrayford, 80, kAnimationModeTalk); - Actor_Says(kActorOfficerGrayford, 90, kAnimationModeTalk); - Actor_Says(kActorOfficerGrayford, 100, kAnimationModeTalk); - Actor_Says(kActorOfficerGrayford, 110, kAnimationModeTalk); + Actor_Says(kActorOfficerGrayford, 90, kAnimationModeTalk); // if you are lying... + Actor_Says(kActorOfficerGrayford, 100, kAnimationModeTalk); // you gonna wish... + Actor_Says(kActorOfficerGrayford, 110, kAnimationModeTalk); // Take him in! Game_Flag_Set(kFlagUnpauseGenWalkers); Game_Flag_Set(kFlagMcCoyFreedOfAccusations); Actor_Set_Goal_Number(kActorMcCoy, kGoalMcCoyStartChapter5); diff --git a/engines/bladerunner/script/scene/dr04.cpp b/engines/bladerunner/script/scene/dr04.cpp index a832ea08f8..2c6c632fb6 100644 --- a/engines/bladerunner/script/scene/dr04.cpp +++ b/engines/bladerunner/script/scene/dr04.cpp @@ -120,7 +120,7 @@ bool SceneScriptDR04::ClickedOnActor(int actorId) { Actor_Says(kActorMoraji, 50, kAnimationModeTalk); Actor_Clue_Acquire(kActorMcCoy, kClueMorajiInterview, true, kActorMoraji); Actor_Set_Goal_Number(kActorMoraji, kGoalMorajiDie); - Actor_Set_Goal_Number(kActorOfficerGrayford, 101); // Grayford arrives at scene of Moraji corpse + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordArrivesToDR04); // Grayford arrives at scene of Moraji corpse return true; } } @@ -128,16 +128,16 @@ bool SceneScriptDR04::ClickedOnActor(int actorId) { if (Actor_Query_Goal_Number(kActorMoraji) == kGoalMorajiDead) { if (!Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorMoraji, 36, true, false)) { #if BLADERUNNER_ORIGINAL_BUGS - Actor_Set_Goal_Number(kActorOfficerGrayford, 106); + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordStopPatrolToTalkToMcCoyAtDR04); #else // bugfix: original code would result in this conversation repeating multiple times if: - // Officer Grayford is at 103 goal (asking "What do you know about this?"... + // Officer Grayford is at 103 (kGoalOfficerGrayfordTalkToMcCoyAndReportAtDR04) goal (asking "What do you know about this?"... // and the player skips the conversation fast. - // So ask about a sheet (goal 106) for Moraji only when Grayford starts patrolling (104, 105 goals) - if (Actor_Query_Goal_Number(kActorOfficerGrayford) == 104 - || Actor_Query_Goal_Number(kActorOfficerGrayford) == 105 + // So ask about a sheet (goal 106 (kGoalOfficerGrayfordStopPatrolToTalkToMcCoyAtDR04)) for Moraji only when Grayford starts patrolling (104, 105 goals) + if (Actor_Query_Goal_Number(kActorOfficerGrayford) == kGoalOfficerGrayfordPatrolsAtDR04a + || Actor_Query_Goal_Number(kActorOfficerGrayford) == kGoalOfficerGrayfordPatrolsAtDR04b ) { - Actor_Set_Goal_Number(kActorOfficerGrayford, 106); // This goal reverts to the previous one after finishing up + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordStopPatrolToTalkToMcCoyAtDR04); // This goal reverts to the previous goal after finishing up } #endif // BLADERUNNER_ORIGINAL_BUGS return true; @@ -155,7 +155,7 @@ bool SceneScriptDR04::ClickedOnExit(int exitId) { if (Actor_Query_Goal_Number(kActorMoraji) == kGoalMorajiLayDown) { Actor_Force_Stop_Walking(kActorMcCoy); Actor_Set_Goal_Number(kActorMoraji, kGoalMorajiDie); - Actor_Set_Goal_Number(kActorOfficerGrayford, 101); + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordArrivesToDR04); return true; } @@ -248,7 +248,7 @@ void SceneScriptDR04::SceneFrameAdvanced(int frame) { && Actor_Query_Goal_Number(kActorMoraji) != kGoalMorajiLayDown && Actor_Query_Goal_Number(kActorMoraji) != kGoalMorajiPerished ) { - Actor_Set_Goal_Number(kActorOfficerGrayford, 101); + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordArrivesToDR04); } Scene_Exits_Enable(); break; diff --git a/engines/bladerunner/script/scene/hf05.cpp b/engines/bladerunner/script/scene/hf05.cpp index a724a5bbf1..49e37b2088 100644 --- a/engines/bladerunner/script/scene/hf05.cpp +++ b/engines/bladerunner/script/scene/hf05.cpp @@ -97,7 +97,7 @@ bool SceneScriptHF05::ClickedOn3DObject(const char *objectName, bool a2) { } Player_Loses_Control(); - Actor_Set_Goal_Number(kActorOfficerLeary, 425); + Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyPoliceWait60SecondsToAttackHF05); Game_Flag_Set(kFlagHF05Hole); Game_Flag_Set(kFlagHF07Hole); Obstacle_Object("OBSTACLE_HOLE", true); @@ -285,7 +285,7 @@ void SceneScriptHF05::SceneFrameAdvanced(int frame) { void SceneScriptHF05::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { if (actorId == kActorOfficerLeary - && newGoal == 430 + && newGoal == kGoalOfficerLearyPoliceAboutToAttackHF05 ) { Game_Flag_Set(kFlagHF05PoliceAttacked); policeAttack(); @@ -325,7 +325,7 @@ void SceneScriptHF05::PlayerWalkedIn() { Music_Play(kMusicBatl226M, 40, 0, 2, -1, 0, 0); Actor_Says(kActorOfficerGrayford, 200, kAnimationModeTalk); Actor_Says(kActorOfficerGrayford, 210, kAnimationModeTalk); - Actor_Set_Goal_Number(kActorOfficerLeary, 420); + Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyPoliceWait120SecondsToAttackHF05); if (getCompanionActor() == kActorDektora) { talkWithDektora(); } else if (getCompanionActor() == kActorLucy) { diff --git a/engines/bladerunner/script/scene/hf06.cpp b/engines/bladerunner/script/scene/hf06.cpp index 7afb3d8821..9a62e39cda 100644 --- a/engines/bladerunner/script/scene/hf06.cpp +++ b/engines/bladerunner/script/scene/hf06.cpp @@ -160,8 +160,8 @@ void SceneScriptHF06::SceneFrameAdvanced(int frame) { void SceneScriptHF06::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bool currentSet) { if (actorId == kActorSteele - && oldGoal != 599 - && newGoal == 599 + && oldGoal != kGoalSteeleGone + && newGoal == kGoalSteeleGone ) { Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorSteele, 24, false, false); Actor_Says(kActorSteele, 250, -1); diff --git a/engines/bladerunner/script/scene/ma04.cpp b/engines/bladerunner/script/scene/ma04.cpp index b196972457..7af22753c1 100644 --- a/engines/bladerunner/script/scene/ma04.cpp +++ b/engines/bladerunner/script/scene/ma04.cpp @@ -294,9 +294,9 @@ void SceneScriptMA04::PlayerWalkedIn() { Game_Flag_Set(kFlagRC01ChromeDebrisTaken); Item_Remove_From_World(kItemChromeDebris); } - Actor_Set_Goal_Number(kActorOfficerLeary, 99); + Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyEndOfAct1); Actor_Put_In_Set(kActorOfficerLeary, kSetFreeSlotC); - Actor_Set_At_Waypoint(kActorOfficerLeary, 35, 0); + Actor_Set_At_Waypoint(kActorOfficerLeary, 35, 0); // kSetFreeSlotC Autosave_Game(0); } //return false; diff --git a/engines/bladerunner/script/scene/tb03.cpp b/engines/bladerunner/script/scene/tb03.cpp index dfb40614f9..cb1964395f 100644 --- a/engines/bladerunner/script/scene/tb03.cpp +++ b/engines/bladerunner/script/scene/tb03.cpp @@ -64,7 +64,7 @@ void SceneScriptTB03::InitializeScene() { int goal = Actor_Query_Goal_Number(kActorTyrellGuard); if (goal == kGoalTyrellGuardWait) { Actor_Change_Animation_Mode(kActorTyrellGuard, kAnimationModeIdle); - Actor_Set_Goal_Number(kActorOfficerGrayford, 399); + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordArrestMcCoyInTB03Act4); } else if (goal != kGoalTyrellGuardWakeUp) { Actor_Set_Goal_Number(kActorTyrellGuard, kGoalTyrellGuardSleeping); } diff --git a/engines/bladerunner/script/scene/ug05.cpp b/engines/bladerunner/script/scene/ug05.cpp index d58271715e..19bfb001e3 100644 --- a/engines/bladerunner/script/scene/ug05.cpp +++ b/engines/bladerunner/script/scene/ug05.cpp @@ -192,7 +192,7 @@ void SceneScriptUG05::PlayerWalkedIn() { Actor_Put_In_Set(kActorOfficerGrayford, kSetUG05); Actor_Set_At_XYZ(kActorOfficerGrayford, 4.22f, -1.37f, -925.0f, 750); - Actor_Set_Goal_Number(kActorOfficerGrayford, 599); + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordDead); Actor_Retired_Here(kActorOfficerGrayford, 70, 36, true, -1); int affectionTowardsActor = getAffectionTowardsActor(); diff --git a/engines/bladerunner/script/scene/ug07.cpp b/engines/bladerunner/script/scene/ug07.cpp index d210400631..e504413e76 100644 --- a/engines/bladerunner/script/scene/ug07.cpp +++ b/engines/bladerunner/script/scene/ug07.cpp @@ -178,8 +178,8 @@ void SceneScriptUG07::PlayerWalkedIn() { if ( Global_Variable_Query(kVariableChapter) == 4 && !Game_Flag_Query(kFlagUG07Empty) ) { - Actor_Set_Goal_Number(kActorOfficerLeary, 307); - Actor_Set_Goal_Number(kActorOfficerGrayford, 307); + Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyBlockingUG07); + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordBlockingUG07); } if (Game_Flag_Query(kFlagUG08toUG07)) { @@ -190,14 +190,14 @@ void SceneScriptUG07::PlayerWalkedIn() { void SceneScriptUG07::PlayerWalkedOut() { if (Global_Variable_Query(kVariableChapter) == 4 - && (Actor_Query_Goal_Number(kActorOfficerLeary) == 307 - || Actor_Query_Goal_Number(kActorOfficerGrayford) == 307 + && (Actor_Query_Goal_Number(kActorOfficerLeary) == kGoalOfficerLearyBlockingUG07 + || Actor_Query_Goal_Number(kActorOfficerGrayford) == kGoalOfficerGrayfordBlockingUG07 ) ) { Non_Player_Actor_Combat_Mode_Off(kActorOfficerLeary); Non_Player_Actor_Combat_Mode_Off(kActorOfficerGrayford); - Actor_Set_Goal_Number(kActorOfficerLeary, 306); - Actor_Set_Goal_Number(kActorOfficerGrayford, 306); + Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyPrepareToHuntAroundAct4); + Actor_Set_Goal_Number(kActorOfficerGrayford, kGoalOfficerGrayfordPrepareToHuntAroundAct4); } if (Actor_Query_In_Set(kActorClovis, kSetUG07)) { |