mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
- 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:
@@ -369,11 +369,6 @@ BOOLEAN LoadExternalGameplayData(STR directoryName)
|
||||
return FALSE;
|
||||
|
||||
// Lesh: army externalization
|
||||
strcpy(fileName, directoryName);
|
||||
strcat(fileName, COMPOSITIONFILENAME);
|
||||
if ( !ReadInPatrolInfo(fileName) )
|
||||
return FALSE;
|
||||
|
||||
strcpy(fileName, directoryName);
|
||||
strcat(fileName, GARRISONFILENAME);
|
||||
if ( !ReadInGarrisonInfo(fileName) )
|
||||
|
||||
@@ -54,7 +54,7 @@ extern UINT8 gubCurrentTalkingID;
|
||||
// current temp path for dest char
|
||||
extern PathStPtr pTempHelicopterPath;
|
||||
|
||||
extern UINT8 ubSAMControlledSectors[ MAP_WORLD_X ][ MAP_WORLD_Y ];
|
||||
extern UINT8 ubSAMControlledSectors[ MAP_WORLD_Y ][ MAP_WORLD_X ];
|
||||
|
||||
// the seating capacities
|
||||
extern INT32 iSeatingCapacities[];
|
||||
@@ -1709,7 +1709,7 @@ BOOLEAN WillAirRaidBeStopped( INT16 sSectorX, INT16 sSectorY )
|
||||
|
||||
|
||||
// which SAM controls this sector?
|
||||
ubSamNumber = ubSAMControlledSectors[ sSectorX ][ sSectorY ];
|
||||
ubSamNumber = ubSAMControlledSectors[ sSectorY ][ sSectorX ];
|
||||
|
||||
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("WillAirRaidBeStopped: SAM number = %d",ubSamNumber));
|
||||
// if none of them
|
||||
@@ -1772,7 +1772,7 @@ BOOLEAN HandleSAMSiteAttackOfHelicopterInSector( INT16 sSectorX, INT16 sSectorY
|
||||
}
|
||||
|
||||
// which SAM controls this sector?
|
||||
ubSamNumber = ubSAMControlledSectors[ sSectorX ][ sSectorY ];
|
||||
ubSamNumber = ubSAMControlledSectors[ sSectorY ][ sSectorX ];
|
||||
|
||||
// if none of them
|
||||
if (ubSamNumber == 0)
|
||||
|
||||
@@ -6664,7 +6664,7 @@ void ShowSAMSitesOnStrategicMap( void )
|
||||
BlitSAMGridMarkers( );
|
||||
}
|
||||
|
||||
for( iCounter = 0; iCounter < NUMBER_OF_SAM_SITES; iCounter++ )
|
||||
for( iCounter = 0; iCounter < NUMBER_OF_SAMS; iCounter++ )
|
||||
{
|
||||
// has the sam site here been found?
|
||||
if( !fSamSiteFound[ iCounter ] )
|
||||
@@ -6770,7 +6770,7 @@ void BlitSAMGridMarkers( void )
|
||||
// clip to view region
|
||||
ClipBlitsToMapViewRegionForRectangleAndABit( uiDestPitchBYTES );
|
||||
|
||||
for( iCounter = 0; iCounter < NUMBER_OF_SAM_SITES; iCounter++ )
|
||||
for( iCounter = 0; iCounter < NUMBER_OF_SAMS; iCounter++ )
|
||||
{
|
||||
// has the sam site here been found?
|
||||
if( !fSamSiteFound[ iCounter ] )
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -5246,7 +5246,7 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
|
||||
UINT8 ubSamIndex;
|
||||
|
||||
// ALT-F9: Reveal all SAM sites
|
||||
for( ubSamIndex = 0; ubSamIndex < NUMBER_OF_SAM_SITES; ubSamIndex++ )
|
||||
for( ubSamIndex = 0; ubSamIndex < NUMBER_OF_SAMS; ubSamIndex++ )
|
||||
{
|
||||
SetSAMSiteAsFound( ubSamIndex );
|
||||
}
|
||||
|
||||
@@ -4249,7 +4249,7 @@ INT8 GetSAMIdFromSector( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ )
|
||||
sSectorValue = SECTOR( sSectorX, sSectorY );
|
||||
|
||||
// run through list of sam sites
|
||||
for( bCounter = 0; bCounter < 4; bCounter++ )
|
||||
for( bCounter = 0; bCounter < NUMBER_OF_SAMS; bCounter++ )
|
||||
{
|
||||
if( pSamList[ bCounter ] == sSectorValue )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user