From 5d64451f74af1839177f9b93d76cd393b7a58ad1 Mon Sep 17 00:00:00 2001 From: Lane Kolbly Date: Wed, 30 Aug 2017 09:01:33 -0500 Subject: Protocol Spawn Position Should Use LastSentPosition (#3929) + Added GetLastSentPos * Fixed spawn position bug in 1.8. --- src/Entities/Entity.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Entities') diff --git a/src/Entities/Entity.h b/src/Entities/Entity.h index d143e3814..f39039183 100644 --- a/src/Entities/Entity.h +++ b/src/Entities/Entity.h @@ -306,6 +306,10 @@ public: /** Exported in ManualBindings */ const Vector3d & GetSpeed(void) const { return m_Speed; } + /** 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; } + /** 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); -- cgit v1.2.3