mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +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;
|
return FALSE;
|
||||||
|
|
||||||
// Lesh: army externalization
|
// Lesh: army externalization
|
||||||
strcpy(fileName, directoryName);
|
|
||||||
strcat(fileName, COMPOSITIONFILENAME);
|
|
||||||
if ( !ReadInPatrolInfo(fileName) )
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
strcpy(fileName, directoryName);
|
strcpy(fileName, directoryName);
|
||||||
strcat(fileName, GARRISONFILENAME);
|
strcat(fileName, GARRISONFILENAME);
|
||||||
if ( !ReadInGarrisonInfo(fileName) )
|
if ( !ReadInGarrisonInfo(fileName) )
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ extern UINT8 gubCurrentTalkingID;
|
|||||||
// current temp path for dest char
|
// current temp path for dest char
|
||||||
extern PathStPtr pTempHelicopterPath;
|
extern PathStPtr pTempHelicopterPath;
|
||||||
|
|
||||||
extern UINT8 ubSAMControlledSectors[ MAP_WORLD_X ][ MAP_WORLD_Y ];
|
extern UINT8 ubSAMControlledSectors[ MAP_WORLD_Y ][ MAP_WORLD_X ];
|
||||||
|
|
||||||
// the seating capacities
|
// the seating capacities
|
||||||
extern INT32 iSeatingCapacities[];
|
extern INT32 iSeatingCapacities[];
|
||||||
@@ -1709,7 +1709,7 @@ BOOLEAN WillAirRaidBeStopped( INT16 sSectorX, INT16 sSectorY )
|
|||||||
|
|
||||||
|
|
||||||
// which SAM controls this sector?
|
// 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));
|
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("WillAirRaidBeStopped: SAM number = %d",ubSamNumber));
|
||||||
// if none of them
|
// if none of them
|
||||||
@@ -1772,7 +1772,7 @@ BOOLEAN HandleSAMSiteAttackOfHelicopterInSector( INT16 sSectorX, INT16 sSectorY
|
|||||||
}
|
}
|
||||||
|
|
||||||
// which SAM controls this sector?
|
// which SAM controls this sector?
|
||||||
ubSamNumber = ubSAMControlledSectors[ sSectorX ][ sSectorY ];
|
ubSamNumber = ubSAMControlledSectors[ sSectorY ][ sSectorX ];
|
||||||
|
|
||||||
// if none of them
|
// if none of them
|
||||||
if (ubSamNumber == 0)
|
if (ubSamNumber == 0)
|
||||||
|
|||||||
@@ -6664,7 +6664,7 @@ void ShowSAMSitesOnStrategicMap( void )
|
|||||||
BlitSAMGridMarkers( );
|
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?
|
// has the sam site here been found?
|
||||||
if( !fSamSiteFound[ iCounter ] )
|
if( !fSamSiteFound[ iCounter ] )
|
||||||
@@ -6770,7 +6770,7 @@ void BlitSAMGridMarkers( void )
|
|||||||
// clip to view region
|
// clip to view region
|
||||||
ClipBlitsToMapViewRegionForRectangleAndABit( uiDestPitchBYTES );
|
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?
|
// has the sam site here been found?
|
||||||
if( !fSamSiteFound[ iCounter ] )
|
if( !fSamSiteFound[ iCounter ] )
|
||||||
|
|||||||
@@ -1122,10 +1122,13 @@ void AddPossiblePendingEnemiesToBattle()
|
|||||||
SECTORINFO *pSector = &SectorInfo[ SECTOR( gWorldSectorX, gWorldSectorY ) ];
|
SECTORINFO *pSector = &SectorInfo[ SECTOR( gWorldSectorX, gWorldSectorY ) ];
|
||||||
static UINT8 ubPredefinedInsertionCode = 255;
|
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 ) )
|
if( ( !PlayerMercsInSector( (UINT8)gWorldSectorX, (UINT8)gWorldSectorY, 0 ) && !CountAllMilitiaInSector( gWorldSectorX, gWorldSectorY ) )
|
||||||
|| !NumEnemiesInSector( gWorldSectorX, gWorldSectorY ) ) return;
|
|| !NumEnemiesInSector( gWorldSectorX, gWorldSectorY ) ) return;
|
||||||
|
|
||||||
|
|
||||||
/* if( !gfPendingEnemies )
|
/* if( !gfPendingEnemies )
|
||||||
{ //Optimization. No point in checking if we know that there aren't any more enemies that can
|
{ //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.
|
//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;
|
UINT8 ubSamIndex;
|
||||||
|
|
||||||
// ALT-F9: Reveal all SAM sites
|
// 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 );
|
SetSAMSiteAsFound( ubSamIndex );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4249,7 +4249,7 @@ INT8 GetSAMIdFromSector( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ )
|
|||||||
sSectorValue = SECTOR( sSectorX, sSectorY );
|
sSectorValue = SECTOR( sSectorX, sSectorY );
|
||||||
|
|
||||||
// run through list of sam sites
|
// run through list of sam sites
|
||||||
for( bCounter = 0; bCounter < 4; bCounter++ )
|
for( bCounter = 0; bCounter < NUMBER_OF_SAMS; bCounter++ )
|
||||||
{
|
{
|
||||||
if( pSamList[ bCounter ] == sSectorValue )
|
if( pSamList[ bCounter ] == sSectorValue )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user