mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10: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:
@@ -4103,10 +4103,11 @@ void CalculateAttackValues()
|
||||
pCell->usNextAttack += (UINT32)(( i - 4 ) * 2000 );
|
||||
}
|
||||
|
||||
|
||||
if( i >= CountAllMilitiaInSector( gpAR->ubSectorX, gpAR->ubSectorY ) )
|
||||
{ //Extra delay if soldier's from reinforcement
|
||||
pCell->usNextAttack += REINFORCMENT_ATTACK_DELAY_PER_SOLDIER_IN_SECTOR * CountAllMilitiaInSector( gpAR->ubSectorX, gpAR->ubSectorY );
|
||||
UINT8 militiainsector = NumNonPlayerTeamMembersInSector( gpAR->ubSectorX, gpAR->ubSectorY, MILITIA_TEAM );
|
||||
if ( i >= militiainsector )
|
||||
{
|
||||
//Extra delay if soldier's from reinforcement
|
||||
pCell->usNextAttack += REINFORCMENT_ATTACK_DELAY_PER_SOLDIER_IN_SECTOR * militiainsector;
|
||||
}
|
||||
|
||||
|
||||
@@ -5661,7 +5662,7 @@ void CheckForSoldiersWhoRetreatedIntoMilitiaHeldSectors()
|
||||
for(int sY = 1; sY < ( MAP_WORLD_Y - 1); sY++ ) {
|
||||
// Check if there is a sector where enemies retreated to and there are also militia present
|
||||
if ( (NumNonPlayerTeamMembersInSector( sX, sY, ENEMY_TEAM ) > 0) &&
|
||||
(CountAllMilitiaInSector(sX, sY) > 0) &&
|
||||
(NumNonPlayerTeamMembersInSector( sX, sY, MILITIA_TEAM ) > 0) &&
|
||||
(!gTacticalStatus.fEnemyInSector)) {
|
||||
unsigned mercCnt = 0;
|
||||
for( int i = gTacticalStatus.Team[ OUR_TEAM ].bFirstID; i <= gTacticalStatus.Team[ OUR_TEAM ].bLastID; i++ ) {
|
||||
|
||||
Reference in New Issue
Block a user