summaryrefslogtreecommitdiffstats
path: root/source/Protocol/Protocol125.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Protocol/Protocol125.cpp')
-rw-r--r--source/Protocol/Protocol125.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/source/Protocol/Protocol125.cpp b/source/Protocol/Protocol125.cpp
index 184bd1d30..b9048bdbe 100644
--- a/source/Protocol/Protocol125.cpp
+++ b/source/Protocol/Protocol125.cpp
@@ -711,12 +711,14 @@ void cProtocol125::SendSpawnObject(const cEntity & a_Entity, char a_ObjectType,
WriteInt ((int)(a_Entity.GetPosX() * 32));
WriteInt ((int)(a_Entity.GetPosY() * 32));
WriteInt ((int)(a_Entity.GetPosZ() * 32));
+ WriteByte(a_Pitch);
+ WriteByte(a_Yaw);
WriteInt (a_ObjectData);
if (a_ObjectData != 0)
{
- WriteShort((short)a_Entity.GetSpeedX());
- WriteShort((short)a_Entity.GetSpeedY());
- WriteShort((short)a_Entity.GetSpeedZ());
+ WriteShort((short)(a_Entity.GetSpeedX() * 400));
+ WriteShort((short)(a_Entity.GetSpeedY() * 400));
+ WriteShort((short)(a_Entity.GetSpeedZ() * 400));
}
Flush();
}
@@ -734,10 +736,12 @@ void cProtocol125::SendSpawnVehicle(const cEntity & a_Vehicle, char a_VehicleTyp
WriteInt ((int)(a_Vehicle.GetPosX() * 32));
WriteInt ((int)(a_Vehicle.GetPosY() * 32));
WriteInt ((int)(a_Vehicle.GetPosZ() * 32));
+ WriteByte ((BYTE)((a_Vehicle.GetPitch() / 360.f) * 256));
+ WriteByte ((BYTE)((a_Vehicle.GetRotation() / 360.f) * 256));
WriteInt (1);
- WriteShort(0); // TODO: SpeedX
- WriteShort(0); // TODO: SpeedY
- WriteShort(0); // TODO: SpeedZ
+ WriteShort((short)(a_Vehicle.GetSpeedX() * 400));
+ WriteShort((short)(a_Vehicle.GetSpeedY() * 400));
+ WriteShort((short)(a_Vehicle.GetSpeedZ() * 400));
Flush();
}