- bug fixing in the sam site externalization code

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@638 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Lesh
2006-11-27 18:19:50 +00:00
parent 49c33bfdfb
commit 4a2a790b76
6 changed files with 11 additions and 13 deletions
+4 -1
View File
@@ -1121,11 +1121,14 @@ void AddPossiblePendingEnemiesToBattle()
GROUP *pGroup;
SECTORINFO *pSector = &SectorInfo[ SECTOR( gWorldSectorX, gWorldSectorY ) ];
static UINT8 ubPredefinedInsertionCode = 255;
// check if no world is loaded
if ( !gWorldSectorX && !gWorldSectorY && (gbWorldSectorZ == -1) )
return;
if( ( !PlayerMercsInSector( (UINT8)gWorldSectorX, (UINT8)gWorldSectorY, 0 ) && !CountAllMilitiaInSector( gWorldSectorX, gWorldSectorY ) )
|| !NumEnemiesInSector( gWorldSectorX, gWorldSectorY ) ) return;
/* if( !gfPendingEnemies )
{ //Optimization. No point in checking if we know that there aren't any more enemies that can
//be added to this battle. This changes whenever a new enemy group arrives at the scene.