]> git.localhorst.tv Git - blank.git/blobdiff - src/app.cpp
limit chunks allocated/freed per frame
[blank.git] / src / app.cpp
index 0d7e7dbb8fb511c40dbff366394699c99b1753e7..10a72b8e89e698f2abf52164df4bc91a6b164c96 100644 (file)
@@ -145,7 +145,7 @@ void Application::Update(int dt) {
                        glm::vec3 next_pos = Chunk::ToCoords(blkid) + normal;
                        if (!Chunk::InBounds(next_pos)) {
                                mod_chunk = &world.Next(*chunk, normal);
-                               next_pos -= normal * Chunk::Extent();
+                               next_pos -= normal * glm::vec3(Chunk::Extent());
                        }
                        mod_chunk->BlockAt(next_pos).type = world.BlockTypes()[place_id];
                        mod_chunk->Invalidate();