diff options
| -rw-r--r-- | engines/bladerunner/script/ai/moraji.cpp | 16 | ||||
| -rw-r--r-- | engines/bladerunner/script/ai/officer_grayford.cpp | 5 | ||||
| -rw-r--r-- | engines/bladerunner/script/scene/dr04.cpp | 14 | 
3 files changed, 30 insertions, 5 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/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;  			}  		} | 
