Don't let AI fire missiles at point-blank range.
This commit is contained in:
parent
3fb9e8ef97
commit
886084f60f
|
@ -352,9 +352,11 @@ static void preAttack(void)
|
|||
{
|
||||
fireGuns(self);
|
||||
}
|
||||
else if (self->missiles)
|
||||
else if (self->missiles && getDistance(self->x, self->y, self->target->x, self->target->y) >= 350)
|
||||
{
|
||||
fireMissile(self);
|
||||
|
||||
self->action = doAI;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue