Fix bogus naming of Shaders/Renderers. Split LineRenderer into world and chrome variants.
This commit is contained in:
@@ -96,7 +96,7 @@ namespace OpenRA.Mods.RA
|
||||
if (self.World.LocalShroud.IsVisible(OpenRA.Traits.Util.CellContaining(conPos)) ||
|
||||
self.World.LocalShroud.IsVisible(OpenRA.Traits.Util.CellContaining(nextPos)))
|
||||
{
|
||||
Game.Renderer.LineRenderer.DrawLine(conPos, nextPos, trailStart, trailEnd);
|
||||
Game.Renderer.WorldLineRenderer.DrawLine(conPos, nextPos, trailStart, trailEnd);
|
||||
|
||||
trailStart = trailEnd;
|
||||
trailEnd = Color.FromArgb(trailStart.A - 255 / positions.Count, trailStart.R,
|
||||
|
||||
@@ -79,8 +79,9 @@ namespace OpenRA.Mods.RA.Effects
|
||||
float2 unit = 1.0f/(args.src - args.dest).Length*(args.src - args.dest).ToFloat2();
|
||||
float2 norm = new float2(-unit.Y, unit.X);
|
||||
|
||||
var wlr = Game.Renderer.WorldLineRenderer;
|
||||
for (int i = -radius; i < radius; i++)
|
||||
Game.Renderer.LineRenderer.DrawLine(args.src + i * norm, args.dest + i * norm, rc, rc);
|
||||
wlr.DrawLine(args.src + i * norm, args.dest + i * norm, rc, rc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace OpenRA.Mods.RA.Widgets
|
||||
leftOffset.X += 1;
|
||||
rightOffset.X -= 1;
|
||||
}
|
||||
Game.Renderer.LineRenderer.DrawLine(Game.viewport.Location + barStart + leftOffset, Game.viewport.Location + powerLevel + rightOffset, color, color);
|
||||
Game.Renderer.LineRenderer.DrawLine(barStart + leftOffset, powerLevel + rightOffset, color, color);
|
||||
}
|
||||
|
||||
// Power usage indicator
|
||||
|
||||
@@ -151,7 +151,7 @@ namespace OpenRA.Mods.RA.Widgets
|
||||
var tl = CellToMinimapPixel(new int2((int)(Game.viewport.Location.X/Game.CellSize), (int)(Game.viewport.Location.Y/Game.CellSize)));
|
||||
var br = CellToMinimapPixel(new int2((int)((Game.viewport.Location.X + Game.viewport.Width)/Game.CellSize), (int)((Game.viewport.Location.Y + Game.viewport.Height)/Game.CellSize)));
|
||||
Game.Renderer.EnableScissor((int)mapRect.Left, (int)mapRect.Top, (int)mapRect.Width, (int)mapRect.Height);
|
||||
Game.Renderer.LineRenderer.DrawRect(Game.viewport.Location + tl, Game.viewport.Location + br, Color.White);
|
||||
Game.Renderer.LineRenderer.DrawRect(tl, br, Color.White);
|
||||
Game.Renderer.DisableScissor();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ namespace OpenRA.Mods.RA.Widgets
|
||||
var tl = CellToMinimapPixel(new int2((int)(Game.viewport.Location.X/Game.CellSize), (int)(Game.viewport.Location.Y/Game.CellSize)));
|
||||
var br = CellToMinimapPixel(new int2((int)((Game.viewport.Location.X + Game.viewport.Width)/Game.CellSize), (int)((Game.viewport.Location.Y + Game.viewport.Height)/Game.CellSize)));
|
||||
Game.Renderer.EnableScissor((int)mapRect.Left, (int)mapRect.Top, (int)mapRect.Width, (int)mapRect.Height);
|
||||
Game.Renderer.LineRenderer.DrawRect(Game.viewport.Location + tl, Game.viewport.Location + br, Color.White);
|
||||
Game.Renderer.LineRenderer.DrawRect(tl, br, Color.White);
|
||||
Game.Renderer.DisableScissor();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user