Skip to content

Commit

Permalink
Fix off by one error in requested blocks range
Browse files Browse the repository at this point in the history
  • Loading branch information
kaczy93 committed Feb 11, 2024
1 parent 347d002 commit fef6ebd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CentrED/Map/MapManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -557,9 +557,9 @@ public void Update(GameTime gameTime, bool isActive, bool processMouse, bool pro
if (ViewRange != newViewRange)
{
List<BlockCoords> requested = new List<BlockCoords>();
for (var x = newViewRange.Left / 8; x < newViewRange.Right / 8; x++)
for (var x = newViewRange.Left / 8; x <= newViewRange.Right / 8; x++)
{
for (var y = newViewRange.Top / 8; y < newViewRange.Bottom / 8; y++)
for (var y = newViewRange.Top / 8; y <= newViewRange.Bottom / 8; y++)
{
requested.Add(new BlockCoords((ushort)x, (ushort)y));
}
Expand Down

0 comments on commit fef6ebd

Please sign in to comment.