mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-07-04 05:55:47 -07:00
Add Patrol check to IsWalkingAndFighting
Differential Revision: https://code.wildfiregames.com/D1419 Reviewed by: mimo Comments by: elexis This was SVN commit r21633.
This commit is contained in:
parent
dda3346e99
commit
44081fbd13
1 changed files with 2 additions and 2 deletions
|
|
@ -3318,7 +3318,7 @@ UnitAI.prototype.IsWalking = function()
|
|||
};
|
||||
|
||||
/**
|
||||
* return true if in WalkAndFight looking for new targets
|
||||
* Return true if the current order is WalkAndFight or Patrol.
|
||||
*/
|
||||
UnitAI.prototype.IsWalkingAndFighting = function()
|
||||
{
|
||||
|
|
@ -3328,7 +3328,7 @@ UnitAI.prototype.IsWalkingAndFighting = function()
|
|||
return (cmpUnitAI && cmpUnitAI.IsWalkingAndFighting());
|
||||
}
|
||||
|
||||
return (this.orderQueue.length > 0 && this.orderQueue[0].type == "WalkAndFight");
|
||||
return this.orderQueue.length > 0 && (this.orderQueue[0].type == "WalkAndFight" || this.orderQueue[0].type == "Patrol");
|
||||
};
|
||||
|
||||
UnitAI.prototype.OnCreate = function()
|
||||
|
|
|
|||
Loading…
Reference in a new issue