From e84a6b4c3e6cf42806e95ad8a7ed37a77a4a637f Mon Sep 17 00:00:00 2001 From: FruitieX Date: Tue, 26 Oct 2010 17:08:06 +0300 Subject: [PATCH] also send "fail medals" to the notify system, it probably won't get too spammy anyway --- qcsrc/client/hud.qc | 7 +++++++ qcsrc/common/constants.qh | 1 + qcsrc/server/race.qc | 2 ++ 3 files changed, 10 insertions(+) diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index e3ef718e1..2809cafa0 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -2929,6 +2929,9 @@ void HUD_KillNotify(string s1, string s2, string s3, float type, float msg) // s else if(type == RACE_NEW_TIME) { HUD_KillNotify_Push(s1, s2, 1, RACE_NEW_TIME); } + else if(type == RACE_FAIL) { + HUD_KillNotify_Push(s1, s2, 1, RACE_FAIL); + } } } @@ -3277,6 +3280,10 @@ void HUD_Notify (void) { s = "race_newtime"; } + else if(killnotify_deathtype[j] == RACE_FAIL) + { + s = "race_newfail"; + } if(s != "" && a) { drawpic_aspect_skin(weap_pos, s, '2 1 0' * height, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL); diff --git a/qcsrc/common/constants.qh b/qcsrc/common/constants.qh index f8ccc13d8..c1455af45 100644 --- a/qcsrc/common/constants.qh +++ b/qcsrc/common/constants.qh @@ -590,6 +590,7 @@ float INFO_CAPTUREFLAG = 10323; float RACE_SERVER_RECORD = 10400; float RACE_NEW_TIME = 10401; float RACE_NEW_RANK = 10402; +float RACE_FAIL = 10403; // weapon requests float WR_SETUP = 1; // (SVQC) setup weapon data diff --git a/qcsrc/server/race.qc b/qcsrc/server/race.qc index 1032f002c..d88694ab3 100644 --- a/qcsrc/server/race.qc +++ b/qcsrc/server/race.qc @@ -155,11 +155,13 @@ void race_setTime(string map, float t, string myuid, string mynetname, entity e) recorddifference = strcat(" ^1[+", TIME_ENCODED_TOSTRING(t - oldrec), "]"); bprint(mynetname, "^7 couldn't break their ", race_placeName(player_prevpos), " place record of ", TIME_ENCODED_TOSTRING(oldrec), recorddifference, "\n"); race_SendStatus(0, e); // "fail" + Send_KillNotification(e.netname, TIME_ENCODED_TOSTRING(t), "", RACE_FAIL, MSG_RACE); return; } else if (!newpos) { // no ranking, time worse than the worst ranked recorddifference = strcat(" ^1[+", TIME_ENCODED_TOSTRING(t - race_readTime(GetMapname(), RANKINGS_CNT)), "]"); bprint(mynetname, "^7 couldn't break the ", race_placeName(RANKINGS_CNT), " place record of ", TIME_ENCODED_TOSTRING(race_readTime(GetMapname(), RANKINGS_CNT)), recorddifference, "\n"); race_SendStatus(0, e); // "fail" + Send_KillNotification(e.netname, TIME_ENCODED_TOSTRING(t), "", RACE_FAIL, MSG_RACE); return; } -- 2.39.2