Fix RCS1089

This commit is contained in:
RoosterDragon
2023-03-18 12:50:55 +00:00
committed by Gustas
parent 4dd787be13
commit eb287d9b8d
17 changed files with 26 additions and 23 deletions

View File

@@ -179,7 +179,7 @@ namespace OpenRA.Mods.Common.Projectiles
CycleCount = SourceToTarget.Length / info.HelixPitch.Length;
if (SourceToTarget.Length % info.HelixPitch.Length != 0)
CycleCount += 1; // math.ceil, int version.
CycleCount++; // math.ceil, int version.
// Using ForwardStep * CycleCount, the helix and the main beam gets "out of sync"
// if drawn from source to target. Instead, the main beam is drawn from source to end point of helix.

View File

@@ -41,10 +41,10 @@ namespace OpenRA.Mods.Common.SpriteLoaders
var dataWidth = width;
var dataHeight = height;
if (dataWidth % 2 == 1)
dataWidth += 1;
dataWidth++;
if (dataHeight % 2 == 1)
dataHeight += 1;
dataHeight++;
Offset = new int2(x + (dataWidth - frameSize.Width) / 2, y + (dataHeight - frameSize.Height) / 2);
Size = new Size(dataWidth, dataHeight);

View File

@@ -27,7 +27,7 @@ namespace OpenRA.Mods.Common.SpriteLoaders
try
{
// Require true-color images
s.Position += 1;
s.Position++;
var colorMapType = s.ReadUInt8();
if (colorMapType != 0)
return false;

View File

@@ -197,7 +197,7 @@ namespace OpenRA.Mods.Common.Traits
currentTargetDelay = 0;
}
else
currentTargetDelay += 1;
currentTargetDelay++;
if (capturingToken == Actor.InvalidConditionToken)
capturingToken = self.GrantCondition(info.CapturingCondition);

View File

@@ -714,7 +714,7 @@ namespace OpenRA.Mods.Common.Traits
return;
RemainingCost -= costThisFrame;
RemainingTime -= 1;
RemainingTime--;
if (RemainingTime > 0)
return;

View File

@@ -43,7 +43,7 @@ namespace OpenRA.Mods.Common.Traits
// Not a real hash, but things checking this only care about checking when the selection has changed
// For this purpose, having a false positive (forcing a refresh when nothing changed) is much better
// than a false negative (selection state mismatch)
Hash += 1;
Hash++;
}
public virtual void Add(Actor a)

View File

@@ -156,7 +156,7 @@ namespace OpenRA.Mods.Common.Widgets
// Odd rows are shifted right by 1px
if ((point.V & 1) == 1)
dx += 1;
dx++;
return new int2(mapRect.X + dx, mapRect.Y + dy);
}

View File

@@ -474,7 +474,7 @@ namespace OpenRA.Mods.Common.Widgets
// Odd rows are shifted right by 1px
if (isRectangularIsometric && (uv.V & 1) == 1)
dx += 1;
dx++;
return new int2(mapRect.X + dx, mapRect.Y + dy);
}