Skip to content

Commit

Permalink
Sync cam2-end.js.
Browse files Browse the repository at this point in the history
  • Loading branch information
KJeff01 committed Oct 19, 2020
1 parent 772862f commit 423961c
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions script/campaign/cam2-end.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,23 @@ function playLastVideo()
camPlayVideos("CAM2_OUT");
}

//Allow a win if a transporter was launched.
function eventTransporterLaunch(transport)
//Allow a win if a transporter was launched with a construction droid.
function eventTransporterLaunch(transporter)
{
if (transport.player === CAM_HUMAN_PLAYER)
if (!allowWin && transporter.player === CAM_HUMAN_PLAYER)
{
allowWin = true;
var cargoDroids = enumCargo(transporter);

for (var i = 0, len = cargoDroids.length; i < len; ++i)
{
var virDroid = cargoDroids[i];

if (virDroid && virDroid.droidType === DROID_CONSTRUCT)
{
allowWin = true;
break;
}
}
}
}

Expand Down

0 comments on commit 423961c

Please sign in to comment.