X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fhud%2Fpanel%2Fradar.qc;h=612dc12e98ada6183ca03d1ed8712f63f8ae0aaa;hb=761fb981d742f869d7057a3bb7e3369329fdbe18;hp=10b6708e1e3f9c1e6c266f1839809a8876add2a9;hpb=bca28dde8f0bfd2f3cf771d24afb685201b4a561;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/hud/panel/radar.qc b/qcsrc/client/hud/panel/radar.qc index 10b6708e1..612dc12e9 100644 --- a/qcsrc/client/hud/panel/radar.qc +++ b/qcsrc/client/hud/panel/radar.qc @@ -1,8 +1,12 @@ #include "radar.qh" +#include +#include +#include #include #include #include +#include #include #include @@ -15,7 +19,7 @@ bool HUD_Radar_Clickable() void HUD_Radar_Show_Maximized(bool doshow, bool clickable) { - TC(bool, doshow); + TC(bool, doshow); hud_panel_radar_maximized = doshow; hud_panel_radar_temp_hidden = 0; @@ -23,8 +27,6 @@ void HUD_Radar_Show_Maximized(bool doshow, bool clickable) { if (clickable) { - if(autocvar_hud_cursormode) - setcursormode(1); hud_panel_radar_mouse = 1; // we must unset the player's buttons, as they aren't released elsewhere @@ -39,9 +41,6 @@ void HUD_Radar_Show_Maximized(bool doshow, bool clickable) { hud_panel_radar_mouse = 0; mouseClicked = 0; - if(autocvar_hud_cursormode) - if(!mv_active) - setcursormode(0); } } void HUD_Radar_Hide_Maximized() @@ -52,7 +51,7 @@ void HUD_Radar_Hide_Maximized() float HUD_Radar_InputEvent(int bInputType, float nPrimary, float nSecondary) { - TC(int, bInputType); + TC(int, bInputType); if(!hud_panel_radar_maximized || !hud_panel_radar_mouse || autocvar__hud_configure || mv_active) return false; @@ -137,9 +136,6 @@ void HUD_Radar_Mouse() return; } - if (!autocvar_hud_cursormode) - update_mousepos(); - panel = HUD_PANEL(RADAR); HUD_Panel_LoadCvars(); @@ -165,9 +161,6 @@ void HUD_Radar_Mouse() HUD_Radar_Hide_Maximized(); return; } - - - draw_cursor_normal(mousepos, '1 1 1', 0.8); } void HUD_Radar() @@ -211,9 +204,7 @@ void HUD_Radar() panel_bg = "gfx/hud/default/border_default"; // fallback if(!radar_panel_modified && panel_bg != panel.current_panel_bg) radar_panel_modified = true; - if(panel.current_panel_bg) - strunzone(panel.current_panel_bg); - panel.current_panel_bg = strzone(panel_bg); + strcpy(panel.current_panel_bg, panel_bg); switch(hud_panel_radar_maximized_zoommode) { @@ -351,8 +342,8 @@ void HUD_Radar() IL_EACH(g_radaricons, it.teamradar_icon, { if ( hud_panel_radar_mouse ) - if ( it.health >= 0 ) - if ( it.team == myteam + 1 || gametype == MAPINFO_TYPE_RACE || !teamplay ) + if ( GetResource(it, RES_HEALTH) >= 0 ) + if ( it.team == myteam + 1 || ISGAMETYPE(RACE) || !teamplay ) { vector coord = teamradar_texcoord_to_2dcoord(teamradar_3dcoord_to_texcoord(it.origin)); if(vdist((mousepos - coord), <, 8)) @@ -379,11 +370,11 @@ void HUD_Radar() if ( hud_panel_radar_mouse ) { - string message = "Click to select teleport destination"; + string message = _("Click to select teleport destination"); if ( STAT(HEALTH) <= 0 ) { - message = "Click to select spawn location"; + message = _("Click to select spawn location"); } drawcolorcodedstring(pos + '0.5 0 0' * (mySize_x - stringwidth(message, true, hud_fontsize)) - '0 1 0' * hud_fontsize_y * 2,