Make sure hunting units don't forget about the initial herd position (fix for 8a38cfb7cf
)
Units move the InitPos of the heard to the last known position when going through Order.Gather, which they do multiple times when hunting, thus making them mistakenly move the herd position and unable to find it back. Differential Revision: https://code.wildfiregames.com/D2073 This was SVN commit r22471.
This commit is contained in:
parent
69f7a48dd9
commit
e53fb0a8d7
@ -529,7 +529,8 @@ UnitAI.prototype.UnitFsmSpec = {
|
||||
}
|
||||
|
||||
this.RememberTargetPosition();
|
||||
this.order.data.initPos = this.order.data.lastPos;
|
||||
if (!this.order.data.initPos)
|
||||
this.order.data.initPos = this.order.data.lastPos;
|
||||
|
||||
if (this.CheckTargetRange(this.order.data.target, IID_ResourceGatherer))
|
||||
this.SetNextState("INDIVIDUAL.GATHER.GATHERING");
|
||||
|
Loading…
Reference in New Issue
Block a user