From 44840ad883b3f7ee43f40c7c756b7884e8f1fd94 Mon Sep 17 00:00:00 2001 From: Wanne Date: Mon, 7 Nov 2011 09:20:18 +0000 Subject: [PATCH] - A few minor bugfixes (by Buggler) o Tactical Real-time Retreat bugfix (Overhead.cpp) o Enemy in pursuit mode bugfix (Strategy AI.cpp) o History Log Entry for Autoresolve Retreat (Auto Resolve.cpp) git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4781 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Strategic/Auto Resolve.cpp | 1 + Strategic/Strategic AI.cpp | 1 + Tactical/Overhead.cpp | 16 +++++++--------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Strategic/Auto Resolve.cpp b/Strategic/Auto Resolve.cpp index 2436068c..7c99ba79 100644 --- a/Strategic/Auto Resolve.cpp +++ b/Strategic/Auto Resolve.cpp @@ -2056,6 +2056,7 @@ void RenderAutoResolve() gsEnemyGainedControlOfSectorID = (INT16)SECTOR( gpAR->ubSectorX, gpAR->ubSectorY ); gsCiviliansEatenByMonsters = gpAR->ubAliveEnemies; } + LogBattleResults( LOG_DEFEAT ); break; } } diff --git a/Strategic/Strategic AI.cpp b/Strategic/Strategic AI.cpp index 0a38a2b7..bcceaa23 100644 --- a/Strategic/Strategic AI.cpp +++ b/Strategic/Strategic AI.cpp @@ -2115,6 +2115,7 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Strategic5"); Assert( !pGroup->fPlayer ); if( pGroup->pEnemyGroup->ubIntention == PURSUIT ) { //Lost the player group that he was going to attack. Return to original position. + SetThisSectorAsEnemyControlled( pGroup->ubSectorX, pGroup->ubSectorY, 0, TRUE ); ReassignAIGroup( &pGroup ); return TRUE; } diff --git a/Tactical/Overhead.cpp b/Tactical/Overhead.cpp index 98c15b04..c8daf2c0 100644 --- a/Tactical/Overhead.cpp +++ b/Tactical/Overhead.cpp @@ -6177,6 +6177,13 @@ BOOLEAN CheckForEndOfCombatMode( BOOLEAN fIncrementTurnsNotSeen ) // return(FALSE); //} + // First check for end of battle.... + // If there are no enemies at all in the sector + // Battle end should take precedence! + if ( CheckForEndOfBattle( FALSE ) ) + { + return( TRUE ); + } // We can only check for end of combat if in combat mode if ( ! ( gTacticalStatus.uiFlags & INCOMBAT ) ) @@ -6194,15 +6201,6 @@ BOOLEAN CheckForEndOfCombatMode( BOOLEAN fIncrementTurnsNotSeen ) return( FALSE ); } - // First check for end of battle.... - // If there are no enemies at all in the sector - // Battle end should take presedence! - if ( CheckForEndOfBattle( FALSE ) ) - { - return( TRUE ); - } - - fWeSeeNoOne = WeSeeNoOne(); fNobodyAlerted = NobodyAlerted();