1
0
forked from 0ad/0ad

Check for lastPos existence in Combat-Approaching-MovementUpdate [fix 5568bd4c16]

Fixes 5568bd4c16

`lastPos` isn't guaranteed to exist, though formations are most likely
required to make the situation happen in common gameplay.

Reviewed By: Freagarach
Differential Revision: https://code.wildfiregames.com/D2960
This was SVN commit r23970.
This commit is contained in:
wraitii 2020-08-18 07:46:29 +00:00
parent dbca1ed99b
commit 78d973c11e

View File

@ -1899,7 +1899,7 @@ UnitAI.prototype.UnitFsmSpec = {
this.FinishOrder();
return;
}
else if (!this.order.data.force)
else if (!this.order.data.force || !this.order.data.lastPos)
{
this.SetNextState("COMBAT.FINDINGNEWTARGET");
return;