summaryrefslogtreecommitdiffstats
path: root/src/World.cpp
diff options
context:
space:
mode:
authorElisey Puzko <puzko.e02@gmail.com>2018-02-23 09:51:09 +0100
committerElisey Puzko <puzko.e02@gmail.com>2018-02-23 09:51:09 +0100
commitab8278e3b61e009253e34d13d6706da7702dbb6c (patch)
tree83c8b0a731efff9b102be6506f0f20a5f31ea118 /src/World.cpp
parentQuick fix. (diff)
downloadAltCraft-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.cpp4
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;