1
0

Fix for entity spawning in general

This commit is contained in:
Tiger Wang 2013-11-07 20:58:47 +00:00
parent 4722a90a0b
commit 21d835b594

View File

@ -447,7 +447,7 @@ void cProtocol172::SendPickupSpawn(const cPickup & a_Pickup)
{ {
{ {
cPacketizer Pkt(*this, 0x0e); // Spawn Object packet cPacketizer Pkt(*this, 0x0e); // Spawn Object packet
Pkt.WriteInt(a_Pickup.GetUniqueID()); Pkt.WriteVarInt(a_Pickup.GetUniqueID());
Pkt.WriteByte(2); // Type = Pickup Pkt.WriteByte(2); // Type = Pickup
Pkt.WriteFPInt(a_Pickup.GetPosX()); Pkt.WriteFPInt(a_Pickup.GetPosX());
Pkt.WriteFPInt(a_Pickup.GetPosY()); Pkt.WriteFPInt(a_Pickup.GetPosY());
@ -616,7 +616,7 @@ void cProtocol172::SendSoundParticleEffect(int a_EffectID, int a_SrcX, int a_Src
void cProtocol172::SendSpawnFallingBlock(const cFallingBlock & a_FallingBlock) void cProtocol172::SendSpawnFallingBlock(const cFallingBlock & a_FallingBlock)
{ {
cPacketizer Pkt(*this, 0x0e); // Spawn Object packet cPacketizer Pkt(*this, 0x0e); // Spawn Object packet
Pkt.WriteInt(a_FallingBlock.GetUniqueID()); Pkt.WriteVarInt(a_FallingBlock.GetUniqueID());
Pkt.WriteByte(70); // Falling block Pkt.WriteByte(70); // Falling block
Pkt.WriteFPInt(a_FallingBlock.GetPosX()); Pkt.WriteFPInt(a_FallingBlock.GetPosX());
Pkt.WriteFPInt(a_FallingBlock.GetPosY()); Pkt.WriteFPInt(a_FallingBlock.GetPosY());
@ -681,7 +681,7 @@ void cProtocol172::SendSpawnObject(const cEntity & a_Entity, char a_ObjectType,
void cProtocol172::SendSpawnVehicle(const cEntity & a_Vehicle, char a_VehicleType, char a_VehicleSubType) void cProtocol172::SendSpawnVehicle(const cEntity & a_Vehicle, char a_VehicleType, char a_VehicleSubType)
{ {
cPacketizer Pkt(*this, 0xe); // Spawn Object packet cPacketizer Pkt(*this, 0xe); // Spawn Object packet
Pkt.WriteInt(a_Vehicle.GetUniqueID()); Pkt.WriteVarInt(a_Vehicle.GetUniqueID());
Pkt.WriteByte(a_VehicleType); Pkt.WriteByte(a_VehicleType);
Pkt.WriteFPInt(a_Vehicle.GetPosX()); Pkt.WriteFPInt(a_Vehicle.GetPosX());
Pkt.WriteFPInt(a_Vehicle.GetPosY()); Pkt.WriteFPInt(a_Vehicle.GetPosY());