From f9045a49e87020a11b5b2f9d2cb7055a19358226 Mon Sep 17 00:00:00 2001 From: "J. M. Ellis" Date: Mon, 3 Jun 2024 21:09:46 -0700 Subject: [PATCH] Quick fix. --- Platform.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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)); } } }