summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol17x.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-07-13 13:31:09 +0200
committermadmaxoft <github@xoft.cz>2014-07-13 13:31:09 +0200
commit31415aec63f03aeb92ec17ad3a3acb27aa6b2fc2 (patch)
treebeccd7d4a05039ba5055e44721875ec15befae27 /src/Protocol/Protocol17x.cpp
parentUpdate. (diff)
downloadcuberite-31415aec63f03aeb92ec17ad3a3acb27aa6b2fc2.tar
cuberite-31415aec63f03aeb92ec17ad3a3acb27aa6b2fc2.tar.gz
cuberite-31415aec63f03aeb92ec17ad3a3acb27aa6b2fc2.tar.bz2
cuberite-31415aec63f03aeb92ec17ad3a3acb27aa6b2fc2.tar.lz
cuberite-31415aec63f03aeb92ec17ad3a3acb27aa6b2fc2.tar.xz
cuberite-31415aec63f03aeb92ec17ad3a3acb27aa6b2fc2.tar.zst
cuberite-31415aec63f03aeb92ec17ad3a3acb27aa6b2fc2.zip
Diffstat (limited to 'src/Protocol/Protocol17x.cpp')
-rw-r--r--src/Protocol/Protocol17x.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp
index ae077d69e..dc6a817a3 100644
--- a/src/Protocol/Protocol17x.cpp
+++ b/src/Protocol/Protocol17x.cpp
@@ -1088,15 +1088,11 @@ void cProtocol172::SendSoundEffect(const AString & a_SoundName, double a_X, doub
{
ASSERT(m_State == 3); // In game mode?
- int SrcX = std::floor(a_X * 8.0);
- int SrcY = std::floor(a_Y * 8.0);
- int SrcZ = std::floor(a_Z * 8.0);
-
cPacketizer Pkt(*this, 0x29); // Sound Effect packet
Pkt.WriteString(a_SoundName);
- Pkt.WriteInt(SrcX);
- Pkt.WriteInt(SrcY);
- Pkt.WriteInt(SrcZ);
+ Pkt.WriteInt((int)(a_X * 8.0));
+ Pkt.WriteInt((int)(a_Y * 8.0));
+ Pkt.WriteInt((int)(a_Z * 8.0));
Pkt.WriteFloat(a_Volume);
Pkt.WriteByte((Byte)(a_Pitch * 63));
}