1
0

Fixed Minecart spawning issues

Now you can have everything!
This commit is contained in:
Tiger Wang
2013-08-28 22:13:27 +01:00
parent fa7def847b
commit 1e91002229
10 changed files with 41 additions and 34 deletions

View File

@@ -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();
}