Arbitrary smudge types
This commit is contained in:
@@ -52,9 +52,12 @@ namespace OpenRA
|
||||
|
||||
Sound.Play(GetImpactSound(warhead, isWater));
|
||||
|
||||
if (warhead.SmudgeType != SmudgeType.None)
|
||||
if (warhead.SmudgeType != null)
|
||||
{
|
||||
var smudgeLayer = world.WorldActor.traits.WithInterface<SmudgeLayer>().FirstOrDefault(x => x.Info.Type == warhead.SmudgeType);
|
||||
if (smudgeLayer == null)
|
||||
throw new NotImplementedException("Unknown smudge type `{0}`".F(warhead.SmudgeType));
|
||||
|
||||
if (!isWater)
|
||||
smudgeLayer.AddSmudge(targetTile);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user