Fix #1128 - Use Line Width support in LaserZap

This commit is contained in:
alzeih
2011-12-13 22:53:59 +13:00
committed by Chris Forbes
parent 40029c6688
commit c8ae6127f3

View File

@@ -85,12 +85,9 @@ namespace OpenRA.Mods.RA.Effects
var rc = Color.FromArgb((info.BeamDuration - ticks)*255/info.BeamDuration, color);
var dir = 1.0f/(args.src - args.dest).Length*(args.src - args.dest).ToFloat2();
var norm = new float2(-dir.Y, dir.X);
var wlr = Game.Renderer.WorldLineRenderer;
for (int i = -info.BeamRadius; i < info.BeamRadius; i++)
wlr.DrawLine(args.src + i * norm, args.dest + i * norm, rc, rc);
wlr.LineWidth = info.BeamRadius * 2 * Game.viewport.Zoom;
wlr.DrawLine(args.src, args.dest, rc, rc);
}
}
}