X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fhud%2Fpanel%2Finfomessages.qc;h=554a05a475259ec38ef52300bcf81649e4f77af2;hb=17fd0adc9434cde385b78d09196aed727b24b9c4;hp=131d62efe921129071db68a515723bf45cf0c69f;hpb=be37ea91fb3bbd1a6fa4f0b70b32d1ea95343ad4;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/hud/panel/infomessages.qc b/qcsrc/client/hud/panel/infomessages.qc index 131d62efe..554a05a47 100644 --- a/qcsrc/client/hud/panel/infomessages.qc +++ b/qcsrc/client/hud/panel/infomessages.qc @@ -1,13 +1,16 @@ #include "infomessages.qh" -#include -#include - +#include #include -#include // Info messages (#14) +void HUD_InfoMessages_Export(int fh) +{ + // allow saving cvars that aesthetically change the panel into hud skin files + HUD_Write_Cvar("hud_panel_infomessages_flip"); +} + float autocvar_hud_panel_infomessages_group0 = 1; float autocvar_hud_panel_infomessages_group_fadetime = 0.4; float autocvar_hud_panel_infomessages_group_time = 6; @@ -116,22 +119,15 @@ void HUD_InfoMessages() InfoMessage(s); } - MUTATOR_CALLHOOK(DrawInfoMessages, pos, mySize); + bool mutator_returnvalue = MUTATOR_CALLHOOK(DrawInfoMessages, pos, mySize, img_curr_group); + pos = M_ARGV(0, vector); + img_curr_group = M_ARGV(2, int); - if(!warmup_stage && ISGAMETYPE(LMS)) + if(!mutator_returnvalue) { - entity sk; - sk = playerslots[player_localnum]; - if(sk.(scores(ps_primary)) >= 666) - s = _("^1Match has already begun"); - else if(sk.(scores(ps_primary)) > 0) - s = _("^1You have no more lives left"); - else - s = sprintf(_("^1Press ^3%s^1 to join"), getcommandkey(_("jump"), "+jump")); - } - else s = sprintf(_("^1Press ^3%s^1 to join"), getcommandkey(_("jump"), "+jump")); - InfoMessage(s); + InfoMessage(s); + } } if (time < STAT(GAMESTARTTIME)) @@ -198,7 +194,7 @@ void HUD_InfoMessages() s = strcat(blinkcolor, _("Teamnumbers are unbalanced!")); tm = GetTeam(myteam, false); if (tm && tm.team != NUM_SPECTATOR && tm.team_size == ts_max) - s = strcat(s, sprintf(_(" Press ^3%s%s to adjust"), getcommandkey(_("team menu"), "menu_showteamselect"), blinkcolor)); + s = strcat(s, sprintf(_(" Press ^3%s%s to adjust"), getcommandkey(_("team selection"), "scoreboard_team_selection"), blinkcolor)); InfoMessage(s); } }