From 1e7c599a0afa11d0a2934ae5d6b61127f90f00d6 Mon Sep 17 00:00:00 2001 From: Lyberta Date: Wed, 3 May 2017 23:48:46 +0300 Subject: [PATCH] Survival: Added last player notification. --- .../mutators/mutator/gamemode_survival.qc | 23 ++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/qcsrc/server/mutators/mutator/gamemode_survival.qc b/qcsrc/server/mutators/mutator/gamemode_survival.qc index f972451ad..86ac5700c 100644 --- a/qcsrc/server/mutators/mutator/gamemode_survival.qc +++ b/qcsrc/server/mutators/mutator/gamemode_survival.qc @@ -737,6 +737,15 @@ void Surv_RemovePlayerFromAliveList(entity player, int teamnum) { sound(NULL, CH_TRIGGER, SND_SURV_1_FRAG_LEFT, VOL_BASE, ATTEN_NONE); + FOREACH_CLIENT(IS_PLAYER(it), + { + if (it.team == surv_defenderteam) + { + Send_Notification(NOTIF_ONE, it, MSG_CENTER, + CENTER_ALONE); + return; + } + }); return; } case 2: @@ -801,19 +810,27 @@ void Surv_CountAlivePlayers() case 1: { sound(NULL, CH_TRIGGER, SND_SURV_1_FRAG_LEFT, VOL_BASE, ATTEN_NONE); - break; + FOREACH_CLIENT(IS_PLAYER(it), + { + if (it.team == surv_defenderteam) + { + Send_Notification(NOTIF_ONE, it, MSG_CENTER, CENTER_ALONE); + return; + } + }); + return; } case 2: { sound(NULL, CH_TRIGGER, SND_SURV_2_FRAGS_LEFT, VOL_BASE, ATTEN_NONE); - break; + return; } case 3: { sound(NULL, CH_TRIGGER, SND_SURV_3_FRAGS_LEFT, VOL_BASE, ATTEN_NONE); - break; + return; } } } -- 2.39.5