X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fhud.qc;h=6b11719567d055e4234fd81ddb8344f3ba4316e8;hb=36f4b513fd7eac9b2dc37d393cebf3b7d98ac9af;hp=5277d3629b8534b434defa788c4e06a89c725b71;hpb=3b2827ccd3e346537e86bf134e05c54e1ab38aaa;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 5277d3629..6b1171956 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -600,7 +600,7 @@ float GetAmmoTypeForWep(float i) case WEP_HLAC: return 3; case WEP_MINSTANEX: return 3; case WEP_NEX: return 3; - case WEP_SNIPERRIFLE: return 1; + case WEP_RIFLE: return 1; case WEP_HAGAR: return 2; case WEP_ROCKET_LAUNCHER: return 2; case WEP_SEEKER: return 2; @@ -614,7 +614,7 @@ void HUD_Weapons(void) { float f, screen_ar; float center_x, center_y; - + if(hud != HUD_NORMAL) return; if(!autocvar__hud_configure) { if(!autocvar_hud_panel_weapons) return; @@ -1019,6 +1019,7 @@ void DrawAmmoItem(vector myPos, vector mySize, float itemcode, float currently_s void HUD_Ammo(void) { + if(hud != HUD_NORMAL) return; if(!autocvar__hud_configure) { if(!autocvar_hud_panel_ammo) return; @@ -1319,6 +1320,7 @@ void HUD_HealthArmor(void) if(!autocvar__hud_configure) { if(!autocvar_hud_panel_healtharmor) return; + if(hud != HUD_NORMAL) return; if(spectatee_status == -1) return; health = getstati(STAT_HEALTH); @@ -1680,7 +1682,7 @@ void HUD_KillNotify(string s1, string s2, string s3, float type, float msg) // s } else if(msg == MSG_KILL) { w = DEATH_WEAPONOF(type); if(WEP_VALID(w)) { - if((w == WEP_SNIPERRIFLE || w == WEP_MINSTANEX) && type & HITTYPE_HEADSHOT) // all headshot weapons go here + if((w == WEP_RIFLE || w == WEP_MINSTANEX) && type & HITTYPE_HEADSHOT) // all headshot weapons go here HUD_KillNotify_Push(s1, s2, 1, DEATH_HEADSHOT); else HUD_KillNotify_Push(s1, s2, 1, type); @@ -1755,7 +1757,7 @@ void HUD_KillNotify(string s1, string s2, string s3, float type, float msg) // s HUD_KillNotify_Push(s1, s2, 1, DEATH_HURTTRIGGER); if(alsoprint) print(sprintf(_("^1%s^1 was thrown into a world of hurt by %s\n"), s2, s1)); - } else if(type == DEATH_SBCRUSH) { + } else if(type == DEATH_VHCRUSH) { HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC); if(alsoprint) print (sprintf(_("^1%s^1 was crushed by %s\n"), s2, s1)); @@ -1783,6 +1785,18 @@ void HUD_KillNotify(string s1, string s2, string s3, float type, float msg) // s HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC); if(alsoprint) print (sprintf(_("^1%s^1 dies when %s^1's wakizashi dies.\n"), s2, s1)); + } else if(type == DEATH_RAPTOR_CANNON) { + HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC); + if(alsoprint) + print (sprintf(_("^1%s^1 nailed to hell by %s\n"), s2, s1)); + } else if(type == DEATH_RAPTOR_BOMB) { + HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC); + if(alsoprint) + print (sprintf(_("^1%s^1 cluster crushed by %s\n"), s2, s1)); + } else if(type == DEATH_RAPTOR_DEATH) { + HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC); + if(alsoprint) + print (sprintf(_("^1%s^1 dies when %s^1's raptor dies.\n"), s2, s1)); } else if(type == DEATH_TURRET) { HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC); if(alsoprint) @@ -1850,7 +1864,7 @@ void HUD_KillNotify(string s1, string s2, string s3, float type, float msg) // s print (sprintf(_("%s^7 is a ^1BERSERKER!\n"), s1)); } else if(type == KILL_SPREE_25) { if(gentle) - print (sprintf(_("%s^7 made ^1TWENTY FIFE SCORES IN A ROW!\n"), s1)); + print (sprintf(_("%s^7 made ^1TWENTY FIVE SCORES IN A ROW!\n"), s1)); else print (sprintf(_("%s^7 inflicts ^1CARNAGE!\n"), s1)); } else if(type == KILL_SPREE_30) { @@ -2034,9 +2048,9 @@ void HUD_Centerprint(string s1, string s2, float type, float msg) } else if(msg == MSG_KILL) { if (type == KILL_TEAM_RED || type == KILL_TEAM_BLUE) { if(gentle) { - centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, sprintf(_("^1Moron! You went against %s, a team mate!"), s1))); + centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, sprintf(_("^1Moron! You went against ^7%s^1, a team mate!"), s1))); } else { - centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, sprintf(_("^1Moron! You fragged %s, a team mate!"), s1))); + centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, sprintf(_("^1Moron! You fragged ^7%s^1, a team mate!"), s1))); } } else if (type == KILL_FIRST_BLOOD) { if(gentle) { @@ -2586,34 +2600,33 @@ void HUD_Score_Rankings(vector pos, vector mySize, entity me, float team_count) #define SCOREPANEL_MAX_ENTRIES 6 #define SCOREPANEL_ASPECTRATIO 2 const float entries = bound(1, floor(SCOREPANEL_MAX_ENTRIES * mySize_y/mySize_x * SCOREPANEL_ASPECTRATIO), SCOREPANEL_MAX_ENTRIES); - const float height = mySize_y/entries; - const vector fontsize = '0.9 0.9 0' * height; - pos_y += height * (1 - 0.9) / 2; + const vector fontsize = '1 1 0' * (mySize_y/entries); - vector rgb; + vector rgb, score_color; rgb = '1 1 1'; + score_color = '1 1 1'; const float name_size = mySize_x*0.75; + const float spacing_size = mySize_x*0.04; const float highlight_alpha = 0.2; float i, me_printed, first_pl; string s; i, first_pl = 0; if (autocvar__hud_configure) { + float players_per_team; if (team_count) { // show team scores in the first line float score_size = mySize_x / team_count; - for(tm = teams.sort_next; tm; tm = tm.sort_next) { - if(tm.team == COLOR_SPECTATOR) - continue; - if (tm.team == myteam) - HUD_Panel_DrawHighlight(pos - eY * (height * (1 - 0.9) / 2) + eX * score_size * i, eX * score_size + eY * height, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); - drawstring_aspect(pos + eX * score_size * i, ftos(123), eX * score_size + eY * fontsize_y, GetTeamRGB(tm.team) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL); - ++i; + players_per_team = max(2, ceil((entries - 1) / team_count)); + for(i=0; i