summaryrefslogtreecommitdiffstats
path: root/src/Entity.hpp
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2017-09-30 18:00:09 +0200
committerLaG1924 <12997935+LaG1924@users.noreply.github.com>2018-01-13 03:39:32 +0100
commitc149d9ac2492cecbd1ba336f231157f69413942b (patch)
tree9aa071b54b9e34639e8e39e15e48cc6773956aa7 /src/Entity.hpp
parent2017-09-24 (diff)
downloadAltCraft-c149d9ac2492cecbd1ba336f231157f69413942b.tar
AltCraft-c149d9ac2492cecbd1ba336f231157f69413942b.tar.gz
AltCraft-c149d9ac2492cecbd1ba336f231157f69413942b.tar.bz2
AltCraft-c149d9ac2492cecbd1ba336f231157f69413942b.tar.lz
AltCraft-c149d9ac2492cecbd1ba336f231157f69413942b.tar.xz
AltCraft-c149d9ac2492cecbd1ba336f231157f69413942b.tar.zst
AltCraft-c149d9ac2492cecbd1ba336f231157f69413942b.zip
Diffstat (limited to 'src/Entity.hpp')
-rw-r--r--src/Entity.hpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/Entity.hpp b/src/Entity.hpp
index c818abe..cc9f6fa 100644
--- a/src/Entity.hpp
+++ b/src/Entity.hpp
@@ -3,6 +3,11 @@
#include "Utility.hpp"
#include "Vector.hpp"
+enum class EntityType {
+ Object,
+ Mob,
+};
+
enum class ObjectType{
Boat=1,
ItemStack,
@@ -130,9 +135,20 @@ struct Entity {
double height = 1.0;
glm::vec3 renderColor;
int entityType=0;
- bool isMob=false;
+ EntityType type;
+ bool isSolid = true;
+ double gravity = 32.0; // in m/s^2
+ double drag = 0.4;
+ double terminalVelocity = 78.4;
+ bool onGround = true;
+ VectorF EyeOffset = VectorF(0,1.62,0);
+
static VectorF DecodeVelocity(short x, short y, short z);
static VectorF DecodeDeltaPos(short deltaX, short deltaY, short deltaZ);
+ static double DecodeYaw(double yaw);
+ static double DecodePitch(double pitch);
+ static double EncodeYaw(double yaw);
+ static double EncodePitch(double pitch);
};
Entity CreateObject(ObjectType type);