mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
adjusted AI SAM site repairs:
- SAM sites are no longer repaired instantly when AI takes control of a sector - repairs begin 24 hours after the AI takes control, and repeat every 24 hours until the SAM is back at 100% - repairs can be interrupted by the player regaining control of the SAM site - time to repair a fully-destroyed SAM site depends on difficulty: novice takes 5 repair cycles, experienced takes 4, expert 3, and insane 2 - moved RepairSamSite() from ASD.h (where it was unused) into strategicmap.h - this sets up the existing but previously unused strategic event hook EVENT_SAMSITE_REPAIRED git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9349 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -2252,12 +2252,13 @@ DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"Strategic5");
|
||||
|
||||
if( IsThisSectorASAMSector( pGroup->ubSectorX, pGroup->ubSectorY, 0 ) )
|
||||
{
|
||||
int stratsector = CALCULATE_STRATEGIC_INDEX( pGroup->ubSectorX, pGroup->ubSectorY );
|
||||
StrategicMap[stratsector].bSAMCondition = 100;
|
||||
StrategicMap[stratsector].sSamHackStatus = 100;
|
||||
StrategicMap[stratsector].usFlags &= ~SAMSITE_REPAIR_ORDERED;
|
||||
|
||||
UpdateSAMDoneRepair( pGroup->ubSectorX, pGroup->ubSectorY, 0 );
|
||||
UINT16 stratsector = CALCULATE_STRATEGIC_INDEX( pGroup->ubSectorX, pGroup->ubSectorY );
|
||||
if ((StrategicMap[stratsector].usFlags & SAMSITE_REPAIR_ORDERED) == 0 && (StrategicMap[stratsector].bSAMCondition < 100 || StrategicMap[stratsector].sSamHackStatus < 100))
|
||||
{
|
||||
StrategicMap[stratsector].usFlags |= SAMSITE_REPAIR_ORDERED;
|
||||
AddStrategicEvent(EVENT_SAMSITE_REPAIRED, GetWorldTotalMin() + 24 * 60, stratsector);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user