void cProtocol142::SendPickupSpawn(const cPickup & a_Pickup) { cCSLock Lock(m_CSPacket); WriteByte (PACKET_PICKUP_SPAWN); WriteInt (a_Pickup.GetUniqueID()); WriteItem (a_Pickup.GetItem()); WriteVectorI((Vector3i)(a_Pickup.GetPosition() * 32)); WriteByte ((char)(a_Pickup.GetSpeed().x * 8)); WriteByte ((char)(a_Pickup.GetSpeed().y * 8)); WriteByte ((char)(a_Pickup.GetSpeed().z * 8)); Flush(); }
void cProtocol125::SendPickupSpawn(const cPickup & a_Pickup) { cCSLock Lock(m_CSPacket); WriteByte (PACKET_PICKUP_SPAWN); WriteInt (a_Pickup.GetUniqueID()); const cItem & Item = a_Pickup.GetItem(); WriteShort (Item.m_ItemType); WriteChar (Item.m_ItemCount); WriteShort (Item.m_ItemDamage); WriteVectorI((Vector3i)(a_Pickup.GetPosition() * 32)); WriteByte ((char)(a_Pickup.GetSpeedX() * 8)); WriteByte ((char)(a_Pickup.GetSpeedY() * 8)); WriteByte ((char)(a_Pickup.GetSpeedZ() * 8)); Flush(); }