Do not shuffle VTOL droids out of the way if they are busy rearming on a rearm pad.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7653 4a71c877-e1ca-e34f-864e-861f7616d084
master
Per Inge Mathisen 2009-06-04 17:19:13 +00:00 committed by Git SVN Gateway
parent d6e036a25d
commit c6eb8163f2
1 changed files with 18 additions and 14 deletions

View File

@ -1434,22 +1434,26 @@ static void moveCalcDroidSlide(DROID *psDroid, float *pmx, float *pmy)
}
// tell inactive droids to get out the way
if ((psObst->type == OBJ_DROID) &&
aiCheckAlliances(psObst->player, psDroid->player) &&
((((DROID *)psObst)->sMove.Status == MOVEINACTIVE) ||
(((DROID *)psObst)->sMove.Status == MOVEROUTE)) )
if (psObst->type == OBJ_DROID)
{
if (psDroid->sMove.Status == MOVESHUFFLE)
DROID *psShuffleDroid = (DROID *)psObst;
if (aiCheckAlliances(psObst->player, psDroid->player)
&& psShuffleDroid->action != DACTION_WAITDURINGREARM
&& (psShuffleDroid->sMove.Status == MOVEINACTIVE || psShuffleDroid->sMove.Status == MOVEROUTE))
{
moveShuffleDroid( (DROID *)psObst, psDroid->sMove.shuffleStart,
psDroid->sMove.targetX - (SDWORD)psDroid->pos.x,
psDroid->sMove.targetY - (SDWORD)psDroid->pos.y);
}
else
{
moveShuffleDroid( (DROID *)psObst, gameTime,
psDroid->sMove.targetX - (SDWORD)psDroid->pos.x,
psDroid->sMove.targetY - (SDWORD)psDroid->pos.y);
if (psDroid->sMove.Status == MOVESHUFFLE)
{
moveShuffleDroid(psShuffleDroid, psDroid->sMove.shuffleStart,
psDroid->sMove.targetX - (SDWORD)psDroid->pos.x,
psDroid->sMove.targetY - (SDWORD)psDroid->pos.y);
}
else
{
moveShuffleDroid(psShuffleDroid, gameTime,
psDroid->sMove.targetX - (SDWORD)psDroid->pos.x,
psDroid->sMove.targetY - (SDWORD)psDroid->pos.y);
}
}
}
}