mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Merged revision(s) 6997-6998 from branches/ja2_source_official_2014:
- Campaign stats take spy actions and SAM sabotages into account - spy encounters are not reproted if nothing of interest happened - Fix: error in food system automatic canteen refill - Fix: if min enemy group size is too high, the AI never replensishes garrisons, thereby severely dumbing down the game. - Fix: enemy groups do not receive minimum size - Fix: enemy groups sizes are cut down needlessly git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6999 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -4796,10 +4796,11 @@ void UpdateAndDamageSAMIfFound( INT16 sSectorX, INT16 sSectorY, INT16 sSectorZ,
|
||||
// Damage.....
|
||||
sSectorNo = CALCULATE_STRATEGIC_INDEX( sSectorX, sSectorY );
|
||||
|
||||
INT8 statusbefore = StrategicMap[ sSectorNo ].bSAMCondition;
|
||||
|
||||
if ( StrategicMap[ sSectorNo ].bSAMCondition >= ubDamage )
|
||||
{
|
||||
StrategicMap[ sSectorNo ].bSAMCondition =
|
||||
StrategicMap[ sSectorNo ].bSAMCondition - ubDamage;
|
||||
StrategicMap[ sSectorNo ].bSAMCondition -= ubDamage;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4809,6 +4810,10 @@ void UpdateAndDamageSAMIfFound( INT16 sSectorX, INT16 sSectorY, INT16 sSectorZ,
|
||||
// SAM site may have been put out of commission...
|
||||
UpdateAirspaceControl( );
|
||||
|
||||
// Flugente: campaign stats: if SAM was functional before and isn't anymore, note this
|
||||
if ( statusbefore >= MIN_CONDITION_FOR_SAM_SITE_TO_WORK && StrategicMap[ sSectorNo ].bSAMCondition < MIN_CONDITION_FOR_SAM_SITE_TO_WORK )
|
||||
gCurrentIncident.usIncidentFlags |= INCIDENT_SAMSITE_SABOTAGED;
|
||||
|
||||
// ATE: GRAPHICS UPDATE WILL GET DONE VIA NORMAL EXPLOSION CODE.....
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user