logs of negative numbers -> fail

This commit is contained in:
Chris Forbes
2009-12-28 11:30:12 +13:00
parent 8202f2cdc4
commit c6e97f7278

View File

@@ -39,7 +39,7 @@ namespace OpenRa.Game
static float GetMaximumSpread(WeaponInfo weapon, WarheadInfo warhead)
{
return (int)(warhead.Spread * Math.Log(weapon.Damage, 2));
return (int)(warhead.Spread * Math.Log(Math.Abs(weapon.Damage), 2));
}
static float GetDamageToInflict(Actor target, int2 loc, WeaponInfo weapon, WarheadInfo warhead)