]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
precache gfx/reticle_* only in CSQC_Init as there's no gain doing it at every frame
authorterencehill <piuntn@gmail.com>
Sat, 19 Mar 2011 23:36:48 +0000 (00:36 +0100)
committerterencehill <piuntn@gmail.com>
Sat, 19 Mar 2011 23:44:59 +0000 (00:44 +0100)
qcsrc/client/Main.qc
qcsrc/client/View.qc

index bec75c2ee06f920b989780955c77211ccf9bc231..91ce464793bcbc0f33879a90222c2934165fdb3a 100644 (file)
@@ -151,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;
index edfdb14298ebc131e102a1fcfcad27dbba9df10e..eeccc2bf18c0fd12c751f826e67cef2392520a71 100644 (file)
@@ -664,13 +664,11 @@ void CSQC_UpdateView(float w, float h)
                f = 1;
        if(autocvar_cl_reticle_item_normal)
        {
-               precache_pic("gfx/reticle_normal");
                if(reticle_type == 1 && f)
                        drawpic(reticle_pos, "gfx/reticle_normal", reticle_size, '1 1 1', f * autocvar_cl_reticle_item_normal, DRAWFLAG_NORMAL);
        }
        if(autocvar_cl_reticle_item_nex)
        {
-               precache_pic("gfx/reticle_nex");
                if(reticle_type == 2 && f)
                        drawpic(reticle_pos, "gfx/reticle_nex", reticle_size, '1 1 1', f * autocvar_cl_reticle_item_nex, DRAWFLAG_NORMAL);
        }