| 214 | |
| 215 | |
| 216 | void cProtocol146::SendSpawnObject(const cEntity & a_Entity, char a_ObjectType, int a_ObjectData, Byte a_Yaw, Byte a_Pitch) |
| 217 | { |
| 218 | cCSLock Lock(m_CSPacket); |
| 219 | WriteByte(PACKET_SPAWN_OBJECT); |
| 220 | WriteInt (a_Entity.GetUniqueID()); |
| 221 | WriteChar(a_ObjectType); |
| 222 | WriteInt ((int)(a_Entity.GetPosX() * 32)); |
| 223 | WriteInt ((int)(a_Entity.GetPosY() * 32)); |
| 224 | WriteInt ((int)(a_Entity.GetPosZ() * 32)); |
| 225 | WriteByte(a_Pitch); |
| 226 | WriteByte(a_Yaw); |
| 227 | WriteInt (a_ObjectData); |
| 228 | if (a_ObjectData != 0) |
| 229 | { |
| 230 | WriteShort((short)(a_Entity.GetSpeedX() * 400)); |
| 231 | WriteShort((short)(a_Entity.GetSpeedY() * 400)); |
| 232 | WriteShort((short)(a_Entity.GetSpeedZ() * 400)); |
| 233 | } |
| 234 | Flush(); |
| 235 | } |
| 236 | |
| 237 | |
| 238 |
no test coverage detected