From ceea35b0e98bc5be8f798cc2c0864915744a3e6e Mon Sep 17 00:00:00 2001 From: Flugente Date: Sat, 20 Jun 2015 16:25:53 +0000 Subject: [PATCH] Fix: if an enemy group is reassigned and ordered to retreat to its sector of creation, have it travel there instead of simply removing it git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7895 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Strategic/Strategic AI.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Strategic/Strategic AI.cpp b/Strategic/Strategic AI.cpp index 0007a988..21c4ce16 100644 --- a/Strategic/Strategic AI.cpp +++ b/Strategic/Strategic AI.cpp @@ -6511,7 +6511,7 @@ void ReassignAIGroup( GROUP **pGroup ) (*pGroup)->ubSectorIDOfLastReassignment = ubSectorID; - Ensure_RepairedGarrisonGroup( &gGarrisonGroup, &giGarrisonArraySize ); /* added NULL fix, 2007-03-03, Sgt. Kolja */ + Ensure_RepairedGarrisonGroup( &gGarrisonGroup, &giGarrisonArraySize ); /* added NULL fix, 2007-03-03, Sgt. Kolja */ ClearPreviousAIGroupAssignment( *pGroup ); //First thing to do, is teleport the group to be AT the sector he is currently moving from. Otherwise, the @@ -6634,7 +6634,9 @@ void ReassignAIGroup( GROUP **pGroup ) } } } - TransferGroupToPool( pGroup ); + + // Flugente: at least have them walk back correctly instead of just having them vanish + SendGroupToPool( pGroup ); } //When an enemy AI group is eliminated by the player, apply a grace period in which the