[Scummvm-git-logs] scummvm master -> 805dc466d02344a1368181f3cb852771d64a48a9

antoniou79 antoniou at cti.gr
Tue Mar 26 01:13:59 CET 2019


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
805dc466d0 BLADERUNNER: Resolve dead end state with Zuben


Commit: 805dc466d02344a1368181f3cb852771d64a48a9
    https://github.com/scummvm/scummvm/commit/805dc466d02344a1368181f3cb852771d64a48a9
Author: Thanasis Antoniou (a.antoniou79 at gmail.com)
Date: 2019-03-26T02:08:22+02:00

Commit Message:
BLADERUNNER: Resolve dead end state with Zuben

McCoy should now always be able to gather enough clues to trigger Zuben throwing the soup (via the VK test question if he does not have the Lucy photo clue).

Changed paths:
    engines/bladerunner/actor_clues.cpp
    engines/bladerunner/script/ai/officer_leary.cpp
    engines/bladerunner/script/ai/steele.cpp
    engines/bladerunner/script/init_script.cpp
    engines/bladerunner/script/kia_script.cpp
    engines/bladerunner/script/scene/ct02.cpp
    engines/bladerunner/script/scene/rc01.cpp


diff --git a/engines/bladerunner/actor_clues.cpp b/engines/bladerunner/actor_clues.cpp
index 1350b8d..63dbbbf 100644
--- a/engines/bladerunner/actor_clues.cpp
+++ b/engines/bladerunner/actor_clues.cpp
@@ -66,16 +66,25 @@ ActorClues::ActorClues(BladeRunnerEngine *vm, int cluesLimit) {
 
 void ActorClues::acquire(int clueId, bool flag2, int fromActorId) {
 	int clueIndex = findClueIndex(clueId);
-	_clues[clueIndex].flags |= 0x01;
-	_clues[clueIndex].flags = (_clues[clueIndex].flags & ~0x02) | ((flag2 << 1) & 0x02);
-	_clues[clueIndex].fromActorId = fromActorId;
-
+	if (clueIndex == -1) { // prevent assertion fault
+	//	debug("Actor could not acquire clue: \"%s\" from %d", _vm->_crimesDatabase->getClueText(clueId), fromActorId);
+		return;
+	} else {
+		_clues[clueIndex].flags |= 0x01;
+		_clues[clueIndex].flags = (_clues[clueIndex].flags & ~0x02) | ((flag2 << 1) & 0x02);
+		_clues[clueIndex].fromActorId = fromActorId;
 	// debug("Actor acquired clue: \"%s\" from %d", _vm->_crimesDatabase->getClueText(clueId), fromActorId);
+	}
 }
 
 void ActorClues::lose(int clueId) {
 	int clueIndex = findClueIndex(clueId);
-	_clues[clueIndex].flags = 0;
+	if (clueIndex == -1) { // prevent assertion fault
+	//	debug("Actor could not lose clue: \"%s\"", _vm->_crimesDatabase->getClueText(clueId));
+		return;
+	} else {
+		_clues[clueIndex].flags = 0;
+	}
 }
 
 bool ActorClues::isAcquired(int clueId) const {
diff --git a/engines/bladerunner/script/ai/officer_leary.cpp b/engines/bladerunner/script/ai/officer_leary.cpp
index d1e7eea..c4ddef7 100644
--- a/engines/bladerunner/script/ai/officer_leary.cpp
+++ b/engines/bladerunner/script/ai/officer_leary.cpp
@@ -64,6 +64,7 @@ bool AIScriptOfficerLeary::Update() {
 	 &&  Game_Flag_Query(kFlagRC51ChopstickWrapperTaken)
 	 &&  Game_Flag_Query(kFlagRC01ChromeDebrisTaken)
 	 &&  Player_Query_Current_Scene() != kSceneRC01
+	 &&  !Game_Flag_Query(kFlagRC01PoliceDone)          // otherwise this clause keeps repeating
 	 &&  Global_Variable_Query(kVariableChapter) < 3
 	) {
 		Game_Flag_Set(kFlagRC01PoliceDone);
diff --git a/engines/bladerunner/script/ai/steele.cpp b/engines/bladerunner/script/ai/steele.cpp
index f5e9f05..7e29a4f 100644
--- a/engines/bladerunner/script/ai/steele.cpp
+++ b/engines/bladerunner/script/ai/steele.cpp
@@ -390,6 +390,19 @@ void AIScriptSteele::ClickedByPlayer() {
 }
 
 void AIScriptSteele::EnteredScene(int sceneId) {
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+	if (Actor_Query_Goal_Number(kActorSteele) == kGoalSteeleGoToRC01) {
+		if (!Actor_Clue_Query(kActorMcCoy, kClueOfficersStatement))
+		{
+//			// no random factor here, Steele will definitely get this clue in this case
+			Actor_Clue_Acquire(kActorSteele, kClueOfficersStatement, true, kActorOfficerLeary); // Steele will upload this to the mainframe when she heads to the Police Station
+			Global_Variable_Increment(kVariableMcCoyEvidenceMissed, 1); // unused? but consistent with missing the other clues
+			return;  //true;
+		}
+	}
+#endif // BLADERUNNER_ORIGINAL_BUGS
+
 	if (Actor_Query_Goal_Number(kActorSteele) == kGoalSteeleGoToRC02) {
 		if (!Game_Flag_Query(kFlagRC51ChopstickWrapperTaken)
 		 &&  Random_Query(1, 3) == 1
diff --git a/engines/bladerunner/script/init_script.cpp b/engines/bladerunner/script/init_script.cpp
index a62ff81..7de781f 100644
--- a/engines/bladerunner/script/init_script.cpp
+++ b/engines/bladerunner/script/init_script.cpp
@@ -138,7 +138,11 @@ struct ClueWeight {
 	int weight;
 };
 
+#if BLADERUNNER_ORIGINAL_BUGS
 static ClueWeight ClueWeightsForSteele[44] = {
+#else
+static ClueWeight ClueWeightsForSteele[45] = {
+#endif // BLADERUNNER_ORIGINAL_BUGS
 	{kClueMcCoyRetiredZuben, 100},
 	{kClueMcCoyShotZubenInTheBack, 100},
 	{kClueMcCoyRetiredLucy, 100},
@@ -182,7 +186,11 @@ static ClueWeight ClueWeightsForSteele[44] = {
 	{kClueMcCoyKilledRunciter2, 55},
 	{kClueCandy, 30},
 	{kClueToyDog, 30},
-	{kClueDogCollar1, 30}
+	{kClueDogCollar1, 30},
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+	{kClueOfficersStatement, 30}, // part of resolving Zuben dead end state
+#endif // BLADERUNNER_ORIGINAL_BUGS
 };
 
 static ClueWeight ClueWeightsForGordo[28] = {
@@ -2239,6 +2247,9 @@ void InitScript::Init_SDB() {
 	SDB_Add_Whereabouts_Clue(kSuspectClovis, kClueChewInterview);
 	SDB_Add_Replicant_Clue(kSuspectClovis, kClueOfficersStatement);
 	SDB_Add_Replicant_Clue(kSuspectClovis, kClueDoorForced2);
+#if BLADERUNNER_RESTORED_CUT_CONTENT
+	SDB_Add_Replicant_Clue(kSuspectClovis, kClueDoorForced1);
+#endif // BLADERUNNER_RESTORED_CUT_CONTENT
 	SDB_Add_Replicant_Clue(kSuspectClovis, kClueMorajiInterview);
 	SDB_Add_Replicant_Clue(kSuspectClovis, kClueZubenTalksAboutLucy1);
 	SDB_Add_Replicant_Clue(kSuspectClovis, kClueZubenTalksAboutLucy2);
@@ -2267,6 +2278,9 @@ void InitScript::Init_SDB() {
 	SDB_Add_Whereabouts_Clue(kSuspectZuben, kClueRuncitersViewB);
 	SDB_Add_Replicant_Clue(kSuspectZuben, kClueOfficersStatement);
 	SDB_Add_Replicant_Clue(kSuspectZuben, kClueDoorForced2);
+#if BLADERUNNER_RESTORED_CUT_CONTENT
+	SDB_Add_Replicant_Clue(kSuspectZuben, kClueDoorForced1);
+#endif // BLADERUNNER_RESTORED_CUT_CONTENT
 	SDB_Add_Replicant_Clue(kSuspectZuben, kClueHowieLeeInterview);
 	SDB_Add_Replicant_Clue(kSuspectZuben, kClueZubenRunsAway);
 	SDB_Add_Replicant_Clue(kSuspectZuben, kClueZuben);
@@ -2476,6 +2490,9 @@ void InitScript::Init_CDB() {
 
 	CDB_Set_Clue_Asset_Type(kClueOfficersStatement, kClueTypeAudioRecording);
 	CDB_Set_Clue_Asset_Type(kClueDoorForced2, kClueTypeAudioRecording);
+#if BLADERUNNER_RESTORED_CUT_CONTENT
+	CDB_Set_Clue_Asset_Type(kClueDoorForced1, kClueTypeAudioRecording);
+#endif // BLADERUNNER_RESTORED_CUT_CONTENT
 	CDB_Set_Clue_Asset_Type(kClueLimpingFootprints, kClueTypeAudioRecording);
 	CDB_Set_Clue_Asset_Type(kClueGracefulFootprints, kClueTypeAudioRecording);
 	CDB_Set_Clue_Asset_Type(kClueShellCasings, kClueTypeObject);
diff --git a/engines/bladerunner/script/kia_script.cpp b/engines/bladerunner/script/kia_script.cpp
index 56a2e48..40a695e 100644
--- a/engines/bladerunner/script/kia_script.cpp
+++ b/engines/bladerunner/script/kia_script.cpp
@@ -45,6 +45,11 @@ void KIAScript::SCRIPT_KIA_DLL_Play_Clue_Asset_Script(int notUsed, int clueId) {
 	case kClueDoorForced2:
 		KIA_Play_Actor_Dialogue(kActorOfficerLeary, 0);
 		break;
+#if BLADERUNNER_RESTORED_CUT_CONTENT
+	case kClueDoorForced1:
+		KIA_Play_Actor_Dialogue(kActorVoiceOver, 1870);
+		break;
+#endif // BLADERUNNER_RESTORED_CUT_CONTENT
 	case kClueLimpingFootprints:
 		KIA_Play_Actor_Dialogue(kActorVoiceOver, 1970);
 		KIA_Play_Actor_Dialogue(kActorVoiceOver, 1980);
diff --git a/engines/bladerunner/script/scene/ct02.cpp b/engines/bladerunner/script/scene/ct02.cpp
index 0e62302..fbb6a06 100644
--- a/engines/bladerunner/script/scene/ct02.cpp
+++ b/engines/bladerunner/script/scene/ct02.cpp
@@ -127,9 +127,15 @@ void SceneScriptCT02::dialogueWithZuben() {
 		DM_Add_To_List_Never_Repeat_Once_Selected(280, 8, 5, 3); // LUCY
 	}
 	int evidenceCount = 0;
+#if BLADERUNNER_ORIGINAL_BUGS
 	if (Actor_Clue_Query(kActorMcCoy, kClueDoorForced2)) {
 		evidenceCount = 1;
 	}
+#else
+	if (Actor_Clue_Query(kActorMcCoy, kClueDoorForced2) || Actor_Clue_Query(kActorMcCoy, kClueDoorForced1)) {
+		++evidenceCount;
+	}
+#endif // BLADERUNNER_ORIGINAL_BUGS
 	if (Actor_Clue_Query(kActorMcCoy, kClueLabCorpses)) {
 		++evidenceCount;
 	}
@@ -142,9 +148,34 @@ void SceneScriptCT02::dialogueWithZuben() {
 	if (Actor_Clue_Query(kActorMcCoy, kClueHowieLeeInterview)) {
 		++evidenceCount;
 	}
+#if BLADERUNNER_ORIGINAL_BUGS
 	if (evidenceCount > 3) {
 		DM_Add_To_List_Never_Repeat_Once_Selected(290, -1, 4, 8); // VOIGT-KAMPFF
 	}
+#else
+	// There is an original game's dead end state where:
+	// 1. McCoy misses the Lucy Photo (he never gets the photos from Runciter),
+	// 2. misses the kClueDoorForced2 and Leary takes off so the player can't get it any more
+	// 3. the player does not talk to kFlagMcCoyHasOfficersStatement at all, and Leary takes off, so Dino won't give the kClueLabCorpses
+	//
+	// An easy to reproduce scenario is, after the intro:
+	// - McCoy takes the Chrome plate. Does not talk with Leary at all, nor orders the canvassing
+	// - Then, McCoy talks to Runciter until Lucy's desk location is unlocked
+	// - McCoy takes the chopstick wrapper and leaves for Chinatown.
+	//
+	//
+	// Solution:
+	// -. Restore acquiring of kClueDoorForced1 if McCoy visits the rc01 after Leary takes off.
+	//    The clue was also acquired in the original, but McCoy did not note he got something
+	//    and it was not taken into account for the evidenceCount var.
+	//    This clue is now considered as an alternative to kClueDoorForced2
+	// -. Steele will acquire the officer's statement clue if McCoy did not and will upload it to the mainframe
+	// -. Make McCoy able to VK Zuben even in Polite mode
+	//
+	if (evidenceCount > 3) {
+		DM_Add_To_List_Never_Repeat_Once_Selected(290, 0, 4, 8); // VOIGT-KAMPFF
+	}
+#endif // BLADERUNNER_ORIGINAL_BUGS
 	Dialogue_Menu_Add_DONE_To_List(300); // DONE
 
 	Dialogue_Menu_Appear(320, 240);
diff --git a/engines/bladerunner/script/scene/rc01.cpp b/engines/bladerunner/script/scene/rc01.cpp
index a371086..effe558 100644
--- a/engines/bladerunner/script/scene/rc01.cpp
+++ b/engines/bladerunner/script/scene/rc01.cpp
@@ -255,10 +255,24 @@ bool SceneScriptRC01::ClickedOn3DObject(const char *objectName, bool a2) {
 				Actor_Says(kActorOfficerLeary, 0, 12);
 				Actor_Says(kActorMcCoy, 4495, 13);
 				Actor_Clue_Acquire(kActorMcCoy, kClueDoorForced2, true, kActorOfficerLeary);
-			} else {
+			}
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+			else if (!Actor_Clue_Query(kActorMcCoy, kClueDoorForced2) && !Actor_Clue_Query(kActorMcCoy, kClueDoorForced1) && !Actor_Query_In_Set(kActorOfficerLeary, kSetRC01) && Global_Variable_Query(kVariableChapter) == 1) {
+#if BLADERUNNER_RESTORED_CUT_CONTENT
+				Actor_Voice_Over(1870, kActorVoiceOver);
+#else
+				Actor_Says(kActorMcCoy, 8570, 14);
+#endif // BLADERUNNER_RESTORED_CUT_CONTENT
+				Actor_Clue_Acquire(kActorMcCoy, kClueDoorForced1, true, -1);
+			}
+#endif // BLADERUNNER_ORIGINAL_BUGS
+			else {
 				Actor_Says(kActorMcCoy, 8570, 14);
 			}
+#if BLADERUNNER_ORIGINAL_BUGS
 			Actor_Clue_Acquire(kActorMcCoy, kClueDoorForced1, true, -1);
+#endif // BLADERUNNER_ORIGINAL_BUGS
 		}
 		return true;
 	}





More information about the Scummvm-git-logs mailing list