Use campaignFinished variable in battle, to prevent script crashes.
This commit is contained in:
parent
0cd73db62e
commit
4ef44ed636
|
@ -36,6 +36,7 @@ static void options(void);
|
|||
static void returnFromOptions(void);
|
||||
static void checkSuspicionLevel(void);
|
||||
static void doTorelliFireStorm(void);
|
||||
static void endCampaign(void);
|
||||
|
||||
static int show;
|
||||
static float ssx, ssy;
|
||||
|
@ -116,6 +117,11 @@ static void logic(void)
|
|||
}
|
||||
|
||||
app.doTrophyAlerts = (battle.status != MS_IN_PROGRESS && battle.missionFinishedTimer <= -FPS * 2);
|
||||
|
||||
if (battle.campaignFinished)
|
||||
{
|
||||
endCampaign();
|
||||
}
|
||||
}
|
||||
|
||||
doWidgets();
|
||||
|
@ -425,7 +431,7 @@ static void doTorelliFireStorm(void)
|
|||
}
|
||||
}
|
||||
|
||||
void endCampaign(void)
|
||||
static void endCampaign(void)
|
||||
{
|
||||
awardTrophy("CAMPAIGN_COMPLETE");
|
||||
|
||||
|
|
|
@ -305,7 +305,7 @@ static void executeNextLine(ScriptRunner *runner)
|
|||
}
|
||||
else if (strcmp(command, "END_CAMPAIGN") == 0)
|
||||
{
|
||||
endCampaign();
|
||||
battle.campaignFinished = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -42,7 +42,6 @@ extern void createChristabelLocation(void);
|
|||
extern void killEntity(char *name);
|
||||
extern void updateEntitySide(char *side, char *entity);
|
||||
extern void activateTrespasserSpawner(void);
|
||||
extern void endCampaign(void);
|
||||
|
||||
extern Battle battle;
|
||||
extern Colors colors;
|
||||
|
|
|
@ -360,6 +360,7 @@ typedef struct {
|
|||
int zackariaSuspicionLevel;
|
||||
int destroyTorelli;
|
||||
float torelliFireStormAlpha;
|
||||
int campaignFinished;
|
||||
Entity *missionTarget;
|
||||
Entity *jumpgate;
|
||||
Entity *messageSpeaker;
|
||||
|
|
Loading…
Reference in New Issue