aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner/script/ai/free_slot_b.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/bladerunner/script/ai/free_slot_b.cpp')
-rw-r--r--engines/bladerunner/script/ai/free_slot_b.cpp75
1 files changed, 65 insertions, 10 deletions
diff --git a/engines/bladerunner/script/ai/free_slot_b.cpp b/engines/bladerunner/script/ai/free_slot_b.cpp
index ddb7f047ff..69274dae43 100644
--- a/engines/bladerunner/script/ai/free_slot_b.cpp
+++ b/engines/bladerunner/script/ai/free_slot_b.cpp
@@ -535,7 +535,12 @@ void AIScriptFreeSlotB::goToRandomUGxx() {
case 7:
// kSetUG07 or kSetFreeSlotG
+#if BLADERUNNER_ORIGINAL_BUGS
if (Actor_Query_In_Set(kActorClovis, kSetUG07)) {
+ // this check is not very effective since Clovis
+ // will spawn in the set when McCoy goes to the downwards exit
+ // at which point a rat may already be in the set and that could
+ // make them collide with Clovis' path
AI_Movement_Track_Append(kActorFreeSlotB, 39, 10);
} else {
World_Waypoint_Set(466, kSetUG07, -88.78f, -12.21f, -184.08f);
@@ -543,13 +548,26 @@ void AIScriptFreeSlotB::goToRandomUGxx() {
World_Waypoint_Set(548, kSetUG07, -164.78f, -12.21f, -832.08f);
AI_Movement_Track_Append(kActorFreeSlotB, 466, 5);
AI_Movement_Track_Append(kActorFreeSlotB, 547, 1);
+ // TODO: A bug? the waypoint 548 is created but is unused
}
break;
-
+#else
+ // Don't put rats in UG07 after the UG18 Guzza scene
+ // since Clovis may be there too and that does not work well
+ if (!Game_Flag_Query(kFlagUG18GuzzaScene)) {
+ World_Waypoint_Set(466, kSetUG07, -88.78f, -12.21f, -184.08f);
+ World_Waypoint_Set(547, kSetUG07, 250.0f, -12.21f, -342.0f);
+ World_Waypoint_Set(548, kSetUG07, -164.78f, -12.21f, -832.08f);
+ AI_Movement_Track_Append(kActorFreeSlotB, 466, 5);
+ AI_Movement_Track_Append(kActorFreeSlotB, 547, 1);
+ // TODO: A bug? the waypoint 548 is created but is unused
+ break;
+ }
+#endif // BLADERUNNER_ORIGINAL_BUGS
+ // fall through
case 8:
// kSetUG07
- // TODO a bug? Maybe also check here if Clovis is in the set
- // like in case 7
+#if BLADERUNNER_ORIGINAL_BUGS
World_Waypoint_Set(466, kSetUG07, -88.78f, -12.21f, -184.08f);
World_Waypoint_Set(547, kSetUG07, 250.0f, -12.21f, -342.0f);
World_Waypoint_Set(548, kSetUG07, -164.78f, -12.21f, -832.08f);
@@ -557,11 +575,23 @@ void AIScriptFreeSlotB::goToRandomUGxx() {
AI_Movement_Track_Append(kActorFreeSlotB, 466, 1);
// TODO: A bug? the waypoint 548 is created but is unused
break;
-
+#else
+ // Don't put rats in UG07 after the UG18 Guzza scene
+ // since Clovis may be there too and that does not work well
+ if (!Game_Flag_Query(kFlagUG18GuzzaScene)) {
+ World_Waypoint_Set(466, kSetUG07, -88.78f, -12.21f, -184.08f);
+ World_Waypoint_Set(547, kSetUG07, 250.0f, -12.21f, -342.0f);
+ World_Waypoint_Set(548, kSetUG07, -164.78f, -12.21f, -832.08f);
+ AI_Movement_Track_Append(kActorFreeSlotB, 547, 5);
+ AI_Movement_Track_Append(kActorFreeSlotB, 466, 1);
+ // TODO: A bug? the waypoint 548 is created but is unused
+ break;
+ }
+#endif // BLADERUNNER_ORIGINAL_BUGS
+ // fall through
case 9:
// kSetUG07
- // TODO a bug? Maybe also check here if Clovis is in the set
- // like in case 7
+#if BLADERUNNER_ORIGINAL_BUGS
World_Waypoint_Set(466, kSetUG07, -88.78f, -12.21f, -184.08f);
World_Waypoint_Set(547, kSetUG07, 250.0f, -12.21f, -342.0f);
World_Waypoint_Set(548, kSetUG07, -164.78f, -12.21f, -832.08f);
@@ -569,11 +599,23 @@ void AIScriptFreeSlotB::goToRandomUGxx() {
AI_Movement_Track_Append(kActorFreeSlotB, 548, 1);
// TODO: A bug? the waypoint 466 is created but is unused
break;
-
+#else
+ // Don't put rats in UG07 after the UG18 Guzza scene
+ // since Clovis may be there too and that does not work well
+ if (!Game_Flag_Query(kFlagUG18GuzzaScene)) {
+ World_Waypoint_Set(466, kSetUG07, -88.78f, -12.21f, -184.08f);
+ World_Waypoint_Set(547, kSetUG07, 250.0f, -12.21f, -342.0f);
+ World_Waypoint_Set(548, kSetUG07, -164.78f, -12.21f, -832.08f);
+ AI_Movement_Track_Append(kActorFreeSlotB, 547, 5);
+ AI_Movement_Track_Append(kActorFreeSlotB, 548, 1);
+ // TODO: A bug? the waypoint 466 is created but is unused
+ break;
+ }
+#endif // BLADERUNNER_ORIGINAL_BUGS
+ // fall through
case 10:
// kSetUG07
- // TODO a bug? Maybe also check here if Clovis is in the set
- // like in case 7
+#if BLADERUNNER_ORIGINAL_BUGS
World_Waypoint_Set(466, kSetUG07, -88.78f, -12.21f, -184.08f);
World_Waypoint_Set(547, kSetUG07, 250.0f, -12.21f, -342.0f);
World_Waypoint_Set(548, kSetUG07, -164.78f, -12.21f, -832.08f);
@@ -581,7 +623,20 @@ void AIScriptFreeSlotB::goToRandomUGxx() {
AI_Movement_Track_Append(kActorFreeSlotB, 547, 1);
// TODO: A bug? the waypoint 466 is created but is unused
break;
-
+#else
+ // Don't put rats in UG07 after the UG18 Guzza scene
+ // since Clovis may be there too and that does not work well
+ if (!Game_Flag_Query(kFlagUG18GuzzaScene)) {
+ World_Waypoint_Set(466, kSetUG07, -88.78f, -12.21f, -184.08f);
+ World_Waypoint_Set(547, kSetUG07, 250.0f, -12.21f, -342.0f);
+ World_Waypoint_Set(548, kSetUG07, -164.78f, -12.21f, -832.08f);
+ AI_Movement_Track_Append(kActorFreeSlotB, 548, 5);
+ AI_Movement_Track_Append(kActorFreeSlotB, 547, 1);
+ // TODO: A bug? the waypoint 466 is created but is unused
+ break;
+ }
+#endif // BLADERUNNER_ORIGINAL_BUGS
+ // fall through
case 11:
// kSetUG09
World_Waypoint_Set(466, kSetUG09, 91.0f, 156.94f, -498.0f);