about summary refs log tree commit diff
path: root/src/game/server
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/server')
-rw-r--r--src/game/server/gs_game_ctf.cpp6
-rw-r--r--src/game/server/gs_server.cpp1
2 files changed, 4 insertions, 3 deletions
diff --git a/src/game/server/gs_game_ctf.cpp b/src/game/server/gs_game_ctf.cpp
index af97475a..5e3af5c1 100644
--- a/src/game/server/gs_game_ctf.cpp
+++ b/src/game/server/gs_game_ctf.cpp
@@ -122,13 +122,13 @@ void gameobject_ctf::tick()
 					
 					for(int c = 0; c < MAX_CLIENTS; c++)
 					{
-						if(players[c].client_id != -1)
+						if(players[c].client_id == -1)
 							continue;
 							
 						if(players[c].team == fi)
-							create_sound_global(SOUND_CTF_GRAB_EN, c);
+							create_sound_global(SOUND_CTF_GRAB_EN, players[c].client_id);
 						else
-							create_sound_global(SOUND_CTF_GRAB_PL, c);
+							create_sound_global(SOUND_CTF_GRAB_PL, players[c].client_id);
 					}
 					break;
 				}
diff --git a/src/game/server/gs_server.cpp b/src/game/server/gs_server.cpp
index bdd3f493..afc0fa22 100644
--- a/src/game/server/gs_server.cpp
+++ b/src/game/server/gs_server.cpp
@@ -1551,6 +1551,7 @@ void create_sound_global(int sound, int target)
 	msg_pack_start(MSG_SOUND_GLOBAL, MSGFLAG_VITAL);
 	msg_pack_int(sound);
 	server_send_msg(target);
+	dbg_msg("globalsound", "%d %d", sound, target);
 }
 
 // TODO: should be more general