From 1d8921c1517fc65917a8173bec5ccf519f07fee6 Mon Sep 17 00:00:00 2001 From: faketruth Date: Sat, 29 Sep 2012 21:54:17 +0000 Subject: Fixed initial player head rotation when a player is being spawned on another client Fixed showing correct item in the player hand when spawned on another client (it didn't include metadata/health before) Fixed player head rotation when moving and looking around at the same time git-svn-id: http://mc-server.googlecode.com/svn/trunk@914 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Player.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/Player.cpp b/source/Player.cpp index a0be947bf..4ac71b25a 100644 --- a/source/Player.cpp +++ b/source/Player.cpp @@ -151,9 +151,11 @@ void cPlayer::SpawnOn(cClientHandle & a_Client) ); */ - if (m_bVisible) + if (m_bVisible && (m_ClientHandle != (&a_Client))) { a_Client.SendPlayerSpawn(*this); + a_Client.SendEntHeadLook(*this); + a_Client.SendEntityEquipment(*this, 0, m_Inventory.GetEquippedItem() ); } } @@ -200,6 +202,7 @@ void cPlayer::Tick(float a_Dt) if (m_bDirtyOrientation) { m_World->BroadcastEntRelMoveLook(*this, (char)(DiffX * 32), (char)(DiffY * 32), (char)(DiffZ * 32), m_ClientHandle); + m_World->BroadcastEntHeadLook(*this, m_ClientHandle); m_bDirtyOrientation = false; } else -- cgit v1.2.3