Skip to content

Commit

Permalink
qtscript: Call the right event on transporter exit.
Browse files Browse the repository at this point in the history
It used to be known as CALL_START_NEXT_LEVEL in wzscript,
but in fact this is the event of the transporter flying
far enough from the LZ to trigger the start
of the offworld mission.

It does not seem to cause ambiguity with the event
of the transporter actually crossing the map boundary
(eg., after landing on the away mission).
  • Loading branch information
haoNoQ committed Nov 1, 2014
1 parent e43e57b commit cf6a369
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/action.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ void actionUpdateDroid(DROID *psDroid)
{
//the script can call startMission for this callback for offworld missions
eventFireCallbackTrigger((TRIGGER_TYPE)CALL_START_NEXT_LEVEL);
triggerEvent(TRIGGER_START_LEVEL);
triggerEvent(TRIGGER_TRANSPORTER_EXIT, psDroid);
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/order.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ void orderUpdateDroid(DROID *psDroid)
{
// the script can call startMission for this callback for offworld missions
eventFireCallbackTrigger((TRIGGER_TYPE)CALL_START_NEXT_LEVEL);
triggerEvent(TRIGGER_START_LEVEL);
triggerEvent(TRIGGER_TRANSPORTER_EXIT, psDroid);
}
}
}
Expand Down Expand Up @@ -411,7 +411,7 @@ void orderUpdateDroid(DROID *psDroid)
{
//the script can call startMission for this callback for offworld missions
eventFireCallbackTrigger((TRIGGER_TYPE)CALL_START_NEXT_LEVEL);
triggerEvent(TRIGGER_START_LEVEL);
triggerEvent(TRIGGER_TRANSPORTER_EXIT, psDroid);

/* clear order */
psDroid->order = DroidOrder(DORDER_NONE);
Expand Down Expand Up @@ -1124,7 +1124,7 @@ void orderUpdateDroid(DROID *psDroid)
{
// the script can call startMission for this callback for offworld missions
eventFireCallbackTrigger((TRIGGER_TYPE)CALL_START_NEXT_LEVEL);
triggerEvent(TRIGGER_START_LEVEL);
triggerEvent(TRIGGER_TRANSPORTER_EXIT, psDroid);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/transporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1172,7 +1172,7 @@ bool updateTransporter(DROID *psTransporter)

//the script can call startMission for this callback for offworld missions
eventFireCallbackTrigger((TRIGGER_TYPE)CALL_START_NEXT_LEVEL);
triggerEvent(TRIGGER_START_LEVEL);
triggerEvent(TRIGGER_TRANSPORTER_EXIT, psTransporter);

// clear order
psTransporter->order = DroidOrder(DORDER_NONE);
Expand Down

0 comments on commit cf6a369

Please sign in to comment.