Merged in a patch for sounds by l0udPL
http://forum.mc-server.org/showthread.php?tid=434&pid=4564#pid4564 git-svn-id: http://mc-server.googlecode.com/svn/trunk@858 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user