diff --git a/ModularizedTacticalAI/src/CivilianPlan.cpp b/ModularizedTacticalAI/src/CivilianPlan.cpp index abd302bcc..7a20ca95d 100644 --- a/ModularizedTacticalAI/src/CivilianPlan.cpp +++ b/ModularizedTacticalAI/src/CivilianPlan.cpp @@ -1,5 +1,7 @@ #include "../include/CivilianPlan.h" #include "../../TacticalAI/ai.h" +#include "NPC.h" +#include "Soldier Profile.h" namespace AI { @@ -13,6 +15,20 @@ namespace AI void CivilianPlan::execute(PlanInputData& environment) { + if ( !environment.turn_based() ) + { + if ( (get_npc()->ubProfile != NO_PROFILE) && (gMercProfiles[get_npc()->ubProfile].ubMiscFlags3 & PROFILE_MISC_FLAG3_HANDLE_DONE_TRAVERSAL) ) + { + TriggerNPCWithGivenApproach(get_npc()->ubProfile, APPROACH_DONE_TRAVERSAL, FALSE); + gMercProfiles[get_npc()->ubProfile].ubMiscFlags3 &= (~PROFILE_MISC_FLAG3_HANDLE_DONE_TRAVERSAL); + get_npc()->ubQuoteActionID = 0; + // wait a tiny bit + get_npc()->aiData.usActionData = 100; + get_npc()->aiData.bAction = AI_ACTION_WAIT; + return; + } + } + switch (get_npc()->aiData.bAlertStatus) { case STATUS_GREEN: