aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanasis Antoniou2019-04-14 15:59:16 +0300
committerThanasis Antoniou2019-04-14 15:59:57 +0300
commit7fba5444ee822202aa02fb7e5cef49baba76c630 (patch)
tree854d3aed669b21b9f4646c944b51a444dc07ea0b
parentf8b5033680fce2cd660bf884e05cbbbaa936347f (diff)
downloadscummvm-rg350-7fba5444ee822202aa02fb7e5cef49baba76c630.tar.gz
scummvm-rg350-7fba5444ee822202aa02fb7e5cef49baba76c630.tar.bz2
scummvm-rg350-7fba5444ee822202aa02fb7e5cef49baba76c630.zip
BLADERUNNER: Don't restart dialogue with offended Larry
-rw-r--r--engines/bladerunner/game_constants.h10
-rw-r--r--engines/bladerunner/script/ai/crazylegs.cpp30
-rw-r--r--engines/bladerunner/script/scene/hf01.cpp4
-rw-r--r--engines/bladerunner/script/scene/hf05.cpp31
-rw-r--r--engines/bladerunner/script/scene/ma04.cpp4
5 files changed, 52 insertions, 27 deletions
diff --git a/engines/bladerunner/game_constants.h b/engines/bladerunner/game_constants.h
index 9da269b23b..ba3e156111 100644
--- a/engines/bladerunner/game_constants.h
+++ b/engines/bladerunner/game_constants.h
@@ -2284,6 +2284,16 @@ enum GoalLeon {
kGoalLeonGone = 8
};
+enum GoalCrazyLegs {
+ kGoalCrazyLegsDefault = 0,
+ kGoalCrazyLegsShotAndHit = 1,
+ kGoalCrazyLegsLeavesShowroom = 2, // set either after McCoy re-holsters his gun, or if McCoy tells him to lie to Steele
+ // goal 10 seems unused
+ // goal 10 updates to 11 (also unused)
+ kGoalCrazyLegsMcCoyDrewHisGun = 210, // When McCoy draws gun and Ch < 5
+ kGoalCrazyLegsIsArrested = 699
+};
+
enum GoalFreeSlotA { // Rat
kGoalFreeSlotAUG15Wait = 300,
kGoalFreeSlotAUG15WalkOut = 301,
diff --git a/engines/bladerunner/script/ai/crazylegs.cpp b/engines/bladerunner/script/ai/crazylegs.cpp
index 4766efe915..c2031fc0ab 100644
--- a/engines/bladerunner/script/ai/crazylegs.cpp
+++ b/engines/bladerunner/script/ai/crazylegs.cpp
@@ -77,34 +77,34 @@ void AIScriptCrazylegs::OtherAgentExitedThisScene(int otherActorId) {
}
void AIScriptCrazylegs::OtherAgentEnteredCombatMode(int otherActorId, int combatMode) {
- if (Actor_Query_Goal_Number(kActorCrazylegs) != 2 && !otherActorId) {
+ if (Actor_Query_Goal_Number(kActorCrazylegs) != kGoalCrazyLegsLeavesShowroom && otherActorId == kActorMcCoy) {
if (combatMode && Global_Variable_Query(kVariableChapter) < 5) {
- Actor_Face_Actor(kActorCrazylegs, kActorMcCoy, 1);
- Actor_Face_Actor(kActorMcCoy, kActorCrazylegs, 1);
+ Actor_Face_Actor(kActorCrazylegs, kActorMcCoy, true);
+ Actor_Face_Actor(kActorMcCoy, kActorCrazylegs, true);
Actor_Says(kActorCrazylegs, 430, 3);
Actor_Says_With_Pause(kActorCrazylegs, 440, 0.0, 3);
Actor_Says(kActorMcCoy, 1870, -1);
Actor_Says(kActorCrazylegs, 450, 3);
- Actor_Set_Goal_Number(kActorCrazylegs, 210);
- } else if (Actor_Query_Goal_Number(kActorCrazylegs) == 210) {
- Actor_Face_Actor(kActorCrazylegs, kActorMcCoy, 1);
+ Actor_Set_Goal_Number(kActorCrazylegs, kGoalCrazyLegsMcCoyDrewHisGun);
+ } else if (Actor_Query_Goal_Number(kActorCrazylegs) == kGoalCrazyLegsMcCoyDrewHisGun) {
+ Actor_Face_Actor(kActorCrazylegs, kActorMcCoy, true);
Actor_Says(kActorCrazylegs, 460, 3);
Actor_Says(kActorCrazylegs, 470, 3);
- Actor_Set_Goal_Number(kActorCrazylegs, 2);
+ Actor_Set_Goal_Number(kActorCrazylegs, kGoalCrazyLegsLeavesShowroom);
}
}
}
void AIScriptCrazylegs::ShotAtAndMissed() {
- if (Actor_Query_Goal_Number(kActorCrazylegs) == 2)
+ if (Actor_Query_Goal_Number(kActorCrazylegs) == kGoalCrazyLegsLeavesShowroom)
return;
- Actor_Set_Goal_Number(kActorCrazylegs, 2);
+ Actor_Set_Goal_Number(kActorCrazylegs, kGoalCrazyLegsLeavesShowroom);
}
bool AIScriptCrazylegs::ShotAtAndHit() {
- Actor_Set_Goal_Number(kActorCrazylegs, 1);
- Actor_Says(kActorMcCoy, 1875, 4);
+ Actor_Set_Goal_Number(kActorCrazylegs, kGoalCrazyLegsShotAndHit);
+ Actor_Says(kActorMcCoy, 1875, 4); // I wouldn't drag that bucket of bolts if you paid me.
return false;
}
@@ -117,17 +117,17 @@ int AIScriptCrazylegs::GetFriendlinessModifierIfGetsClue(int otherActorId, int c
}
bool AIScriptCrazylegs::GoalChanged(int currentGoalNumber, int newGoalNumber) {
- if (newGoalNumber == 0) {
+ if (newGoalNumber == kGoalCrazyLegsDefault) {
return true;
}
- if (newGoalNumber == 1) {
+ if (newGoalNumber == kGoalCrazyLegsShotAndHit) {
AI_Movement_Track_Flush(kActorCrazylegs);
- Actor_Set_Targetable(kActorCrazylegs, 0);
+ Actor_Set_Targetable(kActorCrazylegs, false);
return true;
}
- if (newGoalNumber == 2) {
+ if (newGoalNumber == kGoalCrazyLegsLeavesShowroom) {
AI_Movement_Track_Flush(kActorCrazylegs);
AI_Movement_Track_Append(kActorCrazylegs, 360, 0);
AI_Movement_Track_Append(kActorCrazylegs, 40, 0);
diff --git a/engines/bladerunner/script/scene/hf01.cpp b/engines/bladerunner/script/scene/hf01.cpp
index 56d5f6abcd..e01af36ad1 100644
--- a/engines/bladerunner/script/scene/hf01.cpp
+++ b/engines/bladerunner/script/scene/hf01.cpp
@@ -157,7 +157,7 @@ bool SceneScriptHF01::ClickedOnActor(int actorId) {
|| Actor_Clue_Query(kActorMcCoy, kCluePhoneCallLucy1)
)
&& !Game_Flag_Query(kFlagCrazylegsArrested)
- && Actor_Query_Goal_Number(kActorCrazylegs) != 2
+ && Actor_Query_Goal_Number(kActorCrazylegs) != kGoalCrazyLegsLeavesShowroom
&& Game_Flag_Query(kFlagMcCoyIsHelpingReplicants)
&& !Game_Flag_Query(kFlagHF01TalkToLovedOne)
) {
@@ -340,7 +340,7 @@ void SceneScriptHF01::PlayerWalkedIn() {
}
if (!Game_Flag_Query(kFlagCrazylegsArrested)
- && Actor_Query_Goal_Number(kActorCrazylegs) != 2
+ && Actor_Query_Goal_Number(kActorCrazylegs) != kGoalCrazyLegsLeavesShowroom
) {
if (Actor_Clue_Query(kActorMcCoy, kCluePhoneCallLucy1)
&& Global_Variable_Query(kVariableAffectionTowards) == kAffectionTowardsLucy
diff --git a/engines/bladerunner/script/scene/hf05.cpp b/engines/bladerunner/script/scene/hf05.cpp
index 61a029ce22..2624a1ec43 100644
--- a/engines/bladerunner/script/scene/hf05.cpp
+++ b/engines/bladerunner/script/scene/hf05.cpp
@@ -80,8 +80,8 @@ bool SceneScriptHF05::ClickedOn3DObject(const char *objectName, bool a2) {
if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, 95.0f, 40.63f, 308.0f, 0, true, false, 0)) {
Actor_Face_Object(kActorMcCoy, "TOP CON", true);
if (Actor_Query_In_Set(kActorCrazylegs, kSetHF05)
- && Actor_Query_Goal_Number(kActorCrazylegs) != 1
- && Actor_Query_Goal_Number(kActorCrazylegs) != 2
+ && Actor_Query_Goal_Number(kActorCrazylegs) != kGoalCrazyLegsShotAndHit
+ && Actor_Query_Goal_Number(kActorCrazylegs) != kGoalCrazyLegsLeavesShowroom
) {
Actor_Face_Actor(kActorCrazylegs, kActorMcCoy, true);
Actor_Says(kActorCrazylegs, 480, 13);
@@ -152,11 +152,26 @@ bool SceneScriptHF05::ClickedOn3DObject(const char *objectName, bool a2) {
bool SceneScriptHF05::ClickedOnActor(int actorId) {
if (actorId == kActorCrazylegs) {
+#if BLADERUNNER_ORIGINAL_BUGS
if (!Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorCrazylegs, 60, true, false)) {
Actor_Face_Actor(kActorMcCoy, kActorCrazylegs, true);
Actor_Face_Actor(kActorCrazylegs, kActorMcCoy, true);
dialogueWithCrazylegs1();
}
+#else
+ // Don't (re)start a dialogue with CrayLegs if he is leaving or insulted by McCoy drawing his gun
+ if (Actor_Query_Goal_Number(kActorCrazylegs) != kGoalCrazyLegsLeavesShowroom
+ && Actor_Query_Goal_Number(kActorCrazylegs) != kGoalCrazyLegsMcCoyDrewHisGun) {
+ if (!Loop_Actor_Walk_To_Actor(kActorMcCoy, kActorCrazylegs, 60, true, false)) {
+ Actor_Face_Actor(kActorMcCoy, kActorCrazylegs, true);
+ Actor_Face_Actor(kActorCrazylegs, kActorMcCoy, true);
+ dialogueWithCrazylegs1();
+ }
+ } else {
+ Actor_Face_Actor(kActorMcCoy, kActorCrazylegs, true);
+ Actor_Says(kActorMcCoy, 5560, 15); // Hey
+ }
+#endif // BLADERUNNER_ORIGINAL_BUGS
}
return false;
}
@@ -347,8 +362,8 @@ void SceneScriptHF05::PlayerWalkedIn() {
}
void SceneScriptHF05::PlayerWalkedOut() {
- if (Actor_Query_Goal_Number(kActorCrazylegs) == 210) {
- Actor_Set_Goal_Number(kActorCrazylegs, 2);
+ if (Actor_Query_Goal_Number(kActorCrazylegs) == kGoalCrazyLegsMcCoyDrewHisGun) {
+ Actor_Set_Goal_Number(kActorCrazylegs, kGoalCrazyLegsLeavesShowroom);
}
Ambient_Sounds_Remove_All_Non_Looping_Sounds(true);
Ambient_Sounds_Remove_All_Looping_Sounds(1);
@@ -544,7 +559,7 @@ void SceneScriptHF05::dialogueWithCrazylegs2() { // cut feature? it is impossibl
Game_Flag_Set(kFlagCrazylegsArrested);
Actor_Put_In_Set(kActorCrazylegs, kSetPS09);
Actor_Set_At_XYZ(kActorCrazylegs, -315.15f, 0.0f, 241.06f, 583);
- Actor_Set_Goal_Number(kActorCrazylegs, 699);
+ Actor_Set_Goal_Number(kActorCrazylegs, kGoalCrazyLegsIsArrested);
Game_Flag_Set(kFlagCrazylegsArrestedTalk);
if (Game_Flag_Query(kFlagSpinnerAtNR01)) {
Set_Enter(kSetNR01, kSceneNR01);
@@ -659,9 +674,9 @@ void SceneScriptHF05::talkWithCrazylegs3(int affectionTowardsActor) {
} else {
Actor_Says(kActorLucy, 380, kAnimationModeTalk);
}
- Actor_Says(kActorMcCoy, 1740, 14);
- Actor_Says(kActorCrazylegs, 120, 12);
- Actor_Set_Goal_Number(kActorCrazylegs, 2);
+ Actor_Says(kActorMcCoy, 1740, 14); // You tell her we're headed South.
+ Actor_Says(kActorCrazylegs, 120, 12); // Ten Four.
+ Actor_Set_Goal_Number(kActorCrazylegs, kGoalCrazyLegsLeavesShowroom);
if (affectionTowardsActor == kActorDektora) {
Actor_Says(kActorDektora, 100, kAnimationModeTalk);
} else {
diff --git a/engines/bladerunner/script/scene/ma04.cpp b/engines/bladerunner/script/scene/ma04.cpp
index 034ec8eec1..b7e869c21d 100644
--- a/engines/bladerunner/script/scene/ma04.cpp
+++ b/engines/bladerunner/script/scene/ma04.cpp
@@ -370,7 +370,7 @@ void SceneScriptMA04::phoneCallWithDektora() {
Actor_Says(kActorDektora, 340, 3);
Actor_Says(kActorDektora, 350, 3);
if (Game_Flag_Query(kFlagCrazylegsArrested)
- || Actor_Query_Goal_Number(kActorCrazylegs) == 2
+ || Actor_Query_Goal_Number(kActorCrazylegs) == kGoalCrazyLegsLeavesShowroom
) {
answer = 1170; // CLOVIS
} else {
@@ -425,7 +425,7 @@ void SceneScriptMA04::phoneCallWithLucy() {
Actor_Says(kActorMcCoy, 2560, 17);
Actor_Says(kActorLucy, 580, 3);
if (Game_Flag_Query(kFlagCrazylegsArrested)
- || Actor_Query_Goal_Number(kActorCrazylegs) == 2
+ || Actor_Query_Goal_Number(kActorCrazylegs) == kGoalCrazyLegsLeavesShowroom
) {
Actor_Says(kActorLucy, 630, 3);
Actor_Says_With_Pause(kActorMcCoy, 2575, 0.0f, 15);