Also make sure we clear droid actions that require valid targets when these

targets are cleared out from the map.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2988 4a71c877-e1ca-e34f-864e-861f7616d084
master
Per Inge Mathisen 2007-12-06 22:07:11 +00:00
parent 747df597fb
commit d7f6d50a5c
1 changed files with 8 additions and 0 deletions

View File

@ -4113,6 +4113,14 @@ void missionDestroyObjects(void)
if (psDroid->psActionTarget[i] && psDroid->psActionTarget[i]->died)
{
setDroidActionTarget(psDroid, NULL, i);
// Clear action too if this requires a valid first action target
if (i == 0
&& psDroid->action != DACTION_MOVEFIRE
&& psDroid->action != DACTION_TRANSPORTIN
&& psDroid->action != DACTION_TRANSPORTOUT)
{
psDroid->action = DACTION_NONE;
}
}
}
if (psDroid->psTarget && psDroid->psTarget->died)