[Scummvm-git-logs] scummvm master -> 67fd0ca34a4fe87cd85a09562ab938853adf314f

antoniou79 antoniou at cti.gr
Tue Aug 13 20:16:16 CEST 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:
67fd0ca34a BLADERUNNER: Prevent Replicants from despawning from the moonbus


Commit: 67fd0ca34a4fe87cd85a09562ab938853adf314f
    https://github.com/scummvm/scummvm/commit/67fd0ca34a4fe87cd85a09562ab938853adf314f
Author: Thanasis Antoniou (a.antoniou79 at gmail.com)
Date: 2019-08-13T21:04:18+03:00

Commit Message:
BLADERUNNER: Prevent Replicants from despawning from the moonbus

All Replicants get a new goal now inside the moonbus, and movement flush

This is to prevent earlier scripts that had them "walking around" from kicking in (this was mainly a bug for the twins) but is applied to everyone (except Clovis and Sadik) for conformance

Changed paths:
    engines/bladerunner/game_constants.h
    engines/bladerunner/script/ai/luther.cpp
    engines/bladerunner/script/scene/kp07.cpp
    engines/bladerunner/script/scene/ug01.cpp


diff --git a/engines/bladerunner/game_constants.h b/engines/bladerunner/game_constants.h
index 9e481d0..c947b2d 100644
--- a/engines/bladerunner/game_constants.h
+++ b/engines/bladerunner/game_constants.h
@@ -2121,7 +2121,7 @@ enum GoalDektora {
 	kGoalDektoraNR11BurningFallToNR10 = 279,
 	kGoalDektoraNR11RanAway = 290,
 	kGoalDektoraNR07RanAway = 295,
-
+	kGoalDektoraKP07Wait = 513, // new goal when in moonbus, Act 5
 	kGoalDektoraGone = 599
 };
 
@@ -2172,7 +2172,7 @@ enum GoalGordo {
 	kGoalGordoNR01Arrested = 260,
 	kGoalGordoNR01RanAway = 280,
 	kGoalGordoNR01Die = 299,
-
+	kGoalGordoKP07Wait = 513, // new goal when in moonbus, Act 5
 	kGoalGordoGone = 599
 };
 
@@ -2260,7 +2260,7 @@ enum GoalLucy {
 	kGoalLucyUG01Wait =	310,
 	kGoalLucyUG01VoightKampff = 311,
 	kGoalLucyUG01RunAway = 312,
-
+	kGoalLucyKP07Wait = 513, // new goal when in moonbus, Act 5
 	kGoalLucyGone = 599
 };
 
@@ -2283,6 +2283,7 @@ enum GoalIzo {
 	kGoalIzoGoToHC03 = 155,
 	kGoalIzoDieHidden = 198,
 	kGoalIzoDie = 199,
+	kGoalIzoKP07Wait = 513, // new goal when in moonbus, Act 5
 	kGoalIzoGone = 599
 };
 
@@ -2318,6 +2319,7 @@ enum GoalLuther {
 	kGoalLutherDyingCheck = 497,
 	kGoalLutherDie = 498,
 	kGoalLutherDead = 499,
+	kGoalLutherKP07Wait = 513, // new goal when in moonbus, Act 5
 	kGoalLutherGone = 599
 };
 
@@ -2439,6 +2441,7 @@ enum GoalZuben {
 	kGoalZubenFled = 20,
 	kGoalZubenMA01AttackMcCoy = 21,
 	kGoalZubenDiesInChapter1 = 99,
+	kGoalZubenKP07Wait = 513, // new goal when in moonbus, Act 5
 	kGoalZubenGone = 599
 };
 
diff --git a/engines/bladerunner/script/ai/luther.cpp b/engines/bladerunner/script/ai/luther.cpp
index 694dc6d..2957dcc 100644
--- a/engines/bladerunner/script/ai/luther.cpp
+++ b/engines/bladerunner/script/ai/luther.cpp
@@ -57,7 +57,7 @@ bool AIScriptLuther::Update() {
 	}
 
 	if (Actor_Query_Goal_Number(kActorLuther) == kGoalLutherDefault
-	 && Actor_Query_Goal_Number(kActorLuther) != kGoalLutherDead
+	 && Actor_Query_Goal_Number(kActorLuther) != kGoalLutherDead // A bug? this is redundant
 	) {
 		Actor_Set_Goal_Number(kActorLuther, kGoalLutherMoveAround);
 		return false;
diff --git a/engines/bladerunner/script/scene/kp07.cpp b/engines/bladerunner/script/scene/kp07.cpp
index 0643428..880c3f2 100644
--- a/engines/bladerunner/script/scene/kp07.cpp
+++ b/engines/bladerunner/script/scene/kp07.cpp
@@ -35,6 +35,16 @@ void SceneScriptKP07::InitializeScene() {
 		if (Game_Flag_Query(kFlagDektoraIsReplicant)
 		 && Actor_Query_Goal_Number(kActorDektora) < kGoalDektoraGone
 		) {
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+			if (Game_Flag_Query(kFlagNR11DektoraBurning)) {
+				Game_Flag_Reset(kFlagNR11DektoraBurning); // resolves a bug of an original game, where Dektora would default to burning state
+				Actor_Change_Animation_Mode(kActorDektora, kAnimationModeTalk); // dummy animation change to ensure that the next will trigger the mode change case
+				Actor_Change_Animation_Mode(kActorDektora, kAnimationModeIdle);
+			}
+			AI_Movement_Track_Flush(kActorDektora);
+			Actor_Set_Goal_Number(kActorDektora, kGoalDektoraKP07Wait); // new clear goal
+#endif // BLADERUNNER_ORIGINAL_BUGS
 			Actor_Set_Targetable(kActorDektora, true);
 			Global_Variable_Increment(kVariableReplicantsSurvivorsAtMoonbus, 1);
 			Actor_Put_In_Set(kActorDektora, kSetKP07);
@@ -42,6 +52,11 @@ void SceneScriptKP07::InitializeScene() {
 		}
 
 		if (Actor_Query_Goal_Number(kActorZuben) < kGoalZubenGone) {
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+			AI_Movement_Track_Flush(kActorZuben);
+			Actor_Set_Goal_Number(kActorZuben, kGoalZubenKP07Wait); // new clear goal
+#endif // BLADERUNNER_ORIGINAL_BUGS
 			Global_Variable_Increment(kVariableReplicantsSurvivorsAtMoonbus, 1);
 			Actor_Set_Targetable(kActorZuben, true);
 			Actor_Put_In_Set(kActorZuben, kSetKP07);
@@ -51,6 +66,11 @@ void SceneScriptKP07::InitializeScene() {
 		if (Game_Flag_Query(kFlagIzoIsReplicant)
 		 && Actor_Query_Goal_Number(kActorIzo) < 599
 		) {
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+			AI_Movement_Track_Flush(kActorIzo);
+			Actor_Set_Goal_Number(kActorIzo, kGoalIzoKP07Wait); // new clear goal
+#endif // BLADERUNNER_ORIGINAL_BUGS
 			Global_Variable_Increment(kVariableReplicantsSurvivorsAtMoonbus, 1);
 			Actor_Set_Targetable(kActorIzo, true);
 			Actor_Put_In_Set(kActorIzo, kSetKP07);
@@ -60,6 +80,11 @@ void SceneScriptKP07::InitializeScene() {
 		if (Game_Flag_Query(kFlagGordoIsReplicant)
 		 && Actor_Query_Goal_Number(kActorGordo) < kGoalGordoGone
 		) {
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+			AI_Movement_Track_Flush(kActorGordo);
+			Actor_Set_Goal_Number(kActorGordo, kGoalGordoKP07Wait); // new clear goal
+#endif // BLADERUNNER_ORIGINAL_BUGS
 			Global_Variable_Increment(kVariableReplicantsSurvivorsAtMoonbus, 1);
 			Actor_Set_Targetable(kActorGordo, true);
 			Actor_Put_In_Set(kActorGordo, kSetKP07);
@@ -69,12 +94,22 @@ void SceneScriptKP07::InitializeScene() {
 		if (Game_Flag_Query(kFlagLucyIsReplicant)
 		 && Actor_Query_Goal_Number(kActorLucy) < kGoalLucyGone
 		) {
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+			AI_Movement_Track_Flush(kActorLucy);
+			Actor_Set_Goal_Number(kActorLucy, kGoalLucyKP07Wait); // new clear goal
+#endif // BLADERUNNER_ORIGINAL_BUGS
 			Global_Variable_Increment(kVariableReplicantsSurvivorsAtMoonbus, 1);
 			Actor_Put_In_Set(kActorLucy, kSetKP07);
 			Actor_Set_At_XYZ(kActorLucy, 78.0f, -41.52f, -119.0f, 659);
 		}
 
 		if (Actor_Query_Goal_Number(kActorLuther) < kGoalLutherGone) {
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+			AI_Movement_Track_Flush(kActorLuther);
+			Actor_Set_Goal_Number(kActorLuther, kGoalLutherKP07Wait); // new goal to avoid resuming his walking around routine
+#endif // BLADERUNNER_ORIGINAL_BUGS
 			Global_Variable_Increment(kVariableReplicantsSurvivorsAtMoonbus, 1);
 			Actor_Put_In_Set(kActorLuther, kSetKP07);
 			Actor_Set_At_XYZ(kActorLuther, -47.0f, 0.0f, 151.0f, 531);
diff --git a/engines/bladerunner/script/scene/ug01.cpp b/engines/bladerunner/script/scene/ug01.cpp
index 3654631..b2fbc51 100644
--- a/engines/bladerunner/script/scene/ug01.cpp
+++ b/engines/bladerunner/script/scene/ug01.cpp
@@ -199,7 +199,7 @@ void SceneScriptUG01::PlayerWalkedIn() {
 
 	if (Actor_Query_Goal_Number(kActorLucy) == kGoalLucyUG01Wait) {
 		Music_Play(kMusicLoveSong, 35, 0, 3, -1, 0, 0);
-		Actor_Set_Goal_Number(kActorLucy, 311);
+		Actor_Set_Goal_Number(kActorLucy, kGoalLucyUG01VoightKampff);
 	}
 	//return false;
 }





More information about the Scummvm-git-logs mailing list