From 07ca09574072b303064eafb2751f8f83c865f083 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Mon, 4 May 2020 09:10:47 +0100 Subject: Improve entity position updates (#4701) * Make puking pickups fly nicer * Improve entity position updates * Move determination of whether a delta is too big for a packet into the protocol handlers + Less jittery movement + Generalise CollectEntity to take any entity --- 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 15a9cc824..7d8238c21 100644 --- a/src/Entities/Entity.h +++ b/src/Entities/Entity.h @@ -338,7 +338,7 @@ public: /** Returns the last position we sent to all the clients. Use this to initialize clients with our position. */ - Vector3d GetLastSentPos(void) const { return m_LastSentPosition; } + Vector3d GetLastSentPosition(void) const { return m_LastSentPosition; } /** Destroy the entity without scheduling memory freeing. This should only be used by cChunk or cClientHandle for internal memory management. */ void DestroyNoScheduling(bool a_ShouldBroadcast); @@ -511,6 +511,10 @@ public: /** Returns true if this entity is attached to the specified entity */ bool IsAttachedTo(const cEntity * a_Entity) const; + /** Returns whether the entity's orientation has been set manually. + Primarily inteded for protocol use. */ + bool IsOrientationDirty() const; + /** Makes sure head yaw is not over the specified range. */ void WrapHeadYaw(); -- cgit v1.2.3