avoid trying to attack (before gathering) for ever an animal which is not visible anymore (bug not yet met because unlikely)

This was SVN commit r9661.
This commit is contained in:
Badmadblacksad 2011-06-25 20:56:46 +00:00
parent c8b0d7c11c
commit fed56af8a7

View File

@ -283,6 +283,13 @@ var UnitFsmSpec = {
},
"Order.Gather": function(msg) {
//If target is not visible anymore, give up
if (!this.CheckTargetVisible(this.order.data.target))
{
this.FinishOrder();
return;
}
// If the target is still alive, we need to kill it first
if (this.MustKillGatherTarget(this.order.data.target))
{