Let's not crash if WeaponInfo.Report[] is empty
This commit is contained in:
@@ -153,7 +153,7 @@ namespace OpenRA.Mods.RA
|
||||
facing = 0
|
||||
};
|
||||
|
||||
if (args.weapon.Report != null)
|
||||
if (args.weapon.Report != null && args.weapon.Report.Any())
|
||||
Sound.Play(args.weapon.Report.Random(attacker.World.SharedRandom) + ".aud", pos);
|
||||
|
||||
DoImpacts(args);
|
||||
|
||||
Reference in New Issue
Block a user