diff options
Diffstat (limited to 'source/Entities/Entity.h')
-rw-r--r-- | source/Entities/Entity.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/source/Entities/Entity.h b/source/Entities/Entity.h index 2d058abae..a2c99d2a0 100644 --- a/source/Entities/Entity.h +++ b/source/Entities/Entity.h @@ -92,6 +92,7 @@ public: etMonster, etFallingBlock, etMinecart, + etBoat, etTNT, etProjectile, @@ -119,6 +120,7 @@ public: bool IsPickup (void) const { return (m_EntityType == etPickup); } bool IsMob (void) const { return (m_EntityType == etMob); } bool IsMinecart(void) const { return (m_EntityType == etMinecart); } + bool IsBoat (void) const { return (m_EntityType == etBoat); } bool IsTNT (void) const { return (m_EntityType == etTNT); } /// Returns true if the entity is of the specified class or a subclass (cPawn's IsA("cEntity") returns true) @@ -185,6 +187,8 @@ public: void AddSpeedX (double a_AddSpeedX); void AddSpeedY (double a_AddSpeedY); void AddSpeedZ (double a_AddSpeedZ); + + void SteerVehicle(float a_Forward, float a_Sideways); inline int GetUniqueID(void) const { return m_UniqueID; } inline bool IsDestroyed(void) const { return !m_IsInitialized; } @@ -201,6 +205,16 @@ public: /// Makes this entity take the specified damage. The values are packed into a TDI, knockback calculated, then sent through DoTakeDamage() void TakeDamage(eDamageType a_DamageType, cEntity * a_Attacker, int a_RawDamage, int a_FinalDamage, double a_KnockbackAmount); + float GetGravity(void) const { return m_Gravity; } + + void SetGravity(float a_Gravity) { m_Gravity = a_Gravity; } + + /// Sets the rotation to match the speed vector (entity goes "face-forward") + void SetRotationFromSpeed(void); + + /// Sets the pitch to match the speed vector (entity gies "face-forward") + void SetPitchFromSpeed(void); + // tolua_end /// Makes this entity take damage specified in the a_TDI. The TDI is sent through plugins first, then applied @@ -253,6 +267,9 @@ public: /// Updates the state related to this entity being on fire virtual void TickBurning(cChunk & a_Chunk); + + /// Handles when the entity is in the void + virtual void TickInVoid(cChunk & a_Chunk); /// Called when the entity starts burning virtual void OnStartedBurning(void); @@ -375,6 +392,9 @@ protected: /// Time, in ticks, until the entity extinguishes its fire int m_TicksLeftBurning; + + /// 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 |