forked from 0ad/0ad
Send the move command directly instead of going through the FSM. That way, the failure can be catched earlier on. Should fix #2410
This was SVN commit r14698.
This commit is contained in:
parent
8953179e1a
commit
f097078d46
@ -816,9 +816,11 @@ var UnitFsmSpec = {
|
||||
{
|
||||
if (this.TargetIsAlive(target) && this.CheckTargetVisible(target))
|
||||
{
|
||||
var range = cmpAttack.GetRange(target);
|
||||
this.PushOrderFront("WalkToTargetRange", { "target": target, "min": range.min, "max": range.max });
|
||||
return;
|
||||
if (this.MoveToTargetAttackRange(target, target))
|
||||
{
|
||||
this.SetNextState("WALKING");
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.FinishOrder();
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user