X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=qcsrc%2Fclient%2FMain.qc;h=aa95e9724a2094598c5db210f518f29f6614a1e2;hb=03d780d293d208d7b24c452d0e03ca4b12206413;hp=710c7f7433a7b687a3dab1fa027c675e8795a005;hpb=194e2e23ed2569fd71f1f7cb5c33e833a46fcb2d;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/Main.qc b/qcsrc/client/Main.qc index 710c7f743..aa95e9724 100644 --- a/qcsrc/client/Main.qc +++ b/qcsrc/client/Main.qc @@ -136,6 +136,8 @@ void CSQC_Init(void) WaypointSprite_Load(); // precaches + precache_sound("misc/hit.wav"); + precache_sound("misc/typehit.wav"); Projectile_Precache(); Hook_Precache(); GibSplash_Precache(); @@ -149,6 +151,9 @@ void CSQC_Init(void) } Tuba_Precache(); + if(autocvar_cl_reticle_item_normal) precache_pic("gfx/reticle_normal"); + if(autocvar_cl_reticle_item_nex) precache_pic("gfx/reticle_nex"); + get_mi_min_max_texcoords(1); // try the CLEVER way first minimapname = strcat("gfx/", mi_shortname, "_radar.tga"); shortmapname = mi_shortname; @@ -168,7 +173,9 @@ void CSQC_Init(void) minimapname = strzone(minimapname); WarpZone_Init(); + hud_configure_prev = -1; + tab_panel = -1; } // CSQC_Shutdown : Called every time the CSQC code is shutdown (changing maps, quitting, etc) @@ -610,6 +617,7 @@ void GameCommand(string msg) vote_prev = 0; cvar_set("cl_allow_uid2name", "1"); vote_change = -9999; + uid2name_dialog = 0; } else { @@ -624,6 +632,7 @@ void GameCommand(string msg) vote_prev = 0; cvar_set("cl_allow_uid2name", "0"); vote_change = -9999; + uid2name_dialog = 0; } else { @@ -993,15 +1002,6 @@ void CSQC_Ent_Remove() void Gamemode_Init() { - if(gametype == GAME_ONSLAUGHT) { - print(strcat("Using ", minimapname, " as minimap.\n")); - precache_pic("gfx/ons-cp-neutral.tga"); - precache_pic("gfx/ons-cp-red.tga"); - precache_pic("gfx/ons-cp-blue.tga"); - precache_pic("gfx/ons-frame.tga"); - precache_pic("gfx/ons-frame-team.tga"); - } - if not(isdemo()) { localcmd("\n_cl_hook_gamestart ", GametypeNameFromType(gametype), "\n"); @@ -1092,6 +1092,8 @@ void Ent_Init() serverflags = ReadByte(); + minelayer_maxmines = ReadByte(); + g_trueaim_minrange = ReadCoord(); if(!postinit) @@ -1406,7 +1408,7 @@ string getcommandkey(string text, string command) string keys; float n, j, k, l; - if (!hud_showbinds) + if (!autocvar_hud_showbinds) return text; keys = db_get(binddb, command); @@ -1424,7 +1426,7 @@ string getcommandkey(string text, string command) keys = strcat(keys, ", ", keynumtostring(k)); ++l; - if (hud_showbinds_limit > 0 && hud_showbinds_limit >= l) break; + if (autocvar_hud_showbinds_limit > 0 && autocvar_hud_showbinds_limit >= l) break; } } @@ -1432,12 +1434,12 @@ string getcommandkey(string text, string command) } if ("" == keys) { - if (hud_showbinds > 1) + if (autocvar_hud_showbinds > 1) return sprintf(_("%s (not bound)"), text); else return text; } - else if (hud_showbinds > 1) + else if (autocvar_hud_showbinds > 1) return sprintf(_("%s (%s)"), text, keys); else return keys;