mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
Built in safety check so that global offensives cannot be called more than once.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8123 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+6
-2
@@ -79,7 +79,7 @@ enum Quests
|
||||
QUEST_24 = 24,
|
||||
QUEST_KILL_DEIDRANNA = 25,
|
||||
|
||||
QUEST_KINGPIN_ANGEL_MARIA, // Flugente: new quest: if the palyer rescued Maria without implicating himself, Kingpin hires bounty hunters to kill them
|
||||
QUEST_KINGPIN_ANGEL_MARIA, // Flugente: new quest: if the player rescued Maria without implicating himself, Kingpin hires bounty hunters to kill them
|
||||
#endif
|
||||
} ;
|
||||
/*
|
||||
@@ -566,7 +566,7 @@ enum Facts
|
||||
FACT_BOUNTYHUNTER_SECTOR_2,
|
||||
FACT_BOUNTYHUNTER_KILLED_1,
|
||||
FACT_BOUNTYHUNTER_KILLED_2,
|
||||
|
||||
|
||||
#ifdef JA2UB
|
||||
//Ja25 UB
|
||||
FACT_IMPORTED_SAVE_AND_MARY_WAS_DEAD = 400,
|
||||
@@ -595,6 +595,10 @@ enum Facts
|
||||
FACT_BIGGENS_ON_TEAM_AND_FAN_STOPPED,// 423
|
||||
FACT_PLAYER_KNOWS_ABOUT_FAN_STOPPING,// 424
|
||||
#endif
|
||||
|
||||
// Flugente: for safety reasons, remember if we've already had an offensive
|
||||
FACT_GLOBAL_OFFENSIVE_1_ORDERED,
|
||||
FACT_GLOBAL_OFFENSIVE_2_ORDERED,
|
||||
} ;
|
||||
//** END FACTS *************************
|
||||
|
||||
|
||||
@@ -5254,6 +5254,11 @@ void ExecuteStrategicAIAction( UINT16 usActionCode, INT16 sSectorX, INT16 sSecto
|
||||
|
||||
giReinforcementPool = max( giReinforcementPool, 0 );
|
||||
}
|
||||
|
||||
if ( usActionCode == NPC_ACTION_GLOBAL_OFFENSIVE_1 )
|
||||
SetFactTrue( FACT_GLOBAL_OFFENSIVE_1_ORDERED );
|
||||
else if ( usActionCode == NPC_ACTION_GLOBAL_OFFENSIVE_2 )
|
||||
SetFactTrue( FACT_GLOBAL_OFFENSIVE_2_ORDERED );
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@@ -1708,12 +1708,14 @@ void HourlyProgressUpdate(void)
|
||||
// Flugente: on certain progress levels, the queen decides to initiate major attacks
|
||||
if ( ubCurrentProgress >= gGameExternalOptions.ubGameProgressOffensiveStage1 && gStrategicStatus.ubHighestProgress < gGameExternalOptions.ubGameProgressOffensiveStage1 )
|
||||
{
|
||||
ExecuteStrategicAIAction( NPC_ACTION_GLOBAL_OFFENSIVE_1, 0, 0 );
|
||||
if ( !CheckFact( FACT_GLOBAL_OFFENSIVE_1_ORDERED , 0) )
|
||||
ExecuteStrategicAIAction( NPC_ACTION_GLOBAL_OFFENSIVE_1, 0, 0 );
|
||||
}
|
||||
|
||||
if ( ubCurrentProgress >= gGameExternalOptions.ubGameProgressOffensiveStage2 && gStrategicStatus.ubHighestProgress < gGameExternalOptions.ubGameProgressOffensiveStage2 )
|
||||
{
|
||||
ExecuteStrategicAIAction( NPC_ACTION_GLOBAL_OFFENSIVE_2, 0, 0 );
|
||||
if ( !CheckFact( FACT_GLOBAL_OFFENSIVE_2_ORDERED, 0 ) )
|
||||
ExecuteStrategicAIAction( NPC_ACTION_GLOBAL_OFFENSIVE_2, 0, 0 );
|
||||
}
|
||||
|
||||
gStrategicStatus.ubHighestProgress = ubCurrentProgress;
|
||||
|
||||
Reference in New Issue
Block a user