In aiUpdateDroid - Move on to the next target if current target is probably doomed.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9276 4a71c877-e1ca-e34f-864e-861f7616d084
master
Guangcong Luo 2010-01-17 01:42:13 +00:00 committed by Git SVN Gateway
parent 6033e63f0b
commit a341785d23
1 changed files with 6 additions and 0 deletions

View File

@ -1076,6 +1076,12 @@ void aiUpdateDroid(DROID *psDroid)
{
updateTarget = true;
}
if ((orderState(psDroid, DORDER_OBSERVE) || orderState(psDroid, DORDER_ATTACKTARGET)) &&
psDroid->psTarget && aiObjectIsProbablyDoomed(psDroid->psTarget))
{
lookForTarget = true;
updateTarget = false;
}
/* Don't update target if we are sent to attack and reached
attack destination (attacking our target) */