diff --git a/Platform.cs b/Platform.cs index 09fe54f..adc3c9c 100644 --- a/Platform.cs +++ b/Platform.cs @@ -136,13 +136,13 @@ namespace LunaLightXMG // Add valid platform to the platforms list. 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 (x + 16 < 288) + if (x + 16 <= 288) { for (int j = 1; j < 3; j++) { - int nextX = j * 16; - if (!platforms.Exists(p => p.Position.X == nextX && p.Position.Y == y)) { - platforms.Add(new Platform(new Vector2(x + (j * 16), y + 4), 16, 16)); + int nextX = x + (j * 16); + if (!platforms.Exists(p => p.Position.X == nextX && p.Position.Y == y + 4)) { + platforms.Add(new Platform(new Vector2(nextX, y + 4), 16, 16)); } } }