Almost all packets' handling is now rewritten not to use cPacket descendants elsewhere than in cClientHandle.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@761 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
@@ -9,16 +9,16 @@
|
||||
|
||||
|
||||
|
||||
cPacket_TeleportEntity::cPacket_TeleportEntity(cEntity* a_Client)
|
||||
cPacket_TeleportEntity::cPacket_TeleportEntity(const cEntity & a_Entity)
|
||||
{
|
||||
m_PacketID = E_ENT_TELEPORT;
|
||||
|
||||
m_UniqueID = a_Client->GetUniqueID();
|
||||
m_PosX = (int)(a_Client->GetPosX() * 32);
|
||||
m_PosY = (int)(a_Client->GetPosY() * 32);
|
||||
m_PosZ = (int)(a_Client->GetPosZ() * 32);
|
||||
m_Rotation = (char)((a_Client->GetRotation() / 360.f) * 256);
|
||||
m_Pitch = (char)((a_Client->GetPitch() / 360.f) * 256);
|
||||
m_UniqueID = a_Entity.GetUniqueID();
|
||||
m_PosX = (int)(a_Entity.GetPosX() * 32);
|
||||
m_PosY = (int)(a_Entity.GetPosY() * 32);
|
||||
m_PosZ = (int)(a_Entity.GetPosZ() * 32);
|
||||
m_Rotation = (char)((a_Entity.GetRotation() / 360.f) * 256);
|
||||
m_Pitch = (char)((a_Entity.GetPitch() / 360.f) * 256);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user