From 126f603c508f907931ca502b4268531aa422a690 Mon Sep 17 00:00:00 2001 From: Alexander Akulich Date: Tue, 6 Jun 2023 21:40:09 +0300 Subject: [PATCH] GameContext: Fix global sound demo recording --- src/game/server/gamecontext.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/game/server/gamecontext.cpp b/src/game/server/gamecontext.cpp index 559f69a0a..02d3e50f9 100644 --- a/src/game/server/gamecontext.cpp +++ b/src/game/server/gamecontext.cpp @@ -328,10 +328,12 @@ void CGameContext::CreateSoundGlobal(int Sound, int Target) Server()->SendPackMsg(&Msg, MSGFLAG_NOSEND, -1); else { - int Flag = MSGFLAG_VITAL; - if(Target != -1) - Flag |= MSGFLAG_NORECORD; - Server()->SendPackMsg(&Msg, Flag, Target); + if(Target == -1) + { + Server()->SendPackMsg(&Msg, MSGFLAG_VITAL | MSGFLAG_NOSEND, SERVER_DEMO_CLIENT); + } + + Server()->SendPackMsg(&Msg, MSGFLAG_VITAL | MSGFLAG_NORECORD, Target); } }