Using references instead of pointers for sending packets
git-svn-id: http://mc-server.googlecode.com/svn/trunk@394 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
@@ -120,7 +120,7 @@ void cEntity::MoveToCorrectChunk(bool a_bIgnoreOldChunk)
|
||||
{
|
||||
m_Destroy = new cPacket_DestroyEntity(m_Entity);
|
||||
}
|
||||
a_Client->Send(m_Destroy);
|
||||
a_Client->Send(*m_Destroy);
|
||||
}
|
||||
|
||||
virtual void Added(cClientHandle * a_Client) override
|
||||
@@ -131,7 +131,7 @@ void cEntity::MoveToCorrectChunk(bool a_bIgnoreOldChunk)
|
||||
}
|
||||
if (m_Spawn != NULL)
|
||||
{
|
||||
a_Client->Send(m_Spawn);
|
||||
a_Client->Send(*m_Spawn);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -218,7 +218,7 @@ void cEntity::SpawnOn(cClientHandle * a_Client)
|
||||
}
|
||||
else
|
||||
{
|
||||
a_Client->Send(SpawnPacket.get());
|
||||
a_Client->Send(*(SpawnPacket.get()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user