Skip to content
Permalink
Browse files

BLADERUNNER: Cleanup of police AI and fix for rat ai

  • Loading branch information...
antoniou79 committed May 19, 2019
1 parent 10ac612 commit ea3a9f211da74ffd3aa35328147566160a73d680
@@ -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 {
@@ -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
@@ -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;
@@ -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;

0 comments on commit ea3a9f2

Please sign in to comment.
You can’t perform that action at this time.