mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
- when enemy retreats he will be added to the adjacent sector, not deleted
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@316 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+40
-1
@@ -2828,6 +2828,8 @@ void SetNewSituation( SOLDIERTYPE * pSoldier )
|
||||
|
||||
void HandleAITacticalTraversal( SOLDIERTYPE * pSoldier )
|
||||
{
|
||||
UINT8 ubQuoteActionID = pSoldier->ubQuoteActionID;
|
||||
|
||||
HandleNPCChangesForTacticalTraversal( pSoldier );
|
||||
|
||||
if ( pSoldier->ubProfile != NO_PROFILE && NPCHasUnusedRecordWithGivenApproach( pSoldier->ubProfile, APPROACH_DONE_TRAVERSAL ) )
|
||||
@@ -2855,7 +2857,44 @@ void HandleAITacticalTraversal( SOLDIERTYPE * pSoldier )
|
||||
}
|
||||
else
|
||||
{
|
||||
ProcessQueenCmdImplicationsOfDeath( pSoldier );
|
||||
int iMapX = gWorldSectorX;
|
||||
int iMapY = gWorldSectorY;
|
||||
|
||||
switch( ubQuoteActionID )
|
||||
{
|
||||
case QUOTE_ACTION_ID_TRAVERSE_EAST:
|
||||
++iMapX;
|
||||
break;
|
||||
case QUOTE_ACTION_ID_TRAVERSE_WEST:
|
||||
--iMapX;
|
||||
break;
|
||||
case QUOTE_ACTION_ID_TRAVERSE_SOUTH:
|
||||
++iMapY;
|
||||
break;
|
||||
case QUOTE_ACTION_ID_TRAVERSE_NORTH:
|
||||
--iMapY;
|
||||
break;
|
||||
}
|
||||
|
||||
SECTORINFO *pSectorInfo = &( SectorInfo[ SECTOR( iMapX, iMapY ) ] );
|
||||
|
||||
switch( pSoldier->ubSoldierClass )
|
||||
{
|
||||
case SOLDIER_CLASS_ELITE:
|
||||
++pSectorInfo->ubNumElites;
|
||||
break;
|
||||
|
||||
case SOLDIER_CLASS_ARMY:
|
||||
++pSectorInfo->ubNumTroops;
|
||||
break;
|
||||
|
||||
case SOLDIER_CLASS_ADMINISTRATOR:
|
||||
++pSectorInfo->ubNumAdmins;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
ProcessQueenCmdImplicationsOfDeath( pSoldier );
|
||||
TacticalRemoveSoldier( pSoldier->ubID );
|
||||
}
|
||||
CheckForEndOfBattle( TRUE );
|
||||
|
||||
Reference in New Issue
Block a user