From b9fff9d1acf98378f14def648483f1601c824c3f Mon Sep 17 00:00:00 2001 From: MihailRis Date: Sat, 12 Mar 2022 19:30:47 +0300 Subject: [PATCH] Small help to code rationality --- src/voxel_engine.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/voxel_engine.cpp b/src/voxel_engine.cpp index 74b8a0e5..a5de8ece 100644 --- a/src/voxel_engine.cpp +++ b/src/voxel_engine.cpp @@ -86,9 +86,6 @@ void update_controls(PhysicsSolver* physics, Player* player, float delta){ - if (Events::jpressed(GLFW_KEY_ESCAPE)){ - Window::setShouldClose(true); - } if (Events::jpressed(GLFW_KEY_TAB)){ Events::toogleCursor(); } @@ -306,6 +303,10 @@ int main() { delta = currentTime - lastTime; lastTime = currentTime; + if (Events::jpressed(GLFW_KEY_ESCAPE)){ + Window::setShouldClose(true); + } + if (Events::jpressed(GLFW_KEY_O)){ occlusion = !occlusion; }