mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
Replaced
UINT8 CountAllMilitiaInSector(INT16 sMapX, INT16 sMapY); with UINT8 NumNonPlayerTeamMembersInSector( INT16 sSectorX, INT16 sSectorY, UINT8 ubTeam ); git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7708 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1528,7 +1528,7 @@ void AddPossiblePendingEnemiesToBattle()
|
||||
}
|
||||
}
|
||||
|
||||
if( ( !PlayerMercsInSector( (UINT8)gWorldSectorX, (UINT8)gWorldSectorY, 0 ) && !CountAllMilitiaInSector( gWorldSectorX, gWorldSectorY ) )
|
||||
if ( (!PlayerMercsInSector( (UINT8)gWorldSectorX, (UINT8)gWorldSectorY, 0 ) && !NumNonPlayerTeamMembersInSector( gWorldSectorX, gWorldSectorY, MILITIA_TEAM ))
|
||||
|| !NumNonPlayerTeamMembersInSector( gWorldSectorX, gWorldSectorY, ENEMY_TEAM ) )
|
||||
return;
|
||||
|
||||
@@ -1673,13 +1673,13 @@ void AddPossiblePendingEnemiesToBattle()
|
||||
|
||||
if( ubStrategicInsertionCode == 255 )
|
||||
{
|
||||
if( !CountAllMilitiaInSector( gWorldSectorX + 1, gWorldSectorY ) )
|
||||
if ( !NumNonPlayerTeamMembersInSector( gWorldSectorX + 1, gWorldSectorY, MILITIA_TEAM ) )
|
||||
ubStrategicInsertionCode = INSERTION_CODE_EAST;
|
||||
else if( !CountAllMilitiaInSector( gWorldSectorX - 1, gWorldSectorY ) )
|
||||
else if ( !NumNonPlayerTeamMembersInSector( gWorldSectorX - 1, gWorldSectorY, MILITIA_TEAM ) )
|
||||
ubStrategicInsertionCode = INSERTION_CODE_WEST;
|
||||
else if( !CountAllMilitiaInSector( gWorldSectorX, gWorldSectorY + 1 ) )
|
||||
else if ( !NumNonPlayerTeamMembersInSector( gWorldSectorX, gWorldSectorY + 1, MILITIA_TEAM ) )
|
||||
ubStrategicInsertionCode = INSERTION_CODE_SOUTH;
|
||||
else if( !CountAllMilitiaInSector( gWorldSectorX, gWorldSectorY - 1 ) )
|
||||
else if ( !NumNonPlayerTeamMembersInSector( gWorldSectorX, gWorldSectorY - 1, MILITIA_TEAM ) )
|
||||
ubStrategicInsertionCode = INSERTION_CODE_NORTH;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user