Convert Health Radius to world coordinates.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -42,10 +42,7 @@ namespace OpenRA.Mods.RA
|
||||
return;
|
||||
|
||||
if (health.Value != null)
|
||||
{
|
||||
var range = new WRange((int)(health.Value.Info.Radius * 1024 / Game.CellSize));
|
||||
wr.DrawRangeCircle(self.CenterPosition, range, Color.Red);
|
||||
}
|
||||
wr.DrawRangeCircle(self.CenterPosition, health.Value.Info.Radius, Color.Red);
|
||||
|
||||
var wlr = Game.Renderer.WorldLineRenderer;
|
||||
var c = Color.White;
|
||||
|
||||
Reference in New Issue
Block a user