diff options
-rw-r--r-- | engines/bladerunner/script/ai/free_slot_a.cpp | 74 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/free_slot_b.cpp | 75 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/officer_grayford.cpp | 2 | ||||
-rw-r--r-- | engines/bladerunner/script/ai/officer_leary.cpp | 3 |
4 files changed, 131 insertions, 23 deletions
diff --git a/engines/bladerunner/script/ai/free_slot_a.cpp b/engines/bladerunner/script/ai/free_slot_a.cpp index d87663a4a1..cba1488d45 100644 --- a/engines/bladerunner/script/ai/free_slot_a.cpp +++ b/engines/bladerunner/script/ai/free_slot_a.cpp @@ -685,7 +685,12 @@ void AIScriptFreeSlotA::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(kActorFreeSlotA, 39, 10); // kSetFreeSlotG } else { World_Waypoint_Set(463, kSetUG07, -88.78f, -12.21f, -184.08f); @@ -696,11 +701,23 @@ void AIScriptFreeSlotA::goToRandomUGxx() { // TODO: A bug? the waypoint 465 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(463, kSetUG07, -88.78f, -12.21f, -184.08f); + World_Waypoint_Set(464, kSetUG07, 250.0f, -12.21f, -342.0f); + World_Waypoint_Set(465, kSetUG07, -164.78f, -12.21f, -832.08f); + AI_Movement_Track_Append(kActorFreeSlotA, 463, 5); + AI_Movement_Track_Append(kActorFreeSlotA, 464, 1); + // TODO: A bug? the waypoint 465 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(463, kSetUG07, -88.78f, -12.21f, -184.08f); World_Waypoint_Set(464, kSetUG07, 250.0f, -12.21f, -342.0f); World_Waypoint_Set(465, kSetUG07, -164.78f, -12.21f, -832.08f); @@ -708,11 +725,23 @@ void AIScriptFreeSlotA::goToRandomUGxx() { AI_Movement_Track_Append(kActorFreeSlotA, 463, 1); // TODO: A bug? the waypoint 465 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(463, kSetUG07, -88.78f, -12.21f, -184.08f); + World_Waypoint_Set(464, kSetUG07, 250.0f, -12.21f, -342.0f); + World_Waypoint_Set(465, kSetUG07, -164.78f, -12.21f, -832.08f); + AI_Movement_Track_Append(kActorFreeSlotA, 464, 5); + AI_Movement_Track_Append(kActorFreeSlotA, 463, 1); + // TODO: A bug? the waypoint 465 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(463, kSetUG07, -88.78f, -12.21f, -184.08f); World_Waypoint_Set(464, kSetUG07, 250.0f, -12.21f, -342.0f); World_Waypoint_Set(465, kSetUG07, -164.78f, -12.21f, -832.08f); @@ -720,11 +749,23 @@ void AIScriptFreeSlotA::goToRandomUGxx() { AI_Movement_Track_Append(kActorFreeSlotA, 465, 1); // TODO: A bug? the waypoint 463 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(463, kSetUG07, -88.78f, -12.21f, -184.08f); + World_Waypoint_Set(464, kSetUG07, 250.0f, -12.21f, -342.0f); + World_Waypoint_Set(465, kSetUG07, -164.78f, -12.21f, -832.08f); + AI_Movement_Track_Append(kActorFreeSlotA, 464, 5); + AI_Movement_Track_Append(kActorFreeSlotA, 465, 1); + // TODO: A bug? the waypoint 463 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(463, kSetUG07, -88.78f, -12.21f, -184.08f); World_Waypoint_Set(464, kSetUG07, 250.0f, -12.21f, -342.0f); World_Waypoint_Set(465, kSetUG07, -164.78f, -12.21f, -832.08f); @@ -732,7 +773,20 @@ void AIScriptFreeSlotA::goToRandomUGxx() { AI_Movement_Track_Append(kActorFreeSlotA, 464, 1); // TODO: A bug? the waypoint 463 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(463, kSetUG07, -88.78f, -12.21f, -184.08f); + World_Waypoint_Set(464, kSetUG07, 250.0f, -12.21f, -342.0f); + World_Waypoint_Set(465, kSetUG07, -164.78f, -12.21f, -832.08f); + AI_Movement_Track_Append(kActorFreeSlotA, 465, 5); + AI_Movement_Track_Append(kActorFreeSlotA, 464, 1); + // TODO: A bug? the waypoint 463 is created but is unused + break; + } +#endif // BLADERUNNER_ORIGINAL_BUGS + // fall through case 11: // kSetUG09 World_Waypoint_Set(463, kSetUG09, 91.0f, 156.94f, -498.0f); 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); diff --git a/engines/bladerunner/script/ai/officer_grayford.cpp b/engines/bladerunner/script/ai/officer_grayford.cpp index be7c2354ac..42f02b128e 100644 --- a/engines/bladerunner/script/ai/officer_grayford.cpp +++ b/engines/bladerunner/script/ai/officer_grayford.cpp @@ -788,8 +788,8 @@ bool AIScriptOfficerGrayford::GoalChanged(int currentGoalNumber, int newGoalNumb // fall through case 6: -#if BLADERUNNER_ORIGINAL_BUGS // kSetUG07 -> kSetFreeSlotC +#if BLADERUNNER_ORIGINAL_BUGS // debug("gray 8-6 kSetUG07 -> kSetFreeSlotC"); AI_Movement_Track_Append(kActorOfficerGrayford, 415, 0); AI_Movement_Track_Append_With_Facing(kActorOfficerGrayford, 416, 0, 620); diff --git a/engines/bladerunner/script/ai/officer_leary.cpp b/engines/bladerunner/script/ai/officer_leary.cpp index 4cea60f103..dc1a8af49f 100644 --- a/engines/bladerunner/script/ai/officer_leary.cpp +++ b/engines/bladerunner/script/ai/officer_leary.cpp @@ -539,8 +539,8 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber) // fall through case 6: -#if BLADERUNNER_ORIGINAL_BUGS // kSetUG07 -> kSetFreeSlotC +#if BLADERUNNER_ORIGINAL_BUGS // debug("leary 8-6 kSetUG07 -> kSetFreeSlotC"); AI_Movement_Track_Append(kActorOfficerLeary, 415, 0); AI_Movement_Track_Append_With_Facing(kActorOfficerLeary, 416, 0, 620); @@ -553,7 +553,6 @@ bool AIScriptOfficerLeary::GoalChanged(int currentGoalNumber, int newGoalNumber) // Don't put police in UG07 after the UG18 Guzza scene // since Clovis may be there too and that does not work well if (!Game_Flag_Query(kFlagUG18GuzzaScene)) { - // kSetUG07 -> kSetFreeSlotC // debug("leary 8-6 kSetUG07 -> kSetFreeSlotC"); AI_Movement_Track_Append(kActorOfficerLeary, 415, 0); AI_Movement_Track_Append_With_Facing(kActorOfficerLeary, 416, 0, 620); |