[Scummvm-git-logs] scummvm master -> d1a2a2ff918cbb47926082c6199d16845d8972d5
antoniou79
antoniou at cti.gr
Wed Jun 26 12:26:17 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:
d1a2a2ff91 BLADERUNNER: Fix UG04 train disable control and Police AI
Commit: d1a2a2ff918cbb47926082c6199d16845d8972d5
https://github.com/scummvm/scummvm/commit/d1a2a2ff918cbb47926082c6199d16845d8972d5
Author: Thanasis Antoniou (a.antoniou79 at gmail.com)
Date: 2019-06-26T13:25:15+03:00
Commit Message:
BLADERUNNER: Fix UG04 train disable control and Police AI
Changed paths:
engines/bladerunner/script/ai/officer_grayford.cpp
engines/bladerunner/script/ai/officer_leary.cpp
engines/bladerunner/script/scene/ug04.cpp
diff --git a/engines/bladerunner/script/ai/officer_grayford.cpp b/engines/bladerunner/script/ai/officer_grayford.cpp
index 9e4f0b8..ae84933 100644
--- a/engines/bladerunner/script/ai/officer_grayford.cpp
+++ b/engines/bladerunner/script/ai/officer_grayford.cpp
@@ -760,8 +760,9 @@ bool AIScriptOfficerGrayford::GoalChanged(int currentGoalNumber, int newGoalNumb
break;
case 5:
+#if BLADERUNNER_ORIGINAL_BUGS
// kSetUG06 -> kSetFreeSlotC
-// debug("gray 8-5 kSetUG06 -> kSetFreeSlotC");
+ // debug("gray 8-5 kSetUG06 -> kSetFreeSlotC");
AI_Movement_Track_Append(kActorOfficerGrayford, 413, 10);
AI_Movement_Track_Append(kActorOfficerGrayford, 414, 0);
AI_Movement_Track_Append_With_Facing(kActorOfficerGrayford, 431, 0, 1017);
@@ -769,6 +770,22 @@ bool AIScriptOfficerGrayford::GoalChanged(int currentGoalNumber, int newGoalNumb
AI_Movement_Track_Append(kActorOfficerGrayford, 35, 30); // kSetFreeSlotC
AI_Movement_Track_Repeat(kActorOfficerGrayford);
break;
+#else
+ // Don't allow police officers to shoot McCoy while he is
+ // disabled reciting his monologue at start of Act 4
+ if (Game_Flag_Query(kFlagUG06Chapter4Started)) {
+ // kSetUG06 -> kSetFreeSlotC
+ // debug("gray 8-5 kSetUG06 -> kSetFreeSlotC");
+ AI_Movement_Track_Append(kActorOfficerGrayford, 413, 10);
+ AI_Movement_Track_Append(kActorOfficerGrayford, 414, 0);
+ AI_Movement_Track_Append_With_Facing(kActorOfficerGrayford, 431, 0, 1017);
+ AI_Movement_Track_Append(kActorOfficerGrayford, 432, 10);
+ AI_Movement_Track_Append(kActorOfficerGrayford, 35, 30); // kSetFreeSlotC
+ AI_Movement_Track_Repeat(kActorOfficerGrayford);
+ break;
+ }
+#endif // BLADERUNNER_ORIGINAL_BUGS
+ // fall through
case 6:
// kSetUG07 -> kSetFreeSlotC
diff --git a/engines/bladerunner/script/ai/officer_leary.cpp b/engines/bladerunner/script/ai/officer_leary.cpp
index 6bbfb18..8b3f7cf 100644
--- a/engines/bladerunner/script/ai/officer_leary.cpp
+++ b/engines/bladerunner/script/ai/officer_leary.cpp
@@ -163,7 +163,9 @@ bool AIScriptOfficerLeary::Update() {
}
break;
case kSetUG04:
+ // fall through
case kSetUG05:
+ // fall through
case kSetUG06:
if (Actor_Query_Which_Set_In(kActorOfficerLeary) == Player_Query_Current_Set()) {
Actor_Set_Goal_Number(kActorOfficerLeary, kGoalOfficerLearyAttackMcCoyAct4);
@@ -509,6 +511,7 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber)
AI_Movement_Track_Repeat(kActorOfficerLeary);
break;
case 5:
+#if BLADERUNNER_ORIGINAL_BUGS
// kSetUG06 -> kSetFreeSlotC
// debug("leary 8-5 kSetUG06 -> kSetFreeSlotC");
AI_Movement_Track_Append(kActorOfficerLeary, 413, 10);
@@ -518,6 +521,23 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber)
AI_Movement_Track_Append(kActorOfficerLeary, 35, 30); // kSetFreeSlotC
AI_Movement_Track_Repeat(kActorOfficerLeary);
break;
+#else
+ // Don't allow police officers to shoot McCoy while he is
+ // disabled reciting his monologue at start of Act 4
+ if (Game_Flag_Query(kFlagUG06Chapter4Started)) {
+ // kSetUG06 -> kSetFreeSlotC
+ // debug("leary 8-5 kSetUG06 -> kSetFreeSlotC");
+ AI_Movement_Track_Append(kActorOfficerLeary, 413, 10);
+ AI_Movement_Track_Append(kActorOfficerLeary, 414, 0);
+ AI_Movement_Track_Append_With_Facing(kActorOfficerLeary, 431, 0, 1017);
+ AI_Movement_Track_Append(kActorOfficerLeary, 432, 10);
+ AI_Movement_Track_Append(kActorOfficerLeary, 35, 30); // kSetFreeSlotC
+ AI_Movement_Track_Repeat(kActorOfficerLeary);
+ break;
+ }
+#endif // BLADERUNNER_ORIGINAL_BUGS
+ // fall through
+
case 6:
// kSetUG07 -> kSetFreeSlotC
// debug("leary 8-6 kSetUG07 -> kSetFreeSlotC");
diff --git a/engines/bladerunner/script/scene/ug04.cpp b/engines/bladerunner/script/scene/ug04.cpp
index a0db314..8ff6b48 100644
--- a/engines/bladerunner/script/scene/ug04.cpp
+++ b/engines/bladerunner/script/scene/ug04.cpp
@@ -64,12 +64,9 @@ void SceneScriptUG04::InitializeScene() {
Ambient_Sounds_Add_Sound(kSfxBBGRN2, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0);
Ambient_Sounds_Add_Sound(kSfxBBGRN3, 5, 50, 17, 37, -100, 100, -101, -101, 0, 0);
- if ((Global_Variable_Query(kVariableChapter) == 3)
- || (Global_Variable_Query(kVariableChapter) > 3 && Random_Query(1, 5) == 1)
- ){
- // enhancement: don't always play the bikers after chapter 3
- Scene_Loop_Start_Special(kSceneLoopModeLoseControl, kUG04LoopTrainLoop, false);
- }
+#if BLADERUNNER_ORIGINAL_BUGS
+ Scene_Loop_Start_Special(kSceneLoopModeLoseControl, kUG04LoopTrainLoop, false);
+#endif // BLADERUNNER_ORIGINAL_BUGS
Scene_Loop_Set_Default(kUG04LoopMainLoop);
}
@@ -83,6 +80,21 @@ void SceneScriptUG04::SceneLoaded() {
Unobstacle_Object("FLOOR DEBRIS WADS", true);
Unobstacle_Object("FLOOR DEBRIS WADS01", true);
Unobstacle_Object("FLOOR DEBRIS WADS02", true);
+
+#if BLADERUNNER_ORIGINAL_BUGS
+#else
+ if ((Global_Variable_Query(kVariableChapter) == 3)
+ || (Global_Variable_Query(kVariableChapter) > 3 && Random_Query(1, 4) == 1)
+ ){
+ // Enhancement: don't always play the overground train after chapter 3
+ // Bug fix: don't remove control from player. There is no chance to glitch into the scenery
+ // while the video is playing and rats may attack!
+ // Moved in SceneLoaded because the same code in InitializeScene
+ // resulted in a infinite loop of the special loop, when mode is set to kSceneLoopModeOnce instead of kSceneLoopModeLoseControl
+ Scene_Loop_Set_Default(kUG04LoopMainLoop);
+ Scene_Loop_Start_Special(kSceneLoopModeOnce, kUG04LoopTrainLoop, false);
+ }
+#endif // BLADERUNNER_ORIGINAL_BUGS
}
bool SceneScriptUG04::MouseClick(int x, int y) {
@@ -143,7 +155,11 @@ void SceneScriptUG04::ActorChangedGoal(int actorId, int newGoal, int oldGoal, bo
void SceneScriptUG04::PlayerWalkedIn() {
if (Game_Flag_Query(kFlagUG06toUG04)) {
+#if BLADERUNNER_ORIGINAL_BUGS
Loop_Actor_Walk_To_XYZ(kActorMcCoy, 60.0f, -1.74f, -976.0f, 6, false, false, false);
+#else
+ Loop_Actor_Walk_To_XYZ(kActorMcCoy, 60.0f, -1.74f, -976.0f, 6, true, false, false);
+#endif
Game_Flag_Reset(kFlagUG06toUG04);
}
}
More information about the Scummvm-git-logs
mailing list