Fix IDE0048

This commit is contained in:
RoosterDragon
2023-02-28 19:27:42 +00:00
committed by Pavel Penev
parent 65e28d5562
commit 8ee6957e6a
23 changed files with 46 additions and 37 deletions

View File

@@ -1248,8 +1248,8 @@ namespace OpenRA
if (allProjected.Length > 0)
{
var puv = allProjected.First();
var horizontalBound = ((puv.U - Bounds.Left) < Bounds.Width / 2) ? Bounds.Left : Bounds.Right;
var verticalBound = ((puv.V - Bounds.Top) < Bounds.Height / 2) ? Bounds.Top : Bounds.Bottom;
var horizontalBound = (puv.U - Bounds.Left < Bounds.Width / 2) ? Bounds.Left : Bounds.Right;
var verticalBound = (puv.V - Bounds.Top < Bounds.Height / 2) ? Bounds.Top : Bounds.Bottom;
var du = Math.Abs(horizontalBound - puv.U);
var dv = Math.Abs(verticalBound - puv.V);

View File

@@ -51,7 +51,7 @@ namespace OpenRA.Primitives
items[addLevel][addIndex] = item;
if (++index >= (1 << level))
if (++index >= 1 << level)
{
index = 0;
if (items.Count <= ++level)

View File

@@ -382,7 +382,7 @@ namespace OpenRA.Traits
{
var index = touched.Index(puv);
touched[index] = true;
explored[index] = (visibleCount[index] + passiveVisibleCount[index]) > 0;
explored[index] = visibleCount[index] + passiveVisibleCount[index] > 0;
}
anyCellTouched = true;