Skip to content

Commit

Permalink
Prevent transport timer persisting on pause menu
Browse files Browse the repository at this point in the history
  • Loading branch information
DARwins1 committed Oct 16, 2023
1 parent 72e7e69 commit b15d77b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
3 changes: 2 additions & 1 deletion data/base/script/campaign/libcampaign_includes/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,8 @@ function cam_eventTransporterLanded(transport)
else
{
// Make the transporter timer on Beta End disappear, since the transporter has arrived.
if (__camWinLossCallback === CAM_VICTORY_TIMEOUT) {
if (__camWinLossCallback === CAM_VICTORY_TIMEOUT)
{
setReinforcementTime(-1);
}
}
Expand Down
22 changes: 9 additions & 13 deletions src/mission.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3087,7 +3087,7 @@ void clearMissionWidgets()
intRemoveMissionTimer();
}

if (missionCanReEnforce())
if (mission.ETA >= 0)
{
intRemoveTransporterTimer();
}
Expand Down Expand Up @@ -3131,21 +3131,17 @@ void resetMissionWidgets()
stopMissionButtonFlash(IDTIMER_FORM);
}

if (missionCanReEnforce())
DROID* transporter = find_transporter();

// Check if not a reinforcement type mission and we have an transporter
if (!missionForReInforcements() && transporter != nullptr && !transporterFlying(transporter))
{
addTransporterTimerInterface();
// Show launch button if the transporter has not already been launched
intAddTransporterLaunch(transporter);
}
//check not a typical reinforcement mission
else if (!missionForReInforcements())
else if (mission.ETA >= 0)
{
if (auto transporter = find_transporter())
{
// Show launch button if the transporter has not already been launched
if (!transporterFlying(transporter))
{
intAddTransporterLaunch(transporter);
}
}
addTransporterTimerInterface();
}

}
Expand Down

0 comments on commit b15d77b

Please sign in to comment.