summaryrefslogtreecommitdiffstats
path: root/source/Protocol132.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Protocol132.cpp')
-rw-r--r--source/Protocol132.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/source/Protocol132.cpp b/source/Protocol132.cpp
index e291c0c69..37343e443 100644
--- a/source/Protocol132.cpp
+++ b/source/Protocol132.cpp
@@ -59,6 +59,7 @@ enum
PACKET_CHUNK_DATA = 0x33,
PACKET_BLOCK_CHANGE = 0x35,
PACKET_BLOCK_ACTION = 0x36,
+ PACKET_SOUND_EFFECT = 0x3e
} ;
@@ -310,6 +311,23 @@ void cProtocol132::SendPlayerSpawn(const cPlayer & a_Player)
+void cProtocol132::SendSoundEffect(const AString & a_SoundName, int a_SrcX, int a_SrcY, int a_SrcZ, float a_Volume, float a_Pitch)
+{
+ cCSLock Lock(m_CSPacket);
+ WriteByte (PACKET_SOUND_EFFECT);
+ WriteString (a_SoundName);
+ WriteInt (a_SrcX);
+ WriteInt (a_SrcY);
+ WriteInt (a_SrcZ);
+ WriteFloat (a_Volume);
+ WriteByte ((char)(a_Pitch * 63.0f));
+ Flush();
+}
+
+
+
+
+
void cProtocol132::SendSpawnMob(const cMonster & a_Mob)
{
cCSLock Lock(m_CSPacket);