]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/client/radar.qc
Allow multiple gfx/hud/ subfolders and a cvar to choose which is in use
[voretournament/voretournament.git] / data / qcsrc / client / radar.qc
index 4350b0cb83c2c67f7d83ac42b3d980a25f6178ab..b9cdab9be65273ca0f5f84bef13f50f783c58327 100644 (file)
@@ -64,7 +64,7 @@ void draw_radar_background(float ca, float bg)
 \r
        if(bg > 0)\r
        {\r
-               R_BeginPolygon("gfx/hud/bg_radar.tga", 0);\r
+               R_BeginPolygon(strcat("gfx/hud/", cvar_string("hud_style"), "/bg_radar.tga"), 0);\r
                R_PolygonVertex(pos1, yinvert('0 1 0'), '1 1 1', bg);\r
                R_PolygonVertex(pos2, yinvert('1 1 0'), '1 1 1', bg);\r
                R_PolygonVertex(pos3, yinvert('1 0 0'), '1 1 1', bg);\r
@@ -106,14 +106,14 @@ void draw_radar_foreground(float fg)
 \r
        if(fg > 0)\r
        {\r
-               R_BeginPolygon("gfx/hud/fg_radar.tga", 0);\r
+               R_BeginPolygon(strcat("gfx/hud/", cvar_string("hud_style"), "/fg_radar.tga"), 0);\r
                R_PolygonVertex(pos1, yinvert('0 1 0'), '1 1 1', fg);\r
                R_PolygonVertex(pos2, yinvert('1 1 0'), '1 1 1', fg);\r
                R_PolygonVertex(pos3, yinvert('1 0 0'), '1 1 1', fg);\r
                R_PolygonVertex(pos4, yinvert('0 0 0'), '1 1 1', fg);\r
                R_EndPolygon();\r
 \r
-               R_BeginPolygon("gfx/hud/fg_radar_team.tga", 0);\r
+               R_BeginPolygon(strcat("gfx/hud/", cvar_string("hud_style"), "/fg_radar_team.tga"), 0);\r
                R_PolygonVertex(pos1, yinvert('0 1 0'), rgb, fg);\r
                R_PolygonVertex(pos2, yinvert('1 1 0'), rgb, fg);\r
                R_PolygonVertex(pos3, yinvert('1 0 0'), rgb, fg);\r