From e4e58e81d08c10b39b9296db618fa9badbe88586 Mon Sep 17 00:00:00 2001 From: Flugente Date: Thu, 19 Oct 2017 17:46:17 +0000 Subject: [PATCH] Fix: stealing from or in transit git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8499 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Strategic/Hourly Update.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Strategic/Hourly Update.cpp b/Strategic/Hourly Update.cpp index 8ee1886d..a95637b0 100644 --- a/Strategic/Hourly Update.cpp +++ b/Strategic/Hourly Update.cpp @@ -658,7 +658,7 @@ void HourlyStealUpdate() pSoldier = MercPtrs[ cnt ]; // merc must be alive, not travelling and awake. If he is in the currently loaded sector, we may not be in tactical (we would see an item suddenly disappearing) and not in combat - if ( pSoldier && !pSoldier->flags.fBetweenSectors && pSoldier->bActive && !pSoldier->flags.fMercAsleep && + if ( pSoldier && !pSoldier->flags.fBetweenSectors && pSoldier->bActive && !pSoldier->flags.fMercAsleep && pSoldier->bAssignment != IN_TRANSIT && pSoldier->bAssignment != ASSIGNMENT_POW && !( ( ( gWorldSectorX == pSoldier->sSectorX ) && ( gWorldSectorY == pSoldier->sSectorY ) && (gbWorldSectorZ == pSoldier->bSectorZ ) ) && (gTacticalStatus.fEnemyInSector || guiCurrentScreen == GAME_SCREEN )) ) { if ( pSoldier->HasBackgroundFlag( BACKGROUND_SCROUNGING ) ) @@ -672,7 +672,8 @@ void HourlyStealUpdate() { pOtherSoldier = MercPtrs[ cnt2 ]; // note - snitches stop others, but can scrounge themselves (if they have scrounging specifically set in background...) - if( pOtherSoldier && !pOtherSoldier->flags.fBetweenSectors && pOtherSoldier->bActive && !pOtherSoldier->flags.fMercAsleep && pSoldier->ubProfile != pOtherSoldier->ubProfile ) + if( pOtherSoldier && !pOtherSoldier->flags.fBetweenSectors && pOtherSoldier->bAssignment != IN_TRANSIT && pOtherSoldier->bAssignment != ASSIGNMENT_POW && + pOtherSoldier->bActive && !pOtherSoldier->flags.fMercAsleep && pSoldier->ubProfile != pOtherSoldier->ubProfile ) { if ( ProfileHasSkillTrait( pOtherSoldier->ubProfile, SNITCH_NT ) && !( pSoldier->usSoldierFlagMask2 & SOLDIER_PREVENT_MISBEHAVIOUR_OFF ) ) {