Add DamageTypes to Kill() and make some traits use it.

This commit is contained in:
Mustafa Alperen Seki
2018-02-03 11:07:02 +03:00
committed by reaperrr
parent b620e8107f
commit 5e7e3bb011
17 changed files with 58 additions and 22 deletions

View File

@@ -57,7 +57,8 @@ namespace OpenRA.Mods.Common.Traits
Game.Sound.Play(SoundType.World, Info.CrushSound, crusher.CenterPosition);
self.Kill(crusher);
var crusherMobile = crusher.TraitOrDefault<Mobile>();
self.Kill(crusher, crusherMobile != null ? crusherMobile.Info.CrushDamageTypes : new HashSet<string>());
}
bool ICrushable.CrushableBy(Actor self, Actor crusher, HashSet<string> crushClasses)