forked from 0ad/0ad
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:
parent
c8b0d7c11c
commit
fed56af8a7
@ -283,6 +283,13 @@ var UnitFsmSpec = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
"Order.Gather": function(msg) {
|
"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 the target is still alive, we need to kill it first
|
||||||
if (this.MustKillGatherTarget(this.order.data.target))
|
if (this.MustKillGatherTarget(this.order.data.target))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user