diff options
author | Elisey Puzko <puzko.e02@gmail.com> | 2018-02-23 09:51:09 +0100 |
---|---|---|
committer | Elisey Puzko <puzko.e02@gmail.com> | 2018-02-23 09:51:09 +0100 |
commit | ab8278e3b61e009253e34d13d6706da7702dbb6c (patch) | |
tree | 83c8b0a731efff9b102be6506f0f20a5f31ea118 /src/World.cpp | |
parent | Quick fix. (diff) | |
download | AltCraft-ab8278e3b61e009253e34d13d6706da7702dbb6c.tar AltCraft-ab8278e3b61e009253e34d13d6706da7702dbb6c.tar.gz AltCraft-ab8278e3b61e009253e34d13d6706da7702dbb6c.tar.bz2 AltCraft-ab8278e3b61e009253e34d13d6706da7702dbb6c.tar.lz AltCraft-ab8278e3b61e009253e34d13d6706da7702dbb6c.tar.xz AltCraft-ab8278e3b61e009253e34d13d6706da7702dbb6c.tar.zst AltCraft-ab8278e3b61e009253e34d13d6706da7702dbb6c.zip |
Diffstat (limited to '')
-rw-r--r-- | src/World.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/World.cpp b/src/World.cpp index f593bce..110b16b 100644 --- a/src/World.cpp +++ b/src/World.cpp @@ -142,12 +142,12 @@ RaycastResult World::Raycast(glm::vec3 position, glm::vec3 direction) { const float maxLen = 5.0; const float step = 0.01; glm::vec3 pos; - float len=0; + float len = 0; Vector blockPos = Vector(position.x,position.y,position.z); while (GetBlockId(blockPos) == BlockId{0, 0} && len <= maxLen) { pos = position + direction * len; len += step; - blockPos = Vector(floor(pos.x),floor(pos.y),floor(pos.z)); + blockPos = Vector(floor(pos.x), floor(pos.y), floor(pos.z)); } RaycastResult result; |