From 365cbc6e1cea96741e26c9ce912b003f8fd2c62c Mon Sep 17 00:00:00 2001 From: Mattes D Date: Sun, 29 Sep 2019 14:59:24 +0200 Subject: Refactored more of Entities and BlockEntities to use Vector3. (#4403) --- src/Entities/Entity.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/Entities/Entity.h') diff --git a/src/Entities/Entity.h b/src/Entities/Entity.h index 594acdd89..2805ee9e0 100644 --- a/src/Entities/Entity.h +++ b/src/Entities/Entity.h @@ -156,7 +156,7 @@ public: static const UInt32 INVALID_ID = 0; // Exported to Lua in ManualBindings.cpp, ToLua doesn't parse initialized constants. - cEntity(eEntityType a_EntityType, double a_X, double a_Y, double a_Z, double a_Width, double a_Height); + cEntity(eEntityType a_EntityType, Vector3d a_Pos, double a_Width, double a_Height); virtual ~cEntity(); /** Spawns the entity in the world; returns true if spawned, false if not (plugin disallowed). @@ -558,7 +558,9 @@ public: @return exposure rate */ virtual float GetExplosionExposureRate(Vector3d a_ExplosionPosition, float a_ExlosionPower); + protected: + /** Structure storing the portal delay timer and cooldown boolean */ struct sPortalCooldownData { @@ -570,6 +572,7 @@ protected: bool m_ShouldPreventTeleportation; }; + /** Measured in meters / second (m / s) */ Vector3d m_Speed; @@ -686,6 +689,7 @@ protected: Only to be used when the caller will broadcast a teleport or equivalent to clients. */ virtual void ResetPosition(Vector3d a_NewPos); + private: /** Whether the entity is ticking or not. If not, it is scheduled for removal or world-teleportation. */ -- cgit v1.2.3