mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-07-04 05:55:47 -07:00
Fix promoting entities not reacting to nearby enemies.
When an entity promotes it autogarrisons in the turret position but because `GARRISONE.enter` returns early a turret never reaches the `IDLE`-state and thus won't automatically react on nearby enemies. This is explicitly a temporary fix. Differential revision: D3293 Reviewed by: @wraitii This was SVN commit r24521.
This commit is contained in:
parent
3747b42f02
commit
ebcf9b9ff5
1 changed files with 10 additions and 1 deletions
|
|
@ -3119,8 +3119,17 @@ UnitAI.prototype.UnitFsmSpec = {
|
|||
return true;
|
||||
}
|
||||
|
||||
if (this.IsGarrisoned())
|
||||
// Called when autogarrisoning.
|
||||
if (this.isGarrisoned)
|
||||
{
|
||||
this.SetImmobile(true);
|
||||
if (this.IsTurret())
|
||||
{
|
||||
this.SetNextState("IDLE");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.CanGarrison(target))
|
||||
if (this.CheckGarrisonRange(target))
|
||||
|
|
|
|||
Loading…
Reference in a new issue