diff --git a/src/chunkmanager.cpp b/src/chunkmanager.cpp index 917e476..97b0adf 100644 --- a/src/chunkmanager.cpp +++ b/src/chunkmanager.cpp @@ -121,16 +121,6 @@ namespace chunkmanager int chunkY=static_cast(theCamera.getAtomicPosY() / CHUNK_SIZE); int chunkZ=static_cast(theCamera.getAtomicPosZ() / CHUNK_SIZE); - debug::window::set_parameter("px", theCamera.getAtomicPosX()); - debug::window::set_parameter("py", theCamera.getAtomicPosY()); - debug::window::set_parameter("pz", theCamera.getAtomicPosZ()); - debug::window::set_parameter("cx", chunkX); - debug::window::set_parameter("cy", chunkY); - debug::window::set_parameter("cz", chunkZ); - debug::window::set_parameter("lx", theCamera.getFront().x); - debug::window::set_parameter("ly", theCamera.getFront().y); - debug::window::set_parameter("lz", theCamera.getFront().z); - // Update other chunks for(int i = 0; i < chunks_volume_real; i++) { const uint16_t x = chunks_indices[i][0] + chunkX; diff --git a/src/main.cpp b/src/main.cpp index 1f185f4..70d0a44 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -99,6 +99,15 @@ int main() // Camera theCamera.update(window, deltaTime); + debug::window::set_parameter("px", theCamera.getPos().x); + debug::window::set_parameter("py", theCamera.getPos().y); + debug::window::set_parameter("pz", theCamera.getPos().z); + debug::window::set_parameter("cx", (int)(theCamera.getPos().x / CHUNK_SIZE)); + debug::window::set_parameter("cy", (int)(theCamera.getPos().y / CHUNK_SIZE)); + debug::window::set_parameter("cz", (int)(theCamera.getPos().z / CHUNK_SIZE)); + debug::window::set_parameter("lx", theCamera.getFront().x); + debug::window::set_parameter("ly", theCamera.getFront().y); + debug::window::set_parameter("lz", theCamera.getFront().z); // Reset blockping timeout if 200ms have passed if(glfwGetTime() - lastBlockPick > 0.1) blockpick = false;