From d4b6b6f4a7caf4d876bd94468711edafee57d38e Mon Sep 17 00:00:00 2001 From: silversurfer Date: Sun, 2 Nov 2014 13:41:18 +0000 Subject: [PATCH] Fix: During Autoresolve a group that was in the sector could be assigned again as reinforcement which practically cloned the soldiers. Groups that are in the battle sector already now will not be considered as reinforcement anymore. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7636 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Strategic/Reinforcement.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Strategic/Reinforcement.cpp b/Strategic/Reinforcement.cpp index ff8fcafe0..07fa2c1de 100644 --- a/Strategic/Reinforcement.cpp +++ b/Strategic/Reinforcement.cpp @@ -105,8 +105,10 @@ BOOLEAN IsGroupInARightSectorToReinforce( GROUP *pGroup, INT16 sSectorX, INT16 s UINT16 pusMoveDir[4][3]; UINT8 ubDirNumber = 0, ubIndex; - if( pGroup->ubSectorX == sSectorX && pGroup->ubSectorY == sSectorY ) - return TRUE; //Well, it's in the same sector, so allow to reinforce + // silversurfer: A group that is already in the right sector is not reinforcement. It's either stationary or mobile. Reinforcements have to come from different sectors. + // If we allow groups here that are already in the sector we will assign them twice (stationary/mobile + reinforcement)! Not good. +/* if( pGroup->ubSectorX == sSectorX && pGroup->ubSectorY == sSectorY ) + return TRUE; //Well, it's in the same sector, so allow to reinforce*/ if( !gGameExternalOptions.gfAllowReinforcements ) return FALSE;