summaryrefslogtreecommitdiffstats
path: root/src/Entity.cpp
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2017-08-12 17:09:16 +0200
committerLaG1924 <12997935+LaG1924@users.noreply.github.com>2017-08-12 17:09:16 +0200
commit45de7d0537d2caec7d0a7ede48e2b72301bc9da9 (patch)
treeaf17dd093da09dc77a3a07a3d4835a1b5e5b85f6 /src/Entity.cpp
parent2017-08-07 (diff)
downloadAltCraft-45de7d0537d2caec7d0a7ede48e2b72301bc9da9.tar
AltCraft-45de7d0537d2caec7d0a7ede48e2b72301bc9da9.tar.gz
AltCraft-45de7d0537d2caec7d0a7ede48e2b72301bc9da9.tar.bz2
AltCraft-45de7d0537d2caec7d0a7ede48e2b72301bc9da9.tar.lz
AltCraft-45de7d0537d2caec7d0a7ede48e2b72301bc9da9.tar.xz
AltCraft-45de7d0537d2caec7d0a7ede48e2b72301bc9da9.tar.zst
AltCraft-45de7d0537d2caec7d0a7ede48e2b72301bc9da9.zip
Diffstat (limited to 'src/Entity.cpp')
-rw-r--r--src/Entity.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Entity.cpp b/src/Entity.cpp
new file mode 100644
index 0000000..8f76818
--- /dev/null
+++ b/src/Entity.cpp
@@ -0,0 +1,8 @@
+#include "Entity.hpp"
+
+VectorF Entity::DecodeVelocity(short x, short y, short z)
+{
+ const float ticksPerSecond = 20;
+ const double velMod = 1 / 8000.0;
+ return VectorF(x * velMod * ticksPerSecond, y*velMod*ticksPerSecond, z*velMod*ticksPerSecond);
+}