From c149d9ac2492cecbd1ba336f231157f69413942b Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Sat, 30 Sep 2017 21:00:09 +0500 Subject: 2017-09-30 --- src/Entity.hpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src/Entity.hpp') 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); -- cgit v1.2.3