GetPrimaryWeapon() dies too.
This commit is contained in:
@@ -126,6 +126,9 @@ namespace OpenRA.Mods.RA
|
||||
facing = 0
|
||||
};
|
||||
|
||||
if (args.weapon.Report != null)
|
||||
Sound.Play(args.weapon.Report + ".aud", pos);
|
||||
|
||||
DoImpacts(args);
|
||||
}
|
||||
|
||||
@@ -176,17 +179,6 @@ namespace OpenRA.Mods.RA
|
||||
return true;
|
||||
}
|
||||
|
||||
public static WeaponInfo GetPrimaryWeapon(this Actor self)
|
||||
{
|
||||
var info = self.Info.Traits.GetOrDefault<AttackBaseInfo>();
|
||||
if (info == null) return null;
|
||||
|
||||
var weapon = info.PrimaryWeapon;
|
||||
if (weapon == null) return null;
|
||||
|
||||
return Rules.Weapons[weapon.ToLowerInvariant()];
|
||||
}
|
||||
|
||||
static float2 GetRecoil(Actor self, float recoil)
|
||||
{
|
||||
var abInfo = self.Info.Traits.GetOrDefault<AttackBaseInfo>();
|
||||
|
||||
Reference in New Issue
Block a user