From 3d72b338ffbd221f7518cdb8aae9f8c97aeabbde Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Wed, 22 Aug 2018 01:06:31 +0500 Subject: Fixed uninitialized variable --- src/World.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/World.cpp b/src/World.cpp index 9c66bc3..9a4bfd1 100644 --- a/src/World.cpp +++ b/src/World.cpp @@ -142,7 +142,7 @@ const Section &World::GetSection(Vector sectionPos) { RaycastResult World::Raycast(glm::vec3 position, glm::vec3 direction) { const float maxLen = 5.0; const float step = 0.01; - glm::vec3 pos; + glm::vec3 pos = glm::vec3(0.0); float len = 0; Vector blockPos = Vector(position.x,position.y,position.z); while (GetBlockId(blockPos) == BlockId{0, 0} && len <= maxLen) { -- cgit v1.2.3