zOMG im an idiot
This commit is contained in:
@@ -126,8 +126,7 @@ namespace OpenRA.Graphics
|
|||||||
|
|
||||||
bounds.Offset((int)Game.viewport.Location.X, (int)Game.viewport.Location.Y);
|
bounds.Offset((int)Game.viewport.Location.X, (int)Game.viewport.Location.Y);
|
||||||
|
|
||||||
var foos = world.Actors;
|
var foos = world.FindUnits(
|
||||||
var bars = world.FindUnits(
|
|
||||||
new float2(bounds.Left, bounds.Top),
|
new float2(bounds.Left, bounds.Top),
|
||||||
new float2(bounds.Right, bounds.Bottom));
|
new float2(bounds.Right, bounds.Bottom));
|
||||||
|
|
||||||
@@ -154,19 +153,6 @@ namespace OpenRA.Graphics
|
|||||||
|
|
||||||
renderer.Device.DisableScissor();
|
renderer.Device.DisableScissor();
|
||||||
|
|
||||||
foreach (var bar in bars)
|
|
||||||
{
|
|
||||||
var baz = bar.GetBounds(true);
|
|
||||||
|
|
||||||
var a = new float2(baz.Left, baz.Top);
|
|
||||||
var b = new float2(baz.Right - a.X, 0);
|
|
||||||
var c = new float2(0, baz.Bottom - a.Y);
|
|
||||||
lineRenderer.DrawLine(a, a + b, Color.Green, Color.Green);
|
|
||||||
lineRenderer.DrawLine(a + b, a + b + c, Color.Green, Color.Green);
|
|
||||||
lineRenderer.DrawLine(a + b + c, a + c, Color.Green, Color.Green);
|
|
||||||
lineRenderer.DrawLine(a, a + c, Color.Green, Color.Green);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
{
|
||||||
var a = new float2(bounds.Left, bounds.Top);
|
var a = new float2(bounds.Left, bounds.Top);
|
||||||
var b = new float2(bounds.Right - a.X, 0);
|
var b = new float2(bounds.Right - a.X, 0);
|
||||||
@@ -176,7 +162,8 @@ namespace OpenRA.Graphics
|
|||||||
lineRenderer.DrawLine(a + b + c, a + c, Color.Red, Color.Red);
|
lineRenderer.DrawLine(a + b + c, a + c, Color.Red, Color.Red);
|
||||||
lineRenderer.DrawLine(a, a + c, Color.Red, Color.Red);
|
lineRenderer.DrawLine(a, a + c, Color.Red, Color.Red);
|
||||||
|
|
||||||
bounds = GetBoundsRect();
|
bounds = world.LocalPlayer.Shroud.bounds.Value;
|
||||||
|
|
||||||
a = new float2(bounds.Left, bounds.Top);
|
a = new float2(bounds.Left, bounds.Top);
|
||||||
b = new float2(bounds.Right - a.X, 0);
|
b = new float2(bounds.Right - a.X, 0);
|
||||||
c = new float2(0, bounds.Bottom - a.Y);
|
c = new float2(0, bounds.Bottom - a.Y);
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ namespace OpenRA.Traits
|
|||||||
{
|
{
|
||||||
var r = RectangleF.FromLTRB(a.X, a.Y, b.X, b.Y);
|
var r = RectangleF.FromLTRB(a.X, a.Y, b.X, b.Y);
|
||||||
|
|
||||||
return ActorsInBins(a.X / scale, a.Y / scale, b.X / scale, b.Y / scale)
|
return ActorsInBins(a.X / scale, b.X / scale, a.Y / scale, b.Y / scale)
|
||||||
.Distinct()
|
.Distinct()
|
||||||
.Where(u => u.GetBounds(true).IntersectsWith(r));
|
.Where(u => u.GetBounds(true).IntersectsWith(r));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -223,3 +223,4 @@ World:
|
|||||||
NavalUnitLost: unitlost.aud
|
NavalUnitLost: unitlost.aud
|
||||||
PrimaryBuildingSelected: pribldg1.aud
|
PrimaryBuildingSelected: pribldg1.aud
|
||||||
SpatialBins:
|
SpatialBins:
|
||||||
|
BinSize: 4
|
||||||
@@ -273,6 +273,7 @@ World:
|
|||||||
SpawnDefaultUnits:
|
SpawnDefaultUnits:
|
||||||
EvaAlerts:
|
EvaAlerts:
|
||||||
SpatialBins:
|
SpatialBins:
|
||||||
|
BinSize: 4
|
||||||
|
|
||||||
MGG:
|
MGG:
|
||||||
GeneratesGap:
|
GeneratesGap:
|
||||||
|
|||||||
Reference in New Issue
Block a user