Fix: militia can retreat to impassable sectors in autoresolve

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8836 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2020-07-04 14:46:19 +00:00
parent af04fe4b53
commit 0544227958
4 changed files with 9 additions and 8 deletions
+4 -4
View File
@@ -694,11 +694,11 @@ UINT8 GetTraversability( INT16 sStartSector, INT16 sEndSector )
return( SectorInfo[ sStartSector ].ubTraversability[ ubDirection ] );
}
BOOLEAN SectorIsImpassable( INT16 sSector )
BOOLEAN SectorIsImpassable( INT16 sSector, UINT8 aDirection )
{
// returns true if the sector is impassable in all directions
return( SectorInfo[ sSector ].ubTraversability[ THROUGH_STRATEGIC_MOVE ] == GROUNDBARRIER ||
SectorInfo[ sSector ].ubTraversability[ THROUGH_STRATEGIC_MOVE ] == EDGEOFWORLD );
// returns true if the sector is impassable in direction
return( SectorInfo[ sSector ].ubTraversability[aDirection] == GROUNDBARRIER ||
SectorInfo[ sSector ].ubTraversability[aDirection] == EDGEOFWORLD );
}
UINT8 gubEncryptionArray3[ BASE_NUMBER_OF_ROTATION_ARRAYS * 3 ][ NEW_ROTATION_ARRAY_SIZE ] =