From: FruitieX Date: Tue, 26 Oct 2010 12:15:00 +0000 (+0300) Subject: show times too X-Git-Tag: xonotic-v0.1.0preview~202^2~24 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a0f8e8a419e8493380cea88e20573078a3ee44a1;p=xonotic%2Fxonotic-data.pk3dir.git show times too --- diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 63474604a..262aee4e1 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -2921,13 +2921,13 @@ void HUD_KillNotify(string s1, string s2, string s3, float type, float msg) // s } } else if(msg == MSG_RACE) { if(type == RACE_SERVER_RECORD) { - HUD_KillNotify_Push(s1, "", 0, RACE_SERVER_RECORD); + HUD_KillNotify_Push(s1, s2, 1, RACE_SERVER_RECORD); } else if(type == RACE_NEW_RANK) { - HUD_KillNotify_Push(s1, "", 0, RACE_NEW_RANK); + HUD_KillNotify_Push(s1, s2, 1, RACE_NEW_RANK); } else if(type == RACE_NEW_TIME) { - HUD_KillNotify_Push(s1, "", 0, RACE_NEW_TIME); + HUD_KillNotify_Push(s1, s2, 1, RACE_NEW_TIME); } } } @@ -3187,18 +3187,6 @@ void HUD_Notify (void) s = "notify_blue_captured"; } } - else if(killnotify_deathtype[j] == RACE_SERVER_RECORD) - { - s = "race_newrecordserver"; - } - else if(killnotify_deathtype[j] == RACE_NEW_RANK) - { - s = "race_newrankyellow"; - } - else if(killnotify_deathtype[j] == RACE_NEW_TIME) - { - s = "race_newtime"; - } if(s != "" && a) { drawpic_aspect_skin(weap_pos, s, '2 1 0' * height, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL); @@ -3277,6 +3265,18 @@ void HUD_Notify (void) { s = "notify_void"; } + else if(killnotify_deathtype[j] == RACE_SERVER_RECORD) + { + s = "race_newrecordserver"; + } + else if(killnotify_deathtype[j] == RACE_NEW_RANK) + { + s = "race_newrankyellow"; + } + else if(killnotify_deathtype[j] == RACE_NEW_TIME) + { + s = "race_newtime"; + } 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/server/race.qc b/qcsrc/server/race.qc index fde140069..1032f002c 100644 --- a/qcsrc/server/race.qc +++ b/qcsrc/server/race.qc @@ -202,22 +202,22 @@ void race_setTime(string map, float t, string myuid, string mynetname, entity e) bprint(mynetname, "^1 broke ", oldrec_holder, "^1's 1st place record with ", strcat(TIME_ENCODED_TOSTRING(t), recorddifference, "\n")); } race_SendStatus(3, e); // "new server record" - Send_KillNotification(e.netname, "", "", RACE_SERVER_RECORD, MSG_RACE); + Send_KillNotification(e.netname, TIME_ENCODED_TOSTRING(t), "", RACE_SERVER_RECORD, MSG_RACE); } else { if(newpos == player_prevpos) { recorddifference = strcat(" ^2[-", TIME_ENCODED_TOSTRING(oldrec - t), "]"); bprint(mynetname, "^5 improved their ", race_placeName(newpos), " ^5place record with ", TIME_ENCODED_TOSTRING(t), recorddifference, "\n"); race_SendStatus(1, e); // "new time" - Send_KillNotification(e.netname, "", "", RACE_NEW_TIME, MSG_RACE); + Send_KillNotification(e.netname, TIME_ENCODED_TOSTRING(t), "", RACE_NEW_TIME, MSG_RACE); } else if (oldrec == 0) { bprint(mynetname, "^2 set the ", race_placeName(newpos), " ^2place record with ", TIME_ENCODED_TOSTRING(t), "\n"); race_SendStatus(2, e); // "new rank" - Send_KillNotification(e.netname, "", "", RACE_NEW_RANK, MSG_RACE); + Send_KillNotification(e.netname, TIME_ENCODED_TOSTRING(t), "", RACE_NEW_RANK, MSG_RACE); } else { recorddifference = strcat(" ^2[-", TIME_ENCODED_TOSTRING(oldrec - t), "]"); bprint(mynetname, "^2 broke ", oldrec_holder, "^2's ", race_placeName(newpos), " ^2place record with ", strcat(TIME_ENCODED_TOSTRING(t), recorddifference, "\n")); race_SendStatus(2, e); // "new rank" - Send_KillNotification(e.netname, "", "", RACE_NEW_TIME, MSG_RACE); + Send_KillNotification(e.netname, TIME_ENCODED_TOSTRING(t), "", RACE_NEW_TIME, MSG_RACE); } } }