From ad8f4148405591eaa3976f5c29bfdb1aa359c3e9 Mon Sep 17 00:00:00 2001 From: MarcEricMartel <74071476+MarcEricMartel@users.noreply.github.com> Date: Fri, 19 Nov 2021 09:06:09 -0500 Subject: [PATCH] Cleanup --- SQCSim2021/engine.h | 3 +-- SQCSim2021/world.cpp | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SQCSim2021/engine.h b/SQCSim2021/engine.h index cc4fbc6..0533c3f 100644 --- a/SQCSim2021/engine.h +++ b/SQCSim2021/engine.h @@ -51,8 +51,7 @@ private: Shader m_shader01; Audio m_audio = Audio(AUDIO_PATH "music01.wav"); - //Player m_player = Player(Vector3f(VIEW_DISTANCE * CHUNK_SIZE_X / 2, CHUNK_SIZE_Y / 2, VIEW_DISTANCE * CHUNK_SIZE_Z / 2)); - Player m_player = Player(Vector3f(1, CHUNK_SIZE_Y / 2, 1)); + Player m_player = Player(Vector3f(VIEW_DISTANCE * CHUNK_SIZE_X / 2, CHUNK_SIZE_Y / 2, VIEW_DISTANCE * CHUNK_SIZE_Z / 2)); bool m_keyW = false; bool m_keyA = false; diff --git a/SQCSim2021/world.cpp b/SQCSim2021/world.cpp index 0749d5c..75f2b9f 100644 --- a/SQCSim2021/world.cpp +++ b/SQCSim2021/world.cpp @@ -11,7 +11,8 @@ Chunk* World::ChunkAt(float x, float y, float z) const { int cz = (int)z / CHUNK_SIZE_Z; if (x < 0 || y < 0 || z < 0 || - cx >= VIEW_DISTANCE || cz >= VIEW_DISTANCE || y >= CHUNK_SIZE_Y) return 0; + cx >= VIEW_DISTANCE || cz >= VIEW_DISTANCE || y >= CHUNK_SIZE_Y) + return 0; return m_chunks.Get(cx, cz); }