Check if weapon without self-reloading is out of ammo when deciding validity
This should prevent attacking helicopters (or other actors) staying at the range to target of a weapon that is out of ammo and needs manual reloading at a RearmBuilding or via upgrades.
This commit is contained in:
@@ -259,6 +259,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public bool IsReloading { get { return FireDelay > 0 || IsTraitDisabled; } }
|
||||
public bool ShouldExplode(Actor self) { return !IsReloading; }
|
||||
public bool OutOfAmmo { get { return ammoPool != null && !ammoPool.Info.SelfReloads && !ammoPool.HasAmmo(); } }
|
||||
|
||||
public WVec MuzzleOffset(Actor self, Barrel b)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user