mirror of
https://github.com/1dot13/source.git
synced 2026-09-16 14:47:17 +02:00
- Bugfix: Updated unnecessary UpdateAirspaceControl (by Buggler)
o The Patch fix was basically put there as a coder did not catch a scenario where Player can move into enemy SAM (& possibly other impt sectors) 'uncontested' aka player entered sector w no enemies but flagged as enemy controlled. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4729 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -242,8 +242,8 @@ BOOLEAN SetThisSectorAsPlayerControlled( INT16 sMapX, INT16 sMapY, INT8 bMapZ, B
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// if player took control away from enemy
|
// if player took control away from enemy
|
||||||
if( fWasEnemyControlled && fContested )
|
if( fWasEnemyControlled )
|
||||||
{
|
{
|
||||||
// WDS - New AI
|
// WDS - New AI
|
||||||
// Hook in here for some stuff
|
// Hook in here for some stuff
|
||||||
@@ -287,9 +287,10 @@ BOOLEAN SetThisSectorAsPlayerControlled( INT16 sMapX, INT16 sMapY, INT8 bMapZ, B
|
|||||||
|
|
||||||
HandleMoraleEvent( NULL, MORALE_SAM_SITE_LIBERATED, sMapX, sMapY, bMapZ );
|
HandleMoraleEvent( NULL, MORALE_SAM_SITE_LIBERATED, sMapX, sMapY, bMapZ );
|
||||||
HandleGlobalLoyaltyEvent( GLOBAL_LOYALTY_GAIN_SAM, sMapX, sMapY, bMapZ );
|
HandleGlobalLoyaltyEvent( GLOBAL_LOYALTY_GAIN_SAM, sMapX, sMapY, bMapZ );
|
||||||
|
UpdateAirspaceControl( );
|
||||||
|
|
||||||
// if Skyrider has been delivered to chopper, and already mentioned Drassen SAM site, but not used this quote yet
|
// if Skyrider has been delivered to chopper, and already mentioned Drassen SAM site, but not used this quote yet
|
||||||
if ( IsHelicopterPilotAvailable() && ( guiHelicopterSkyriderTalkState >= 1 ) && ( !gfSkyriderSaidCongratsOnTakingSAM ) )
|
if ( IsHelicopterPilotAvailable( ) && ( guiHelicopterSkyriderTalkState >= 1 ) && ( !gfSkyriderSaidCongratsOnTakingSAM ) )
|
||||||
{
|
{
|
||||||
SkyRiderTalk( SAM_SITE_TAKEN );
|
SkyRiderTalk( SAM_SITE_TAKEN );
|
||||||
gfSkyriderSaidCongratsOnTakingSAM = TRUE;
|
gfSkyriderSaidCongratsOnTakingSAM = TRUE;
|
||||||
@@ -318,7 +319,7 @@ BOOLEAN SetThisSectorAsPlayerControlled( INT16 sMapX, INT16 sMapY, INT8 bMapZ, B
|
|||||||
// SetSectorFlag( sMapX, sMapY, bMapZ, SF_SECTOR_HAS_BEEN_LIBERATED_ONCE );
|
// SetSectorFlag( sMapX, sMapY, bMapZ, SF_SECTOR_HAS_BEEN_LIBERATED_ONCE );
|
||||||
if ( bMapZ == 0 && ( ( sMapY == MAP_ROW_M && (sMapX >= 2 && sMapX <= 6) ) || sMapY == MAP_ROW_N && sMapX == 6) )
|
if ( bMapZ == 0 && ( ( sMapY == MAP_ROW_M && (sMapX >= 2 && sMapX <= 6) ) || sMapY == MAP_ROW_N && sMapX == 6) )
|
||||||
{
|
{
|
||||||
HandleOutskirtsOfMedunaMeanwhileScene();
|
HandleOutskirtsOfMedunaMeanwhileScene( );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -346,7 +347,7 @@ BOOLEAN SetThisSectorAsPlayerControlled( INT16 sMapX, INT16 sMapY, INT8 bMapZ, B
|
|||||||
//KM : Aug 11, 1999 -- Patch fix: Relocated this check so it gets called everytime a sector changes hands,
|
//KM : Aug 11, 1999 -- Patch fix: Relocated this check so it gets called everytime a sector changes hands,
|
||||||
// even if the sector isn't a SAM site. There is a bug _somewhere_ that fails to update the airspace,
|
// even if the sector isn't a SAM site. There is a bug _somewhere_ that fails to update the airspace,
|
||||||
// even though the player controls it.
|
// even though the player controls it.
|
||||||
UpdateAirspaceControl( );
|
//UpdateAirspaceControl( );
|
||||||
|
|
||||||
// redraw map/income if in mapscreen
|
// redraw map/income if in mapscreen
|
||||||
fMapPanelDirty = TRUE;
|
fMapPanelDirty = TRUE;
|
||||||
@@ -424,6 +425,7 @@ BOOLEAN SetThisSectorAsEnemyControlled( INT16 sMapX, INT16 sMapY, INT8 bMapZ, BO
|
|||||||
{
|
{
|
||||||
HandleMoraleEvent( NULL, MORALE_SAM_SITE_LOST, sMapX, sMapY, bMapZ );
|
HandleMoraleEvent( NULL, MORALE_SAM_SITE_LOST, sMapX, sMapY, bMapZ );
|
||||||
HandleGlobalLoyaltyEvent( GLOBAL_LOYALTY_LOSE_SAM, sMapX, sMapY, bMapZ );
|
HandleGlobalLoyaltyEvent( GLOBAL_LOYALTY_LOSE_SAM, sMapX, sMapY, bMapZ );
|
||||||
|
UpdateAirspaceControl( );
|
||||||
}
|
}
|
||||||
|
|
||||||
// if it's a helicopter refueling site sector
|
// if it's a helicopter refueling site sector
|
||||||
@@ -464,7 +466,7 @@ BOOLEAN SetThisSectorAsEnemyControlled( INT16 sMapX, INT16 sMapY, INT8 bMapZ, BO
|
|||||||
//KM : Aug 11, 1999 -- Patch fix: Relocated this check so it gets called everytime a sector changes hands,
|
//KM : Aug 11, 1999 -- Patch fix: Relocated this check so it gets called everytime a sector changes hands,
|
||||||
// even if the sector isn't a SAM site. There is a bug _somewhere_ that fails to update the airspace,
|
// even if the sector isn't a SAM site. There is a bug _somewhere_ that fails to update the airspace,
|
||||||
// even though the player controls it.
|
// even though the player controls it.
|
||||||
UpdateAirspaceControl( );
|
//UpdateAirspaceControl( );
|
||||||
|
|
||||||
// redraw map/income if in mapscreen
|
// redraw map/income if in mapscreen
|
||||||
fMapPanelDirty = TRUE;
|
fMapPanelDirty = TRUE;
|
||||||
|
|||||||
Reference in New Issue
Block a user