Merge pull request #8742 from abcdefg30/withpalettedeath

Support multiple WithDeathAnimation traits
This commit is contained in:
Pavel Penev
2015-07-25 03:10:43 +03:00
4 changed files with 63 additions and 11 deletions

View File

@@ -82,8 +82,7 @@ namespace OpenRA.Mods.Common.Traits
var warhead = e.Warhead as DamageWarhead;
var damageType = warhead.DamageTypes.Intersect(Info.DeathTypes.Keys).FirstOrDefault();
if (damageType == null)
throw new Exception("Actor type `{0}` does not define a death animation for weapon with damage types `{1}`!"
.F(self.Info.Name, string.Join(", ", warhead.DamageTypes)));
return;
sequence += Info.DeathTypes[damageType];
}