Skip to content
Permalink
Browse files

BLADERUNNER: Prevent Replicants from despawning from the moonbus

All Replicants get a new goal now inside the moonbus, and movement flush

This is to prevent earlier scripts that had them "walking around" from kicking in (this was mainly a bug for the twins) but is applied to everyone (except Clovis and Sadik) for conformance
  • Loading branch information...
antoniou79 committed Aug 13, 2019
1 parent e609d02 commit 67fd0ca34a4fe87cd85a09562ab938853adf314f
@@ -2121,7 +2121,7 @@ enum GoalDektora {
kGoalDektoraNR11BurningFallToNR10 = 279,
kGoalDektoraNR11RanAway = 290,
kGoalDektoraNR07RanAway = 295,

kGoalDektoraKP07Wait = 513, // new goal when in moonbus, Act 5
kGoalDektoraGone = 599
};

@@ -2172,7 +2172,7 @@ enum GoalGordo {
kGoalGordoNR01Arrested = 260,
kGoalGordoNR01RanAway = 280,
kGoalGordoNR01Die = 299,

kGoalGordoKP07Wait = 513, // new goal when in moonbus, Act 5
kGoalGordoGone = 599
};

@@ -2260,7 +2260,7 @@ enum GoalLucy {
kGoalLucyUG01Wait = 310,
kGoalLucyUG01VoightKampff = 311,
kGoalLucyUG01RunAway = 312,

kGoalLucyKP07Wait = 513, // new goal when in moonbus, Act 5
kGoalLucyGone = 599
};

@@ -2283,6 +2283,7 @@ enum GoalIzo {
kGoalIzoGoToHC03 = 155,
kGoalIzoDieHidden = 198,
kGoalIzoDie = 199,
kGoalIzoKP07Wait = 513, // new goal when in moonbus, Act 5
kGoalIzoGone = 599
};

@@ -2318,6 +2319,7 @@ enum GoalLuther {
kGoalLutherDyingCheck = 497,
kGoalLutherDie = 498,
kGoalLutherDead = 499,
kGoalLutherKP07Wait = 513, // new goal when in moonbus, Act 5
kGoalLutherGone = 599
};

@@ -2439,6 +2441,7 @@ enum GoalZuben {
kGoalZubenFled = 20,
kGoalZubenMA01AttackMcCoy = 21,
kGoalZubenDiesInChapter1 = 99,
kGoalZubenKP07Wait = 513, // new goal when in moonbus, Act 5
kGoalZubenGone = 599
};

@@ -57,7 +57,7 @@ bool AIScriptLuther::Update() {
}

if (Actor_Query_Goal_Number(kActorLuther) == kGoalLutherDefault
&& Actor_Query_Goal_Number(kActorLuther) != kGoalLutherDead
&& Actor_Query_Goal_Number(kActorLuther) != kGoalLutherDead // A bug? this is redundant
) {
Actor_Set_Goal_Number(kActorLuther, kGoalLutherMoveAround);
return false;
@@ -35,13 +35,28 @@ void SceneScriptKP07::InitializeScene() {
if (Game_Flag_Query(kFlagDektoraIsReplicant)
&& Actor_Query_Goal_Number(kActorDektora) < kGoalDektoraGone
) {
#if BLADERUNNER_ORIGINAL_BUGS
#else
if (Game_Flag_Query(kFlagNR11DektoraBurning)) {
Game_Flag_Reset(kFlagNR11DektoraBurning); // resolves a bug of an original game, where Dektora would default to burning state
Actor_Change_Animation_Mode(kActorDektora, kAnimationModeTalk); // dummy animation change to ensure that the next will trigger the mode change case
Actor_Change_Animation_Mode(kActorDektora, kAnimationModeIdle);
}
AI_Movement_Track_Flush(kActorDektora);
Actor_Set_Goal_Number(kActorDektora, kGoalDektoraKP07Wait); // new clear goal
#endif // BLADERUNNER_ORIGINAL_BUGS
Actor_Set_Targetable(kActorDektora, true);
Global_Variable_Increment(kVariableReplicantsSurvivorsAtMoonbus, 1);
Actor_Put_In_Set(kActorDektora, kSetKP07);
Actor_Set_At_XYZ(kActorDektora, -52.0f, -41.52f, -5.0f, 289);
}

if (Actor_Query_Goal_Number(kActorZuben) < kGoalZubenGone) {
#if BLADERUNNER_ORIGINAL_BUGS
#else
AI_Movement_Track_Flush(kActorZuben);
Actor_Set_Goal_Number(kActorZuben, kGoalZubenKP07Wait); // new clear goal
#endif // BLADERUNNER_ORIGINAL_BUGS
Global_Variable_Increment(kVariableReplicantsSurvivorsAtMoonbus, 1);
Actor_Set_Targetable(kActorZuben, true);
Actor_Put_In_Set(kActorZuben, kSetKP07);
@@ -51,6 +66,11 @@ void SceneScriptKP07::InitializeScene() {
if (Game_Flag_Query(kFlagIzoIsReplicant)
&& Actor_Query_Goal_Number(kActorIzo) < 599
) {
#if BLADERUNNER_ORIGINAL_BUGS
#else
AI_Movement_Track_Flush(kActorIzo);
Actor_Set_Goal_Number(kActorIzo, kGoalIzoKP07Wait); // new clear goal
#endif // BLADERUNNER_ORIGINAL_BUGS
Global_Variable_Increment(kVariableReplicantsSurvivorsAtMoonbus, 1);
Actor_Set_Targetable(kActorIzo, true);
Actor_Put_In_Set(kActorIzo, kSetKP07);
@@ -60,6 +80,11 @@ void SceneScriptKP07::InitializeScene() {
if (Game_Flag_Query(kFlagGordoIsReplicant)
&& Actor_Query_Goal_Number(kActorGordo) < kGoalGordoGone
) {
#if BLADERUNNER_ORIGINAL_BUGS
#else
AI_Movement_Track_Flush(kActorGordo);
Actor_Set_Goal_Number(kActorGordo, kGoalGordoKP07Wait); // new clear goal
#endif // BLADERUNNER_ORIGINAL_BUGS
Global_Variable_Increment(kVariableReplicantsSurvivorsAtMoonbus, 1);
Actor_Set_Targetable(kActorGordo, true);
Actor_Put_In_Set(kActorGordo, kSetKP07);
@@ -69,12 +94,22 @@ void SceneScriptKP07::InitializeScene() {
if (Game_Flag_Query(kFlagLucyIsReplicant)
&& Actor_Query_Goal_Number(kActorLucy) < kGoalLucyGone
) {
#if BLADERUNNER_ORIGINAL_BUGS
#else
AI_Movement_Track_Flush(kActorLucy);
Actor_Set_Goal_Number(kActorLucy, kGoalLucyKP07Wait); // new clear goal
#endif // BLADERUNNER_ORIGINAL_BUGS
Global_Variable_Increment(kVariableReplicantsSurvivorsAtMoonbus, 1);
Actor_Put_In_Set(kActorLucy, kSetKP07);
Actor_Set_At_XYZ(kActorLucy, 78.0f, -41.52f, -119.0f, 659);
}

if (Actor_Query_Goal_Number(kActorLuther) < kGoalLutherGone) {
#if BLADERUNNER_ORIGINAL_BUGS
#else
AI_Movement_Track_Flush(kActorLuther);
Actor_Set_Goal_Number(kActorLuther, kGoalLutherKP07Wait); // new goal to avoid resuming his walking around routine
#endif // BLADERUNNER_ORIGINAL_BUGS
Global_Variable_Increment(kVariableReplicantsSurvivorsAtMoonbus, 1);
Actor_Put_In_Set(kActorLuther, kSetKP07);
Actor_Set_At_XYZ(kActorLuther, -47.0f, 0.0f, 151.0f, 531);
@@ -199,7 +199,7 @@ void SceneScriptUG01::PlayerWalkedIn() {

if (Actor_Query_Goal_Number(kActorLucy) == kGoalLucyUG01Wait) {
Music_Play(kMusicLoveSong, 35, 0, 3, -1, 0, 0);
Actor_Set_Goal_Number(kActorLucy, 311);
Actor_Set_Goal_Number(kActorLucy, kGoalLucyUG01VoightKampff);
}
//return false;
}

0 comments on commit 67fd0ca

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