Convert Health Radius to world coordinates.

This commit is contained in:
Paul Chote
2013-12-24 22:22:56 +13:00
parent aa2f865d5d
commit c49b06fdde
3 changed files with 4 additions and 6 deletions

View File

@@ -192,7 +192,7 @@ namespace OpenRA.Mods.RA
var rawDamage = (float)warhead.Damage;
if (withFalloff)
{
var distance = (int)Math.Max(0, (target.CenterPosition - pos).Length * Game.CellSize / 1024 - healthInfo.Radius);
var distance = Math.Max(0, (target.CenterPosition - pos).Length - healthInfo.Radius.Range) * Game.CellSize / 1024;
var falloff = (float)GetDamageFalloff(distance / warhead.Spread);
rawDamage = (float)(falloff * rawDamage);
}