From a53254500722a01c09be275847a87ccff70798ae Mon Sep 17 00:00:00 2001 From: att Date: Tue, 21 May 2019 14:35:37 +0800 Subject: [PATCH] Fixed block coord bug. --- Source/World/World.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Source/World/World.cpp b/Source/World/World.cpp index 6622095c..0666c379 100644 --- a/Source/World/World.cpp +++ b/Source/World/World.cpp @@ -223,8 +223,8 @@ VectorXZ World::getBlockXZ(int x, int z) { return { - x % CHUNK_SIZE, - z % CHUNK_SIZE + (x % CHUNK_SIZE + CHUNK_SIZE) % CHUNK_SIZE, + (z % CHUNK_SIZE + CHUNK_SIZE) % CHUNK_SIZE }; } @@ -295,4 +295,3 @@ void World::setSpawnPoint() std::cout << "Spawn found! Attempts: " << attempts << " Time Taken: " << timer.getElapsedTime().asSeconds() << " seconds\n"; } -