From fb3a175b28d3ef819876cf86e72a991f33ad5fcc Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sun, 10 Nov 2013 14:19:02 +0100 Subject: Protocol 1.7: Attempt at fixing SoundParticleEffect packet. --- source/Protocol/Protocol17x.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/source/Protocol/Protocol17x.cpp b/source/Protocol/Protocol17x.cpp index 1e19385c6..ebf8f6c33 100644 --- a/source/Protocol/Protocol17x.cpp +++ b/source/Protocol/Protocol17x.cpp @@ -615,11 +615,9 @@ void cProtocol172::SendSoundParticleEffect(int a_EffectID, int a_SrcX, int a_Src { cPacketizer Pkt(*this, 0x28); // Effect packet Pkt.WriteInt(a_EffectID); - Pkt.WriteInt(a_SrcX); - // TODO: Check if this is really an int - // wiki.vg says it's a byte, but that wouldn't cover the entire range needed (Y location * 8 = 0..2048) - Pkt.WriteInt(a_SrcY); - Pkt.WriteInt(a_SrcZ); + Pkt.WriteInt(a_SrcX / 8); + Pkt.WriteByte(a_SrcY / 8); + Pkt.WriteInt(a_SrcZ / 8); Pkt.WriteInt(a_Data); Pkt.WriteBool(false); } -- cgit v1.2.3