Skip to content

Commit

Permalink
Small correction to Mission restarter
Browse files Browse the repository at this point in the history
  • Loading branch information
davidp57 committed Jan 8, 2020
1 parent 62843bc commit 6674c24
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/veaf/veaf.lua
Original file line number Diff line number Diff line change
Expand Up @@ -880,13 +880,14 @@ function veaf._endMission(delay1, message1, delay2, message2, delay3, message3)

if not delay1 then
-- no more delay, let's end this !
veaf.mainLogTrace("ending mission")
trigger.action.outText("Ending mission !",30)
veaf.mainLogInfo("ending mission")
trigger.action.setUserFlag("666", 1)
else
-- show the message
trigger.action.outText(message1,30)
-- schedule this function after "delay1" seconds
veaf.mainLogTrace(string.format("schedule veaf._endMission after %d seconds", delay1))
veaf.mainLogInfo(string.format("schedule veaf._endMission after %d seconds", delay1))
mist.scheduleFunction(veaf._endMission, {delay2, message2, delay3, message3}, timer.getTime()+delay1)
end
end
Expand All @@ -897,7 +898,6 @@ function veaf._checkForEndMission(endTimeInSeconds, checkIntervalInSeconds, chec
veaf.mainLogTrace(string.format("timer.getAbsTime()=%d", timer.getAbsTime()))

if timer.getAbsTime() >= endTimeInSeconds then
trigger.action.outText("Ending mission",30)
veaf.mainLogTrace("calling veaf._endMission")
veaf._endMission(delay1, message1, delay2, message2, delay3, message3)
else
Expand Down

0 comments on commit 6674c24

Please sign in to comment.