Add WPos.ToCPos().

This commit is contained in:
Paul Chote
2013-07-06 18:53:35 +12:00
parent 561cb6cfe0
commit f9ec5fd9b7
4 changed files with 10 additions and 7 deletions

View File

@@ -60,13 +60,13 @@ namespace OpenRA.Graphics
// Start of the first line segment is the tail of the list - don't smooth it.
var curPos = trail[idx(next - skip - 1)];
var curCell = new CPos(curPos);
var curCell = curPos.ToCPos();
var curColor = color;
for (var i = 0; i < length - skip - 4; i++)
{
var j = next - skip - i - 2;
var nextPos = WPos.Average(trail[idx(j)], trail[idx(j-1)], trail[idx(j-2)], trail[idx(j-3)]);
var nextCell = new CPos(nextPos);
var nextCell = nextPos.ToCPos();
var nextColor = Exts.ColorLerp(i * 1f / (length - 4), color, Color.Transparent);
if (!world.FogObscures(curCell) && !world.FogObscures(nextCell))