summaryrefslogtreecommitdiffstats
path: root/source/Protocol/Protocol132.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Protocol/Protocol132.cpp')
-rw-r--r--source/Protocol/Protocol132.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/Protocol/Protocol132.cpp b/source/Protocol/Protocol132.cpp
index e051bcfa1..213fa26ae 100644
--- a/source/Protocol/Protocol132.cpp
+++ b/source/Protocol/Protocol132.cpp
@@ -406,12 +406,12 @@ void cProtocol132::SendSpawnMob(const cMonster & a_Mob)
WriteInt (a_Mob.GetUniqueID());
WriteByte (a_Mob.GetMobType());
WriteVectorI((Vector3i)(a_Mob.GetPosition() * 32));
- WriteByte (0); // yaw
- WriteByte (0); // pitch
- WriteByte (0); // head yaw
- WriteShort (0); // Velocity Z
- WriteShort (0); // Velocity X
- WriteShort (0); // Velocity Y
+ WriteByte ((BYTE)((a_Mob.GetRotation() / 360.f) * 256));
+ WriteByte ((BYTE)((a_Mob.GetPitch() / 360.f) * 256));
+ WriteByte ((BYTE)((a_Mob.GetHeadYaw() / 360.f) * 256));
+ WriteShort ((short)(a_Mob.GetSpeedX() * 400));
+ WriteShort ((short)(a_Mob.GetSpeedY() * 400));
+ WriteShort ((short)(a_Mob.GetSpeedZ() * 400));
AString MetaData = GetEntityMetaData(a_Mob);
SendData (MetaData.data(), MetaData.size());
Flush();