Quick fix.

This commit is contained in:
J. M. Ellis
2024-06-03 21:09:46 -07:00
parent a184a78189
commit f9045a49e8
+4 -4
View File
@@ -136,13 +136,13 @@ namespace LunaLightXMG
// Add valid platform to the platforms list. // Add valid platform to the platforms list.
platforms.Add(new Platform(new Vector2(x, y + 4), 16, 16)); platforms.Add(new Platform(new Vector2(x, y + 4), 16, 16));
// If we aren't at the end of the row, add two more platforms. // If we aren't at the end of the row, add two more platforms.
if (x + 16 < 288) if (x + 16 <= 288)
{ {
for (int j = 1; j < 3; j++) for (int j = 1; j < 3; j++)
{ {
int nextX = j * 16; int nextX = x + (j * 16);
if (!platforms.Exists(p => p.Position.X == nextX && p.Position.Y == y)) { if (!platforms.Exists(p => p.Position.X == nextX && p.Position.Y == y + 4)) {
platforms.Add(new Platform(new Vector2(x + (j * 16), y + 4), 16, 16)); platforms.Add(new Platform(new Vector2(nextX, y + 4), 16, 16));
} }
} }
} }