From 347162a82f2cba75c4eb7739d4405ea78de4f0b5 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Tue, 12 Nov 2013 21:43:20 +0000 Subject: Bundled fixes [SEE DESC] * BoundingBox now returns FACE_NONE + Arrows can be picked up * Arrows dug up resume physics simulations * Added sound effects for bows, lava to stone, and arrows * Fixed SoundParticleEffect on <1.7 protocols --- source/Protocol/Protocol132.cpp | 6 +++--- source/Protocol/Protocol14x.cpp | 6 +++--- source/Protocol/Protocol17x.cpp | 10 +++++++--- 3 files changed, 13 insertions(+), 9 deletions(-) (limited to 'source/Protocol') diff --git a/source/Protocol/Protocol132.cpp b/source/Protocol/Protocol132.cpp index 53159a3b3..22eac4312 100644 --- a/source/Protocol/Protocol132.cpp +++ b/source/Protocol/Protocol132.cpp @@ -392,9 +392,9 @@ void cProtocol132::SendSoundParticleEffect(int a_EffectID, int a_SrcX, int a_Src cCSLock Lock(m_CSPacket); WriteByte(PACKET_SOUND_PARTICLE_EFFECT); WriteInt (a_EffectID); - WriteInt (a_SrcX / 8); - WriteByte(a_SrcY / 8); - WriteInt (a_SrcZ / 8); + WriteInt (a_SrcX); + WriteByte(a_SrcY); + WriteInt (a_SrcZ); WriteInt (a_Data); Flush(); } diff --git a/source/Protocol/Protocol14x.cpp b/source/Protocol/Protocol14x.cpp index ba9d7c01a..d2582458b 100644 --- a/source/Protocol/Protocol14x.cpp +++ b/source/Protocol/Protocol14x.cpp @@ -109,9 +109,9 @@ void cProtocol142::SendSoundParticleEffect(int a_EffectID, int a_SrcX, int a_Src cCSLock Lock(m_CSPacket); WriteByte(PACKET_SOUND_PARTICLE_EFFECT); WriteInt (a_EffectID); - WriteInt (a_SrcX / 8); - WriteByte(a_SrcY / 8); - WriteInt (a_SrcZ / 8); + WriteInt (a_SrcX); + WriteByte(a_SrcY); + WriteInt (a_SrcZ); WriteInt (a_Data); WriteBool(0); Flush(); diff --git a/source/Protocol/Protocol17x.cpp b/source/Protocol/Protocol17x.cpp index d580be23b..2ccf9230f 100644 --- a/source/Protocol/Protocol17x.cpp +++ b/source/Protocol/Protocol17x.cpp @@ -820,9 +820,13 @@ void cProtocol172::SendUseBed(const cEntity & a_Entity, int a_BlockX, int a_Bloc void cProtocol172::SendWeather(eWeather a_Weather) { - cPacketizer Pkt(*this, 0x2b); // Change Game State packet - Pkt.WriteByte((a_Weather == wSunny) ? 2 : 1); // begin rain / end rain - Pkt.WriteFloat(0); // unused + { + cPacketizer Pkt(*this, 0x2b); // Change Game State packet + Pkt.WriteByte((a_Weather == wSunny) ? 1 : 2); // End rain / begin rain + Pkt.WriteFloat(0); // Unused for weather + } + + // TODO: Fade effect, somehow } -- cgit v1.2.3