update player debug variables in main instead of chunkmgr
parent
353ef37186
commit
f6f4057109
|
@ -121,16 +121,6 @@ namespace chunkmanager
|
||||||
int chunkY=static_cast<int>(theCamera.getAtomicPosY() / CHUNK_SIZE);
|
int chunkY=static_cast<int>(theCamera.getAtomicPosY() / CHUNK_SIZE);
|
||||||
int chunkZ=static_cast<int>(theCamera.getAtomicPosZ() / CHUNK_SIZE);
|
int chunkZ=static_cast<int>(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
|
// Update other chunks
|
||||||
for(int i = 0; i < chunks_volume_real; i++) {
|
for(int i = 0; i < chunks_volume_real; i++) {
|
||||||
const uint16_t x = chunks_indices[i][0] + chunkX;
|
const uint16_t x = chunks_indices[i][0] + chunkX;
|
||||||
|
|
|
@ -99,6 +99,15 @@ int main()
|
||||||
|
|
||||||
// Camera
|
// Camera
|
||||||
theCamera.update(window, deltaTime);
|
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
|
// Reset blockping timeout if 200ms have passed
|
||||||
if(glfwGetTime() - lastBlockPick > 0.1) blockpick = false;
|
if(glfwGetTime() - lastBlockPick > 0.1) blockpick = false;
|
||||||
|
|
Loading…
Reference in New Issue