From: terencehill Date: Wed, 29 Jan 2025 18:40:34 +0000 (+0100) Subject: Menu: get rid of the lag when opening Settings/Game(/Crosshair) X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b6f6b76489b108519fb742e15da676a6c256dd7b;p=xonotic%2Fxonotic-data.pk3dir.git Menu: get rid of the lag when opening Settings/Game(/Crosshair) --- diff --git a/qcsrc/menu/xonotic/crosshairpicker.qc b/qcsrc/menu/xonotic/crosshairpicker.qc index 318141259..156dc71aa 100644 --- a/qcsrc/menu/xonotic/crosshairpicker.qc +++ b/qcsrc/menu/xonotic/crosshairpicker.qc @@ -25,6 +25,10 @@ entity makeXonoticCrosshairPicker() void XonoticCrosshairPicker_configureXonoticCrosshairPicker(entity me) { + int crosshair_count = me.columns * me.rows; + for (int i = 0; i < crosshair_count; ++i) + draw_PreloadPicture(strcat("/gfx/crosshair", ftos(31 + i))); + me.configureXonoticPicker(me); SUPER(XonoticCrosshairPicker).cellSelect(me, crosshairpicker_crosshairToCell(me, cvar_string("crosshair"))); }