avoid unneccessary float calculations and conversions

This commit is contained in:
Matthias Mailänder
2013-03-25 12:35:00 +01:00
parent aa6f12f0a1
commit 813faee4aa
2 changed files with 2 additions and 2 deletions

View File

@@ -75,7 +75,7 @@ namespace OpenRA.Traits
var oldState = this.DamageState;
/* apply the damage modifiers, if we have any. */
var modifier = (float)self.TraitsImplementing<IDamageModifier>()
var modifier = self.TraitsImplementing<IDamageModifier>()
.Concat(self.Owner.PlayerActor.TraitsImplementing<IDamageModifier>())
.Select(t => t.GetDamageModifier(attacker, warhead)).Product();