From: Rudolf Polzer Date: Thu, 5 Feb 2015 06:39:14 +0000 (+0100) Subject: Try to precache the crosshairs with mipmapping enabled. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4213c0fa6afbd4e062c47608aac84256e621d1fd;p=xonotic%2Fxonotic-data.pk3dir.git Try to precache the crosshairs with mipmapping enabled. --- diff --git a/qcsrc/client/main.qc b/qcsrc/client/main.qc index 13f9545fa..7b34ce14a 100644 --- a/qcsrc/client/main.qc +++ b/qcsrc/client/main.qc @@ -52,6 +52,7 @@ void menu_sub_null() string forcefog; void WaypointSprite_Load(); void ConsoleCommand_macro_init(); +void View_Precache(); void CSQC_Init(void) { prvm_language = cvar_string("prvm_language"); @@ -122,6 +123,7 @@ void CSQC_Init(void) precache_sound("misc/hit.wav"); precache_sound("misc/typehit.wav"); + View_Precache(); Projectile_Precache(); Hook_Precache(); GibSplash_Precache(); diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index ee8ef320a..681fed7a9 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -609,8 +609,10 @@ void UpdateCrosshair() } } - if(wcross_name == "") + if(wcross_name == "") { wcross_name = strcat("gfx/crosshair", wcross_style); + precache_pic(wcross_name, PRECACHE_PIC_MIPMAP); + } // MAIN CROSSHAIR COLOR DECISION switch(autocvar_crosshair_color_special) @@ -1796,6 +1798,12 @@ void CSQC_UpdateView(float w, float h) setproperty(VF_SIZE, '1 0 0' * w + '0 1 0' * h); } +void View_Precache(void) { + precache_pic("gfx/crosshair_ring.tga", PRECACHE_PIC_MIPMAP); + precache_pic("gfx/crosshair_ring_inner.tga", PRECACHE_PIC_MIPMAP); + precache_pic("gfx/crosshair_ring_rifle.tga", PRECACHE_PIC_MIPMAP); + precache_pic("gfx/crosshairdot.tga", PRECACHE_PIC_MIPMAP); +} void CSQC_common_hud(void) {