summaryrefslogtreecommitdiffstats
path: root/src/Entity.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Entity.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/Entity.cpp b/src/Entity.cpp
index d91e78d..821d556 100644
--- a/src/Entity.cpp
+++ b/src/Entity.cpp
@@ -1,14 +1,12 @@
#include "Entity.hpp"
-VectorF Entity::DecodeVelocity(short x, short y, short z)
-{
+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);
}
-VectorF Entity::DecodeDeltaPos(short deltaX, short deltaY, short deltaZ)
-{
+VectorF Entity::DecodeDeltaPos(short deltaX, short deltaY, short deltaZ) {
const double posMod = 4096.0;
return VectorF(deltaX / posMod, deltaY / posMod, deltaZ / posMod);
}
@@ -29,8 +27,7 @@ double Entity::EncodePitch(double pitch) {
return -pitch;
}
-Entity CreateObject(ObjectType type)
-{
+Entity CreateObject(ObjectType type) {
Entity entity;
entity.type = EntityType::Object;
switch (type) {
@@ -96,8 +93,7 @@ Entity CreateObject(ObjectType type)
return entity;
}
-Entity CreateMob(MobType type)
-{
+Entity CreateMob(MobType type) {
Entity entity;
entity.type = EntityType::Mob;
return entity;