summaryrefslogtreecommitdiffstats
path: root/source/cPlayer.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-03-19 18:15:35 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-03-19 18:15:35 +0100
commit2786ad306abe7487e3fc6bed1123ca8ebc2c3198 (patch)
tree58254cedb48cb33431699cce729dc7c67bd20779 /source/cPlayer.cpp
parentFixed a warning in a Release build (diff)
downloadcuberite-2786ad306abe7487e3fc6bed1123ca8ebc2c3198.tar
cuberite-2786ad306abe7487e3fc6bed1123ca8ebc2c3198.tar.gz
cuberite-2786ad306abe7487e3fc6bed1123ca8ebc2c3198.tar.bz2
cuberite-2786ad306abe7487e3fc6bed1123ca8ebc2c3198.tar.lz
cuberite-2786ad306abe7487e3fc6bed1123ca8ebc2c3198.tar.xz
cuberite-2786ad306abe7487e3fc6bed1123ca8ebc2c3198.tar.zst
cuberite-2786ad306abe7487e3fc6bed1123ca8ebc2c3198.zip
Diffstat (limited to '')
-rw-r--r--source/cPlayer.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/cPlayer.cpp b/source/cPlayer.cpp
index 9d1fe7ea4..cf007bb98 100644
--- a/source/cPlayer.cpp
+++ b/source/cPlayer.cpp
@@ -69,6 +69,10 @@ cPlayer::cPlayer(cClientHandle* a_Client, const AString & a_PlayerName)
, m_Color('-')
, m_ClientHandle( a_Client )
{
+ LOGD("Created a player object for \"%s\" @ \"%s\" at %p, ID %d",
+ a_PlayerName.c_str(), a_Client->GetSocket().GetIPString().c_str(),
+ this, GetUniqueID()
+ );
m_EntityType = eEntityType_Player;
SetMaxHealth(20);
SetMaxFoodLevel(125);
@@ -113,7 +117,7 @@ void cPlayer::Initialize( cWorld* a_World )
cPlayer::~cPlayer(void)
{
- LOG("Deleting cPlayer \"%s\" @ %p", m_PlayerName.c_str(), this);
+ LOG("Deleting cPlayer \"%s\" at %p, ID %d", m_PlayerName.c_str(), this, GetUniqueID());
SaveToDisk();
@@ -183,8 +187,10 @@ void cPlayer::Tick(float a_Dt)
if (m_bDirtyOrientation && !m_bDirtyPosition)
{
- cPacket_EntityLook EntityLook( this );
+ cPacket_EntityLook EntityLook(*this);
m_World->BroadcastToChunk(m_ChunkX, m_ChunkY, m_ChunkZ, EntityLook, m_ClientHandle );
+ cPacket_EntityHeadLook EntityHeadLook(*this);
+ m_World->BroadcastToChunk(m_ChunkX, m_ChunkY, m_ChunkZ, EntityHeadLook, m_ClientHandle);
m_bDirtyOrientation = false;
}
else if (m_bDirtyPosition )