1
0

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:
madmaxoft@gmail.com
2012-03-10 21:34:47 +00:00
parent 732b7349fa
commit e7731242c1
8 changed files with 24 additions and 26 deletions

View File

@@ -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()));
}
}