mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-17 22:03:56 -07:00
Flush order queue when given an order to perform a action on the same entity.
Follows a4c698ac48.
Fixes: #6046
Differential revision: D3587
Reviewed by: @wraitii
This was SVN commit r25100.
This commit is contained in:
parent
87fc52b780
commit
293cd95ccb
1 changed files with 6 additions and 0 deletions
|
|
@ -5565,6 +5565,8 @@ UnitAI.prototype.Attack = function(target, allowCapture = true, queued = false,
|
|||
{
|
||||
this.order.data.lastPos = order.lastPos;
|
||||
this.order.data.force = order.force;
|
||||
if (order.force)
|
||||
this.orderQueue = [this.order];
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -5650,6 +5652,8 @@ UnitAI.prototype.PerformGather = function(target, queued, force, pushFront = fal
|
|||
{
|
||||
this.order.data.lastPos = order.lastPos;
|
||||
this.order.data.force = order.force;
|
||||
if (order.force)
|
||||
this.orderQueue = [this.order];
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -5687,6 +5691,7 @@ UnitAI.prototype.Heal = function(target, queued, pushFront)
|
|||
this.order.data.target === target)
|
||||
{
|
||||
this.order.data.force = true;
|
||||
this.orderQueue = [this.order];
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -5910,6 +5915,7 @@ UnitAI.prototype.Repair = function(target, autocontinue, queued, pushFront)
|
|||
this.order.data.autocontinue === autocontinue)
|
||||
{
|
||||
this.order.data.force = true;
|
||||
this.orderQueue = [this.order];
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue