Skip to content

Commit

Permalink
BLADERUNNER: Moonbus fixes (Izo and Luther)
Browse files Browse the repository at this point in the history
Also fixed a typo that resulted in Izo's corpse persisting past chapter 2 at RC03
  • Loading branch information
antoniou79 committed Mar 27, 2019
1 parent 15700fc commit 6e45a70
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 7 deletions.
2 changes: 1 addition & 1 deletion engines/bladerunner/actor.cpp
Expand Up @@ -106,7 +106,7 @@ void Actor::setup(int actorId) {
_timersLeft[i] = 0;
_timersLast[i] = _vm->_time->current();
}
_timersLeft[4] = _timer4RemainDefault; // This was in original code. We need to init this timer in oder to kick off periodic updates for acquireCluesByRelations
_timersLeft[4] = _timer4RemainDefault; // This was in original code. We need to init this timer in order to kick off periodic updates for acquireCluesByRelations

_honesty = 50;
_intelligence = 50;
Expand Down
6 changes: 3 additions & 3 deletions engines/bladerunner/script/ai/clovis.cpp
Expand Up @@ -459,7 +459,7 @@ bool AIScriptClovis::GoalChanged(int currentGoalNumber, int newGoalNumber) {
) {
#if BLADERUNNER_ORIGINAL_BUGS
// Lucy's retirement on the moonbus should be handled in her ai script AIScriptLucy::Retired()
// like the others - even if she won't attack McCoy, she should be retired immediately (with this shot)
// like the others - even if she won't attack McCoy, she should be retired immediately (with one shot)
Actor_Set_Goal_Number(kActorLucy, kGoalLucyGone);
Global_Variable_Decrement(kVariableReplicantsSurvivorsAtMoobus, 1);
#else
Expand All @@ -473,8 +473,8 @@ bool AIScriptClovis::GoalChanged(int currentGoalNumber, int newGoalNumber) {
&& Actor_Query_In_Set(kActorLuther, kSetKP07)
) {
#if BLADERUNNER_ORIGINAL_BUGS
// Luther's retirement on the moonbus should be handled in her ai script AIScriptLucy::Retired()
// like the others - even if she won't attack McCoy, she should be retired immediately (with this shot)
// Luther's retirement on the moonbus should be handled in his ai script AIScriptLuther:Retired()
// like the others - even if he won't attack McCoy, he should be retired immediately (with one shot)
Actor_Set_Goal_Number(kActorLuther, kGoalLutherGone);
Global_Variable_Decrement(kVariableReplicantsSurvivorsAtMoobus, 1);
#endif // BLADERUNNER_ORIGINAL_BUGS
Expand Down
11 changes: 9 additions & 2 deletions engines/bladerunner/script/ai/izo.cpp
Expand Up @@ -59,7 +59,7 @@ bool AIScriptIzo::Update() {
return true;
}

if (Global_Variable_Query(kVariableChapter) == 1
if (Global_Variable_Query(kVariableChapter) == 3
&& Actor_Query_Goal_Number(kActorIzo) == kGoalIzoGone
&& Actor_Query_Which_Set_In(kActorIzo) == kSetRC03
) {
Expand Down Expand Up @@ -407,8 +407,15 @@ bool AIScriptIzo::GoalChanged(int currentGoalNumber, int newGoalNumber) {
Ambient_Sounds_Play_Speech_Sound(kActorIzo, 9000, 100, 0, 0, 0);
Actor_Change_Animation_Mode(kActorIzo, kAnimationModeDie);
Actor_Set_Goal_Number(kActorIzo, 999);
#if BLADERUNNER_ORIGINAL_BUGS
Scene_Exits_Enable();
Actor_Retired_Here(kActorIzo, 36, 12, true, -1);
#else
Actor_Set_Targetable(kActorIzo, false);
if (!Actor_Query_In_Set(kActorIzo, kSetKP07)) {
Scene_Exits_Enable();
Actor_Retired_Here(kActorIzo, 36, 12, true, -1);
}
#endif // BLADERUNNER_ORIGINAL_BUGS
return true;

case 200:
Expand Down
12 changes: 11 additions & 1 deletion engines/bladerunner/script/ai/luther.cpp
Expand Up @@ -161,6 +161,16 @@ void AIScriptLuther::ShotAtAndMissed() {
}

bool AIScriptLuther::ShotAtAndHit() {
#if BLADERUNNER_ORIGINAL_BUGS
#else
if (Actor_Query_In_Set(kActorLuther, kSetKP07)) {
AI_Movement_Track_Flush(kActorLuther);
ChangeAnimationMode(kAnimationModeDie);
Actor_Retired_Here(kActorLuther, 6, 6, true, kActorMcCoy);
Actor_Set_Goal_Number(kActorLuther, kGoalLutherDie);
return false;
}
#endif
if (Actor_Query_Which_Set_In(kActorLuther) == kSetUG16) {
Actor_Set_Health(kActorLuther, 50, 50);
}
Expand Down Expand Up @@ -225,7 +235,7 @@ bool AIScriptLuther::GoalChanged(int currentGoalNumber, int newGoalNumber) {
AI_Movement_Track_Flush(kActorLuther);
break;

case 499:
case kGoalLutherDead:
Actor_Set_Goal_Number(kActorLuther, kGoalLutherGone);
break;
}
Expand Down

0 comments on commit 6e45a70

Please sign in to comment.