X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fmapvoting.qc;h=e517e76dee4300bc6ec16589efabf9e59219a93e;hb=c859a2a87cbeb3dd30f402782cf7e59d132b1b81;hp=d0bab24b56d2d1918da0a132275efdd143e348bf;hpb=be37ea91fb3bbd1a6fa4f0b70b32d1ea95343ad4;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/mapvoting.qc b/qcsrc/client/mapvoting.qc index d0bab24b5..e517e76de 100644 --- a/qcsrc/client/mapvoting.qc +++ b/qcsrc/client/mapvoting.qc @@ -1,13 +1,19 @@ #include "mapvoting.qh" -#include "autocvars.qh" -#include "miscfunctions.qh" -#include "defs.qh" -#include "hud/_mod.qh" -#include "hud/panel/scoreboard.qh" - +#include +#include +#include +#include #include +#include + +// MapVote (#21) +void MapVote_Draw_Export(int fh) +{ + // allow saving cvars that aesthetically change the panel into hud skin files + HUD_Write_Cvar("hud_panel_mapvote_highlight_border"); +} int mv_num_maps; @@ -41,6 +47,19 @@ const int NUM_SSDIRS = 4; string ssdirs[NUM_SSDIRS]; int n_ssdirs; +bool PreviewExists(string name) +{ + if(autocvar_cl_readpicture_force) + return false; + + if (fexists(strcat(name, ".tga"))) return true; + if (fexists(strcat(name, ".png"))) return true; + if (fexists(strcat(name, ".jpg"))) return true; + if (fexists(strcat(name, ".pcx"))) return true; + + return false; +} + string MapVote_FormatMapItem(int id, string map, float _count, float maxwidth, vector fontsize) { TC(int, id); @@ -629,7 +648,7 @@ void GameTypeVote_ReadOption(int i) } else { - Gametype type = MapInfo_Type_FromString(gt); + Gametype type = MapInfo_Type_FromString(gt, false, false); mv_pk3[i] = strzone(MapInfo_Type_ToText(type)); mv_desc[i] = MapInfo_Type_Description(type); }