aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/bladerunner/script/ai/moraji.cpp16
-rw-r--r--engines/bladerunner/script/ai/officer_grayford.cpp5
-rw-r--r--engines/bladerunner/script/scene/ct01.cpp55
-rw-r--r--engines/bladerunner/script/scene/dr04.cpp14
4 files changed, 61 insertions, 29 deletions
diff --git a/engines/bladerunner/script/ai/moraji.cpp b/engines/bladerunner/script/ai/moraji.cpp
index 6e650e4316..0c07d3c9b0 100644
--- a/engines/bladerunner/script/ai/moraji.cpp
+++ b/engines/bladerunner/script/ai/moraji.cpp
@@ -150,8 +150,13 @@ bool AIScriptMoraji::GoalChanged(int currentGoalNumber, int newGoalNumber) {
return false;
case kGoalMorajiShot:
+ // applies only when shot inside the Dermo Design Lab
Actor_Set_Targetable(kActorMoraji, false);
- Sound_Play(4, 100, 0, 0, 50);
+ #if BLADE_RUNNER_ORIGINAL_BUGS
+ Sound_Play(4, 100, 0, 0, 50); // Original code has female scream here (FEMHURT2)
+ #else
+ Sound_Play_Speech_Line(kActorMoraji, 9020, 50, 0, 50); // fix: Use Moraji's death SPCHSFX, also lower volume
+ #endif // BLADE_RUNNER_ORIGINAL_BUGS
_animationState = 10;
_animationFrame = 0;
Actor_Retired_Here(kActorMoraji, 60, 16, true, -1);
@@ -184,6 +189,15 @@ bool AIScriptMoraji::GoalChanged(int currentGoalNumber, int newGoalNumber) {
return true;
case kGoalMorajiDie:
+ // Added check here to have Moraji death speech SFX
+ // when shot by McCoy outside the Dermo Design Lab
+ if (Game_Flag_Query(kFlagDR04McCoyShotMoraji)) {
+ #if BLADE_RUNNER_ORIGINAL_BUGS
+ // original code uses no voice here
+ #else
+ Sound_Play_Speech_Line(kActorMoraji, 9020, 50, 0, 50); // Use Moraji's death SPCHSFX, also lower volume
+ #endif // BLADE_RUNNER_ORIGINAL_BUGS
+ }
_animationFrame = -1;
_animationState = 13;
return true;
diff --git a/engines/bladerunner/script/ai/officer_grayford.cpp b/engines/bladerunner/script/ai/officer_grayford.cpp
index cdf1b1a524..75c0718581 100644
--- a/engines/bladerunner/script/ai/officer_grayford.cpp
+++ b/engines/bladerunner/script/ai/officer_grayford.cpp
@@ -21,7 +21,6 @@
*/
#include "bladerunner/script/ai_script.h"
-
namespace BladeRunner {
AIScriptOfficerGrayford::AIScriptOfficerGrayford(BladeRunnerEngine *vm) : AIScriptBase(vm) {
@@ -535,7 +534,7 @@ bool AIScriptOfficerGrayford::GoalChanged(int currentGoalNumber, int newGoalNumb
Player_Gains_Control();
- if (Actor_Query_Goal_Number(kActorMoraji) == 23) {
+ if (Actor_Query_Goal_Number(kActorMoraji) == kGoalMorajiDead) {
Actor_Face_Actor(kActorOfficerGrayford, kActorMoraji, 1);
} else {
Actor_Face_Waypoint(kActorOfficerGrayford, 97, 1);
@@ -578,7 +577,7 @@ bool AIScriptOfficerGrayford::GoalChanged(int currentGoalNumber, int newGoalNumb
Actor_Face_Actor(kActorOfficerGrayford, kActorMcCoy, true);
Actor_Says(kActorOfficerGrayford, 180, 18);
Actor_Set_Goal_Number(kActorOfficerGrayford, currentGoalNumber);
- break;
+ return true; // possible bugfix: was break;
case 110:
AI_Movement_Track_Flush(kActorOfficerGrayford);
diff --git a/engines/bladerunner/script/scene/ct01.cpp b/engines/bladerunner/script/scene/ct01.cpp
index f43450f6da..8d1ccfa465 100644
--- a/engines/bladerunner/script/scene/ct01.cpp
+++ b/engines/bladerunner/script/scene/ct01.cpp
@@ -189,32 +189,39 @@ bool SceneScriptCT01::ClickedOnActor(int actorId) {
if (actorId == kActorGordo) {
if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoDefault) {
- if (!Loop_Actor_Walk_To_XYZ(kActorMcCoy, -338.1f, -6.5f, 419.65f, 6, true, false, 0)) {
- Actor_Face_Actor(kActorMcCoy, kActorGordo, true);
- if (!Game_Flag_Query(kFlagCT01GordoTalk)) {
- Actor_Says(kActorMcCoy, 335, 18);
- Actor_Says(kActorGordo, 20, 30);
- Game_Flag_Set(kFlagCT01GordoTalk);
- Actor_Clue_Acquire(kActorGordo, kClueMcCoysDescription, true, kActorMcCoy);
- Actor_Clue_Acquire(kActorMcCoy, kClueMcCoyIsABladeRunner, true, kActorMcCoy);
- Actor_Modify_Friendliness_To_Other(kActorGordo, kActorMcCoy, -1);
- } else if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoDefault) {
- Actor_Says(kActorMcCoy, 340, 13);
- Actor_Says(kActorMcCoy, 345, 11);
- Actor_Says(kActorGordo, 30, 30);
- Actor_Says(kActorMcCoy, 350, 13);
- Actor_Says(kActorGordo, 40, 30);
- Actor_Modify_Friendliness_To_Other(kActorGordo, kActorMcCoy, -5);
- Player_Loses_Control();
- } else {
- Actor_Says(kActorMcCoy, 365, 14);
- }
- if (Actor_Query_Is_In_Current_Set(kActorZuben)) {
- Actor_Modify_Friendliness_To_Other(kActorZuben, kActorMcCoy, -2);
- }
- return true;
+ if (Loop_Actor_Walk_To_XYZ(kActorMcCoy, -338.1f, -6.5f, 419.65f, 6, true, false, 0)) {
+ return false;
+ }
+ }
+ Actor_Face_Actor(kActorMcCoy, kActorGordo, true);
+ if (!Game_Flag_Query(kFlagCT01GordoTalk)) {
+ Actor_Says(kActorMcCoy, 335, 18);
+ Actor_Says(kActorGordo, 20, 30);
+ Game_Flag_Set(kFlagCT01GordoTalk);
+ Actor_Clue_Acquire(kActorGordo, kClueMcCoysDescription, true, kActorMcCoy);
+ #if BLADE_RUNNER_ORIGINAL_BUGS
+ Actor_Clue_Acquire(kActorMcCoy, kClueMcCoyIsABladeRunner, true, kActorMcCoy);
+ #else
+ Actor_Clue_Acquire(kActorGordo, kClueMcCoyIsABladeRunner, true, kActorMcCoy);
+ #endif // BLADE_RUNNER_ORIGINAL_BUGS
+ Actor_Modify_Friendliness_To_Other(kActorGordo, kActorMcCoy, -1);
+ } else {
+ if (Actor_Query_Goal_Number(kActorGordo) == kGoalGordoDefault) {
+ Actor_Says(kActorMcCoy, 340, 13);
+ Actor_Says(kActorMcCoy, 345, 11);
+ Actor_Says(kActorGordo, 30, 30);
+ Actor_Says(kActorMcCoy, 350, 13);
+ Actor_Says(kActorGordo, 40, 30);
+ Actor_Modify_Friendliness_To_Other(kActorGordo, kActorMcCoy, -5);
+ Player_Loses_Control();
+ } else {
+ Actor_Says(kActorMcCoy, 365, 14);
}
}
+ if (Actor_Query_Is_In_Current_Set(kActorZuben)) {
+ Actor_Modify_Friendliness_To_Other(kActorZuben, kActorMcCoy, -2);
+ }
+ return true;
}
return false;
diff --git a/engines/bladerunner/script/scene/dr04.cpp b/engines/bladerunner/script/scene/dr04.cpp
index 3b033d0c9f..b0d801b3ed 100644
--- a/engines/bladerunner/script/scene/dr04.cpp
+++ b/engines/bladerunner/script/scene/dr04.cpp
@@ -120,14 +120,26 @@ 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);
+ Actor_Set_Goal_Number(kActorOfficerGrayford, 101); // Grayford arrives at scene of Moraji corpse
return true;
}
}
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);
+ #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?"...
+ // 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)
+ && ( Actor_Query_Goal_Number(kActorOfficerGrayford) == 104
+ || Actor_Query_Goal_Number(kActorOfficerGrayford) == 105 ) ) {
+ Actor_Set_Goal_Number(kActorOfficerGrayford, 106); // This goal reverts to the previous one after finishing up
+ }
+ #endif // BLADERUNNER_ORIGINAL_BUGS#else [new code]
return true;
}
}