diff --git a/cstrike/src/client/crosshair.qc b/cstrike/src/client/crosshair.qc index 6976f451..5b8aad92 100644 --- a/cstrike/src/client/crosshair.qc +++ b/cstrike/src/client/crosshair.qc @@ -76,7 +76,7 @@ Cstrike_DrawSimpleCrosshair(void) { static vector cross_pos; cross_pos = g_hudmins + (g_hudres / 2) + [-12,-12]; - drawsubpic(cross_pos, [24,24], "sprites/crosshairs.spr_0.tga", [0.1875,0], [0.1875, 0.1875], [1,1,1], 1, DRAWFLAG_NORMAL); + drawsubpic(cross_pos, [24,24], g_cs_cross, [0.1875,0], [0.1875, 0.1875], [1,1,1], 1, DRAWFLAG_NORMAL); } /* @@ -99,21 +99,21 @@ Cstrike_DrawScope(void) // Draw the scope in the middle, seperately from the border scope_pos = g_hudmins + (g_hudres / 2) + [-128,-128]; - drawpic(scope_pos, "sprites/sniper_scope.spr_0.tga", [256,256], [1,1,1], 1.0f, DRAWFLAG_NORMAL); + drawpic(scope_pos, g_cs_scope0, [256,256], [1,1,1], 1.0f, DRAWFLAG_NORMAL); // Border scale to fit the screen scope_scale = g_hudres[1] / 480; scope_offset = g_hudmins[0] + (g_hudres[0] / 2) - ((640 * scope_scale) / 2); // Type 1 Border... more coming soon? - Cstrike_ScopePic([0,0], [192,112], "sprites/top_left.spr_0.tga"); - Cstrike_ScopePic([192,0], [256,112], "sprites/top.spr_0.tga"); - Cstrike_ScopePic([448,0], [192,112], "sprites/top_right.spr_0.tga"); - Cstrike_ScopePic([0,112], [192,256], "sprites/left.spr_0.tga"); - Cstrike_ScopePic([448,112], [192,256], "sprites/right.spr_0.tga"); - Cstrike_ScopePic([0,368], [192,112], "sprites/bottom_left.spr_0.tga"); - Cstrike_ScopePic([192,368], [256,112], "sprites/bottom.spr_0.tga"); - Cstrike_ScopePic([448,368], [192,112], "sprites/bottom_right.spr_0.tga"); + Cstrike_ScopePic([0,0], [192,112], g_cs_scope1); + Cstrike_ScopePic([192,0], [256,112], g_cs_scope2); + Cstrike_ScopePic([448,0], [192,112], g_cs_scope3); + Cstrike_ScopePic([0,112], [192,256], g_cs_scope4); + Cstrike_ScopePic([448,112], [192,256], g_cs_scope5); + Cstrike_ScopePic([0,368], [192,112], g_cs_scope6); + Cstrike_ScopePic([192,368], [256,112], g_cs_scope7); + Cstrike_ScopePic([448,368], [192,112], g_cs_scope8); // Rect borders left and right if (scope_offset > 0) { diff --git a/cstrike/src/client/defs.h b/cstrike/src/client/defs.h index 7ad8eb7d..417f65ca 100644 --- a/cstrike/src/client/defs.h +++ b/cstrike/src/client/defs.h @@ -39,6 +39,17 @@ var string g_hud14_spr; var string g_hud15_spr; var string g_hud16_spr; +var string g_cs_cross; +var string g_cs_scope0; +var string g_cs_scope1; +var string g_cs_scope2; +var string g_cs_scope3; +var string g_cs_scope4; +var string g_cs_scope5; +var string g_cs_scope6; +var string g_cs_scope7; +var string g_cs_scope8; + struct { /* viewmodel stuff */ diff --git a/cstrike/src/client/init.qc b/cstrike/src/client/init.qc index 1f41dd15..ffae36c2 100644 --- a/cstrike/src/client/init.qc +++ b/cstrike/src/client/init.qc @@ -118,6 +118,17 @@ Client_InitDone(void) void Game_RendererRestarted(string rstr) { + g_cs_cross = spriteframe("sprites/crosshairs.spr", 0, 0.0f); + g_cs_scope0 = spriteframe("sprites/sniper_scope.spr", 0, 0.0f); + g_cs_scope1 = spriteframe("sprites/top_left.spr", 0, 0.0f); + g_cs_scope2 = spriteframe("sprites/top.spr", 0, 0.0f); + g_cs_scope3 = spriteframe("sprites/top_right.spr", 0, 0.0f); + g_cs_scope4 = spriteframe("sprites/left.spr", 0, 0.0f); + g_cs_scope5 = spriteframe("sprites/right.spr", 0, 0.0f); + g_cs_scope6 = spriteframe("sprites/bottom_left.spr", 0, 0.0f); + g_cs_scope7 = spriteframe("sprites/bottom.spr", 0, 0.0f); + g_cs_scope8 = spriteframe("sprites/bottom_right.spr", 0, 0.0f); + Obituary_Precache(); FX_Blood_Init();