]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
also send "fail medals" to the notify system, it probably won't get too spammy anyway
authorFruitieX <rasse@rasse-laptop.(none)>
Tue, 26 Oct 2010 14:08:06 +0000 (17:08 +0300)
committerFruitieX <rasse@rasse-laptop.(none)>
Tue, 26 Oct 2010 14:08:06 +0000 (17:08 +0300)
qcsrc/client/hud.qc
qcsrc/common/constants.qh
qcsrc/server/race.qc

index e3ef718e1ce422b89aa8a979774a3a55c33239f1..2809cafa01ee5b3e0580db47b3ef84733244b550 100644 (file)
@@ -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);
index f8ccc13d8969396734c7152e0fc7a2486ccb0952..c1455af452b47b346f68e3066e17aaa49ebbf61e 100644 (file)
@@ -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
index 1032f002cdc32099b2b72a1414ba75bfaf14924e..d88694ab3fc57bde639d9a4a00d20f135a6e71ed 100644 (file)
@@ -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;
        }