aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner/script/ai
diff options
context:
space:
mode:
authorThanasis Antoniou2019-02-24 00:13:07 +0200
committerThanasis Antoniou2019-02-24 00:13:07 +0200
commit2301cc04a391a1d042843ea34cd8cbec128ae546 (patch)
tree4d2992f77c7d6eaab5e883c1ecaaf46f77b9b565 /engines/bladerunner/script/ai
parent28551e8124562440d21c23d2787f0205cd88cc6b (diff)
downloadscummvm-rg350-2301cc04a391a1d042843ea34cd8cbec128ae546.tar.gz
scummvm-rg350-2301cc04a391a1d042843ea34cd8cbec128ae546.tar.bz2
scummvm-rg350-2301cc04a391a1d042843ea34cd8cbec128ae546.zip
BLADERUNNER: Fix Moraji death screams and Grayford bug
Death scream in lab changed to his own. Death scream outside lab added. Also, original code had a bug whereby if you clicked through the conversation with Grayford about Moraji's murder, then clicking again on Moraji would restart the same conversation and this could go on infinitely.
Diffstat (limited to 'engines/bladerunner/script/ai')
-rw-r--r--engines/bladerunner/script/ai/moraji.cpp16
-rw-r--r--engines/bladerunner/script/ai/officer_grayford.cpp5
2 files changed, 17 insertions, 4 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);