From 87cf8cc5ac79b74cf839738b293203b03a2625be Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Sat, 15 Dec 2007 15:35:50 +0000 Subject: added new ctf sounds --- src/game/server/gs_game_ctf.cpp | 12 +++++++++++- src/game/server/gs_server.cpp | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/game/server/gs_game_ctf.cpp b/src/game/server/gs_game_ctf.cpp index 30d898d9..9e11586b 100644 --- a/src/game/server/gs_game_ctf.cpp +++ b/src/game/server/gs_game_ctf.cpp @@ -119,7 +119,17 @@ void gameobject_ctf::tick() f->at_stand = 0; f->carrying_player = players[i]; f->carrying_player->score += 1; - create_sound_global(SOUND_CTF_GRAB); + + for(int c = 0; c < MAX_CLIENTS; c++) + { + if(!players[c]) + continue; + + if(players[c]->team == fi) + create_sound_global(SOUND_CTF_GRAB_EN, c); + else + create_sound_global(SOUND_CTF_GRAB_PL, c); + } break; } } diff --git a/src/game/server/gs_server.cpp b/src/game/server/gs_server.cpp index ed72816f..bdd3f493 100644 --- a/src/game/server/gs_server.cpp +++ b/src/game/server/gs_server.cpp @@ -1550,7 +1550,7 @@ void create_sound_global(int sound, int target) msg_pack_start(MSG_SOUND_GLOBAL, MSGFLAG_VITAL); msg_pack_int(sound); - server_send_msg(-1); + server_send_msg(target); } // TODO: should be more general -- cgit 1.4.1