diff options
| author | oy <Tom_Adams@web.de> | 2011-12-29 13:56:24 +0100 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2011-12-29 13:56:24 +0100 |
| commit | 353f5cc8d69ced0e9d6c50e68ab1678e52a1310c (patch) | |
| tree | 5bbdb767d1dc1b5cbef98b2cb80bd66a1dd7ce80 /src | |
| parent | 4c73eab869b28fe1c580b74065347a787e89f21e (diff) | |
| download | zcatch-353f5cc8d69ced0e9d6c50e68ab1678e52a1310c.tar.gz zcatch-353f5cc8d69ced0e9d6c50e68ab1678e52a1310c.zip | |
fixed that the flag grab sound is played several times in a server side demo. Closes #901
Diffstat (limited to 'src')
| -rw-r--r-- | src/game/server/gamecontext.cpp | 10 | ||||
| -rw-r--r-- | src/game/server/gamemodes/ctf.cpp | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/game/server/gamecontext.cpp b/src/game/server/gamecontext.cpp index dc993bfd..ca429d79 100644 --- a/src/game/server/gamecontext.cpp +++ b/src/game/server/gamecontext.cpp @@ -204,7 +204,15 @@ void CGameContext::CreateSoundGlobal(int Sound, int Target) CNetMsg_Sv_SoundGlobal Msg; Msg.m_SoundID = Sound; - Server()->SendPackMsg(&Msg, MSGFLAG_VITAL, Target); + if(Target == -2) + Server()->SendPackMsg(&Msg, MSGFLAG_NOSEND, -1); + else + { + int Flag = MSGFLAG_VITAL; + if(Target != -1) + Flag |= MSGFLAG_NORECORD; + Server()->SendPackMsg(&Msg, Flag, Target); + } } diff --git a/src/game/server/gamemodes/ctf.cpp b/src/game/server/gamemodes/ctf.cpp index 66cc4c2c..9e45c1fe 100644 --- a/src/game/server/gamemodes/ctf.cpp +++ b/src/game/server/gamemodes/ctf.cpp @@ -259,6 +259,8 @@ void CGameControllerCTF::Tick() else GameServer()->CreateSoundGlobal(SOUND_CTF_GRAB_PL, c); } + // demo record entry + GameServer()->CreateSoundGlobal(SOUND_CTF_GRAB_EN, -2); break; } } |