Don't desynch on embarking nor crash on disembarking.

master
Cyp 2010-10-23 22:15:21 +02:00
parent 1481ec6830
commit aea0933672
1 changed files with 15 additions and 17 deletions

View File

@ -850,9 +850,6 @@ void orderUpdateDroid(DROID *psDroid)
}
else if (abs((SDWORD)psDroid->pos.x - (SDWORD)psDroid->psTarget->pos.x) < TILE_UNITS
&& abs((SDWORD)psDroid->pos.y - (SDWORD)psDroid->psTarget->pos.y) < TILE_UNITS)
{
// if in multiPlayer, only want to process if this player's droid
if (!bMultiPlayer || psDroid->player == selectedPlayer)
{
// save the target of current droid (the transporter)
DROID * transporter = (DROID *)psDroid->psTarget;
@ -861,7 +858,9 @@ void orderUpdateDroid(DROID *psDroid)
CHECK_DROID(transporter);
// order the droid to stop so moveUpdateDroid does not process this unit
turnOffMultiMsg(true); // Do this now, since synchronised. If sending later, it's too late.
orderDroid(psDroid, DORDER_STOP);
turnOffMultiMsg(false);
setDroidTarget(psDroid, NULL);
psDroid->psTarStats = NULL;
secondarySetState(psDroid, DSO_RETURN_TO_LOC, DSS_NONE);
@ -871,7 +870,6 @@ void orderUpdateDroid(DROID *psDroid)
*/
transporterAddDroid(transporter, psDroid);
}
}
else if (psDroid->action == DACTION_NONE)
{
actionDroidLoc(psDroid, DACTION_MOVE, psDroid->psTarget->pos.x,psDroid->psTarget->pos.y);