X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fclient%2Fhud.qc;h=b341f10515da597bbba1e90a3632e336f9a4c21b;hp=966fdb3857214a2508a927de7863ee5dc786c208;hb=4c1fcf7b3bdaee8fd10d48d2ac5b21c3a9371de1;hpb=0b426fa043d2c248328c3a913b0864c72839ffa1 diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 966fdb3857..b341f10515 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -2593,6 +2593,9 @@ void HUD_KillNotify(string s1, string s2, string s3, float type, float msg) // s alsoprint = (autocvar_hud_panel_notify_print || !panel_enabled); // print message to console if: notify panel disabled, or cvar to do so enabled gentle = (autocvar_cl_gentle || autocvar_cl_gentle_messages); + if (msg == MSG_SUICIDE && gametype == GAME_CTS) // selfkill isn't interesting in CTS and only spams up the notify panel + return; + if(msg == MSG_SUICIDE) { w = DEATH_WEAPONOF(type); if(WEP_VALID(w)) { @@ -2919,6 +2922,19 @@ void HUD_KillNotify(string s1, string s2, string s3, float type, float msg) // s HUD_KillNotify_Push(s1, s2, 0, INFO_CAPTUREFLAG); print(s1, "^7 captured the ", s2, s3, "\n"); } + } else if(msg == MSG_RACE) { + if(type == RACE_SERVER_RECORD) { + HUD_KillNotify_Push(s1, s2, 1, RACE_SERVER_RECORD); + } + else if(type == RACE_NEW_RANK) { + HUD_KillNotify_Push(s1, s2, 1, RACE_NEW_RANK); + } + 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); + } } } @@ -3255,6 +3271,22 @@ 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"; + } + 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); @@ -3745,11 +3777,22 @@ float vote_change; // "time" when vote_active changed void HUD_VoteWindow(void) { + if(autocvar_cl_allow_uid2name == -1 && (gametype == GAME_CTS || gametype == GAME_RACE)) + { + vote_active = 1; + vote_called_vote = "^2Name ^7instead of \"^1Unregistered player\" ^7in stats"; + } + if(!autocvar_hud_panel_vote && !autocvar__hud_configure) return; active_panel = HUD_PANEL_VOTE; HUD_Panel_UpdateCvars(vote); + if(autocvar_cl_allow_uid2name == -1 && (gametype == GAME_CTS || gametype == GAME_RACE)) + { + panel_pos = eX * 0.3 * vid_conwidth + eY * 0.1 * vid_conheight; + panel_size = eX * 0.4 * vid_conwidth + eY * 0.3 * vid_conheight; + } vector pos, mySize; pos = panel_pos; mySize = panel_size; @@ -3815,16 +3858,22 @@ void HUD_VoteWindow(void) mySize = newSize; s = "A vote has been called for:"; + if(autocvar_cl_allow_uid2name == -1 && (gametype == GAME_CTS || gametype == GAME_RACE)) + s = "Allow servers to store and display your name?"; drawstring_aspect(pos, s, eX * mySize_x + eY * (2/8) * mySize_y, '1 1 1', a, DRAWFLAG_NORMAL); - s = textShortenToWidth(vote_called_vote, mySize_x, '1 1 0' * mySize_y * (1.75/8), stringwidth_colors); + s = textShortenToWidth(vote_called_vote, mySize_x, '1 1 0' * mySize_y * (1/8), stringwidth_colors); if(autocvar__hud_configure) s = "^1Configure the HUD"; drawcolorcodedstring_aspect(pos + eY * (2/8) * mySize_y, s, eX * mySize_x + eY * (1.75/8) * mySize_y, a, DRAWFLAG_NORMAL); // print the yes/no counts s = strcat("Yes (", getcommandkey("vyes", "vyes"), "): ", ftos(vote_yescount)); + if(autocvar_cl_allow_uid2name == -1 && (gametype == GAME_CTS || gametype == GAME_RACE)) + s = strcat("Yes: (press y)"); drawstring_aspect(pos + eY * (4/8) * mySize_y, s, eX * 0.5 * mySize_x + eY * (1.5/8) * mySize_y, '0 1 0', a, DRAWFLAG_NORMAL); s = strcat("No (", getcommandkey("vno", "vno"), "): ", ftos(vote_nocount)); + if(autocvar_cl_allow_uid2name == -1 && (gametype == GAME_CTS || gametype == GAME_RACE)) + s = strcat("No: (press n)"); drawstring_aspect(pos + eX * 0.5 * mySize_x + eY * (4/8) * mySize_y, s, eX * 0.5 * mySize_x + eY * (1.5/8) * mySize_y, '1 0 0', a, DRAWFLAG_NORMAL); // draw the progress bar backgrounds @@ -3867,11 +3916,12 @@ void HUD_Mod_CA(vector pos, vector mySize) redalive = getstati(STAT_REDALIVE); bluealive = getstati(STAT_BLUEALIVE); + drawfont = hud_bigfont; vector redpos, bluepos; if(mySize_x > mySize_y) { redpos = pos; - bluepos = pos + eX * 0.5 * mySize_x; + bluepos = pos + eY * 0.5 * mySize_y; drawpic_aspect_skin(redpos, "player_red.tga", 0.5 * mySize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); drawstring_aspect(redpos + eX * 0.5 * mySize_x, ftos(redalive), 0.5 * mySize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); drawpic_aspect_skin(bluepos, "player_blue.tga", 0.5 * mySize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); @@ -3886,6 +3936,7 @@ void HUD_Mod_CA(vector pos, vector mySize) drawpic_aspect_skin(bluepos, "player_blue.tga", eX * mySize_x + eY * 0.3 * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); drawstring_aspect(bluepos + eY * 0.3 * mySize_y, ftos(bluealive), eX * mySize_x + eY * 0.2 * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); } + drawfont = hud_font; } // CTF HUD modicon section @@ -4384,7 +4435,7 @@ void HUD_ModIcons(void) if(!autocvar_hud_panel_modicons && !autocvar__hud_configure) return; - if (gametype != GAME_KEYHUNT && gametype != GAME_CTF && gametype != GAME_NEXBALL && gametype != GAME_CTS && gametype != GAME_RACE && !autocvar__hud_configure) + if (gametype != GAME_KEYHUNT && gametype != GAME_CTF && gametype != GAME_NEXBALL && gametype != GAME_CTS && gametype != GAME_RACE && gametype != GAME_CA && !autocvar__hud_configure) return; active_panel = HUD_PANEL_MODICONS;