summaryrefslogtreecommitdiffstats
path: root/src/Entities/Entity.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-04-14 22:31:09 +0200
committerMattes D <github@xoft.cz>2015-04-14 22:31:09 +0200
commit54289aeccbb5a4d9624c369435ec29ce858374b9 (patch)
tree347b00bdfc68314d6a5e0a0aac5c89e3a19d6599 /src/Entities/Entity.h
parentDebuggers: Renamed conflicting /cs command to /cstay. (diff)
parentChanged air drag for pickups (diff)
downloadcuberite-54289aeccbb5a4d9624c369435ec29ce858374b9.tar
cuberite-54289aeccbb5a4d9624c369435ec29ce858374b9.tar.gz
cuberite-54289aeccbb5a4d9624c369435ec29ce858374b9.tar.bz2
cuberite-54289aeccbb5a4d9624c369435ec29ce858374b9.tar.lz
cuberite-54289aeccbb5a4d9624c369435ec29ce858374b9.tar.xz
cuberite-54289aeccbb5a4d9624c369435ec29ce858374b9.tar.zst
cuberite-54289aeccbb5a4d9624c369435ec29ce858374b9.zip
Diffstat (limited to 'src/Entities/Entity.h')
-rw-r--r--src/Entities/Entity.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Entities/Entity.h b/src/Entities/Entity.h
index 9bb1837f1..dd6190ced 100644
--- a/src/Entities/Entity.h
+++ b/src/Entities/Entity.h
@@ -270,6 +270,10 @@ public:
float GetGravity(void) const { return m_Gravity; }
void SetGravity(float a_Gravity) { m_Gravity = a_Gravity; }
+
+ float GetAirDrag(void) const { return m_AirDrag; }
+
+ void SetAirDrag(float a_AirDrag) { m_AirDrag = a_AirDrag; }
/// Sets the rotation to match the speed vector (entity goes "face-forward")
void SetYawFromSpeed(void);
@@ -504,6 +508,12 @@ protected:
For realistic effects, this should be negative. For spaaaaaaace, this can be zero or even positive */
float m_Gravity;
+ /** Stores the air drag that is applied to the entity every tick, measured in speed ratio per tick
+ Acts as air friction and slows down flight
+ Will be interpolated if the server tick rate varies
+ Data: http://minecraft.gamepedia.com/Entity#Motion_of_entities */
+ float m_AirDrag;
+
/** Last position sent to client via the Relative Move or Teleport packets (not Velocity)
Only updated if cEntity::BroadcastMovementUpdate() is called! */
Vector3d m_LastPos;