summaryrefslogtreecommitdiffstats
path: root/source/Protocol/Protocol125.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2013-08-28 23:13:27 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2013-08-28 23:13:27 +0200
commit1e910022291df03d5bc92b88d6a526e1bc0f095e (patch)
treea548d362feba75f69b9b7fcfebdc193d91e96553 /source/Protocol/Protocol125.cpp
parentZomb-ee and Skellingtons burning improvements (diff)
downloadcuberite-1e910022291df03d5bc92b88d6a526e1bc0f095e.tar
cuberite-1e910022291df03d5bc92b88d6a526e1bc0f095e.tar.gz
cuberite-1e910022291df03d5bc92b88d6a526e1bc0f095e.tar.bz2
cuberite-1e910022291df03d5bc92b88d6a526e1bc0f095e.tar.lz
cuberite-1e910022291df03d5bc92b88d6a526e1bc0f095e.tar.xz
cuberite-1e910022291df03d5bc92b88d6a526e1bc0f095e.tar.zst
cuberite-1e910022291df03d5bc92b88d6a526e1bc0f095e.zip
Diffstat (limited to '')
-rw-r--r--source/Protocol/Protocol125.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/source/Protocol/Protocol125.cpp b/source/Protocol/Protocol125.cpp
index c4c15819d..514ef02c6 100644
--- a/source/Protocol/Protocol125.cpp
+++ b/source/Protocol/Protocol125.cpp
@@ -747,7 +747,7 @@ void cProtocol125::SendSpawnObject(const cEntity & a_Entity, char a_ObjectType,
-void cProtocol125::SendSpawnVehicle(const cEntity & a_Vehicle, char a_VehicleType)
+void cProtocol125::SendSpawnVehicle(const cEntity & a_Vehicle, char a_VehicleType, char a_VehicleTypeType)
{
cCSLock Lock(m_CSPacket);
WriteByte (PACKET_SPAWN_OBJECT);
@@ -758,10 +758,13 @@ void cProtocol125::SendSpawnVehicle(const cEntity & a_Vehicle, char a_VehicleTyp
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((short)(a_Vehicle.GetSpeedX() * 400));
- WriteShort((short)(a_Vehicle.GetSpeedY() * 400));
- WriteShort((short)(a_Vehicle.GetSpeedZ() * 400));
+ WriteInt (a_VehicleTypeType);
+ if (a_VehicleTypeType != 0)
+ {
+ WriteShort((short)(a_Vehicle.GetSpeedX() * 400));
+ WriteShort((short)(a_Vehicle.GetSpeedY() * 400));
+ WriteShort((short)(a_Vehicle.GetSpeedZ() * 400));
+ }
Flush();
}