mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Fix for PMC/militiaroster email being sent over and over.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9345 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -70,6 +70,8 @@ typedef enum
|
||||
#define ENRICO_EMAIL_SENT_LACK_PROGRESS1 0x0080
|
||||
#define ENRICO_EMAIL_SENT_LACK_PROGRESS2 0x0100
|
||||
#define ENRICO_EMAIL_SENT_LACK_PROGRESS3 0x0200
|
||||
#define ENRICO_EMAIL_SENT_PMC 0x0400
|
||||
#define ENRICO_EMAIL_SENT_MILITIAROSTER 0x0800
|
||||
|
||||
// progress threshold that control Enrico E-mail timing
|
||||
#define SOME_PROGRESS_THRESHOLD 20
|
||||
|
||||
@@ -418,11 +418,17 @@ void TownMilitiaTrainingCompleted( SOLDIERTYPE *pTrainer, INT16 sMapX, INT16 sMa
|
||||
}
|
||||
|
||||
// Flugente: if we trained militia, the PMC notices us and offers their services
|
||||
if ( gGameExternalOptions.fPMC && !IsBookMarkSet( PMC_BOOKMARK ) )
|
||||
AddStrategicEvent( EVENT_PMC_EMAIL, GetWorldTotalMin() + 60 * (1 + Random(6)), 0 );
|
||||
if (gGameExternalOptions.fPMC && !IsBookMarkSet(PMC_BOOKMARK) && !(gStrategicStatus.usEnricoEmailFlags & ENRICO_EMAIL_SENT_PMC))
|
||||
{
|
||||
AddStrategicEvent(EVENT_PMC_EMAIL, GetWorldTotalMin() + 60 * (1 + Random(6)), 0);
|
||||
gStrategicStatus.usEnricoEmailFlags |= ENRICO_EMAIL_SENT_PMC;
|
||||
}
|
||||
|
||||
if ( gGameExternalOptions.fIndividualMilitia && !IsBookMarkSet( MILITIAROSTER_BOOKMARK ) )
|
||||
AddStrategicEvent( EVENT_MILITIAROSTER_EMAIL, GetWorldTotalMin( ) + 60 * (1 + Random( 4 )), 0 );
|
||||
if (gGameExternalOptions.fIndividualMilitia && !IsBookMarkSet(MILITIAROSTER_BOOKMARK) && !(gStrategicStatus.usEnricoEmailFlags & ENRICO_EMAIL_SENT_MILITIAROSTER))
|
||||
{
|
||||
AddStrategicEvent(EVENT_MILITIAROSTER_EMAIL, GetWorldTotalMin() + 60 * (1 + Random(4)), 0);
|
||||
gStrategicStatus.usEnricoEmailFlags |= ENRICO_EMAIL_SENT_MILITIAROSTER;
|
||||
}
|
||||
}
|
||||
|
||||
// feed this a SOLDIER_CLASS_, it will return you a _MITILIA rank, or -1 if the guy's not militia
|
||||
|
||||
Reference in New Issue
Block a user