Fix submarines not being attackable when surfaced
This will also fix the issue of all pre-placed subs playing the submerging sound during the start of a map.
This commit is contained in:
@@ -84,8 +84,11 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
// The upgrade manager exists, but may not have finished being created yet.
|
// The upgrade manager exists, but may not have finished being created yet.
|
||||||
// We'll defer the upgrades until the end of the tick, at which point it will be ready.
|
// We'll defer the upgrades until the end of the tick, at which point it will be ready.
|
||||||
if (Cloaked)
|
if (Cloaked)
|
||||||
|
{
|
||||||
|
wasCloaked = true;
|
||||||
self.World.AddFrameEndTask(_ => GrantUpgrades(self));
|
self.World.AddFrameEndTask(_ => GrantUpgrades(self));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public bool Cloaked { get { return !IsTraitDisabled && remainingTime <= 0; } }
|
public bool Cloaked { get { return !IsTraitDisabled && remainingTime <= 0; } }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user