summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-05-02 19:40:12 +0200
committermadmaxoft <github@xoft.cz>2014-05-02 19:40:12 +0200
commit5082d55e853d0067301d73dc98ce0f177a76bc7f (patch)
tree1fe7b9c9f83e1a24c0b2f1578332140bc28a936a
parentMerge branch 'master' into fixes. (diff)
downloadcuberite-5082d55e853d0067301d73dc98ce0f177a76bc7f.tar
cuberite-5082d55e853d0067301d73dc98ce0f177a76bc7f.tar.gz
cuberite-5082d55e853d0067301d73dc98ce0f177a76bc7f.tar.bz2
cuberite-5082d55e853d0067301d73dc98ce0f177a76bc7f.tar.lz
cuberite-5082d55e853d0067301d73dc98ce0f177a76bc7f.tar.xz
cuberite-5082d55e853d0067301d73dc98ce0f177a76bc7f.tar.zst
cuberite-5082d55e853d0067301d73dc98ce0f177a76bc7f.zip
-rw-r--r--src/Entities/Entity.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/Entities/Entity.h b/src/Entities/Entity.h
index fe91915cd..df03d635b 100644
--- a/src/Entities/Entity.h
+++ b/src/Entities/Entity.h
@@ -431,18 +431,21 @@ protected:
cEntity * m_Attachee;
/** Stores whether head yaw has been set manually */
- bool m_bDirtyHead;
+ bool m_bDirtyHead;
+
/** Stores whether our yaw/pitch/roll (body orientation) has been set manually */
- bool m_bDirtyOrientation;
+ bool m_bDirtyOrientation;
+
/** Stores whether we have sent a Velocity packet with a speed of zero (no speed) to the client
Ensures that said packet is sent only once */
- bool m_bHasSentNoSpeed;
+ bool m_bHasSentNoSpeed;
/** Stores if the entity is on the ground */
- bool m_bOnGround;
+ bool m_bOnGround;
+
/** Stores gravity that is applied to an entity every tick
For realistic effects, this should be negative. For spaaaaaaace, this can be zero or even positive */
- float m_Gravity;
+ float m_Gravity;
/** Last position sent to client via the Relative Move or Teleport packets (not Velocity)
Only updated if cEntity::BroadcastMovementUpdate() is called! */
@@ -473,12 +476,14 @@ protected:
/// Time, in ticks, since the last damage dealt by the void. Reset to zero when moving out of the void.
int m_TicksSinceLastVoidDamage;
+
virtual void Destroyed(void) {} // Called after the entity has been destroyed
void SetWorld(cWorld * a_World) { m_World = a_World; }
/** Called in each tick to handle air-related processing i.e. drowning */
virtual void HandleAir();
+
/** Called once per tick to set IsSwimming and IsSubmerged */
virtual void SetSwimState(cChunk & a_Chunk);