]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix crosshair 6, and allow custom crosshairs up to 32
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 14 Mar 2006 04:39:14 +0000 (04:39 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 14 Mar 2006 04:39:14 +0000 (04:39 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6112 d7cf8633-e32d-0410-b094-e92efae38249

client.h
gl_draw.c
r_shadow.c

index cb36d4d4aa3564a817b7f15e40a70df4e874f676..5268128ca52d57475aee6f2a928c267b3db7c588 100644 (file)
--- a/client.h
+++ b/client.h
@@ -1015,8 +1015,8 @@ void R_NewExplosion(vec3_t org);
 
 #include "cl_screen.h"
 
-#define NUMCROSSHAIRS 6
-extern cachepic_t *r_crosshairs[NUMCROSSHAIRS];
+#define NUMCROSSHAIRS 32
+extern cachepic_t *r_crosshairs[NUMCROSSHAIRS+1];
 
 typedef struct refdef_s
 {
index f618099724e9c68bfe6df50a66c8e1765254ef13..79d5adc4faacb9b5cfcea60685876ee49588c647 100644 (file)
--- a/gl_draw.c
+++ b/gl_draw.c
@@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 
 static rtexture_t *char_texture;
-cachepic_t *r_crosshairs[NUMCROSSHAIRS];
+cachepic_t *r_crosshairs[NUMCROSSHAIRS+1];
 
 //=============================================================================
 /* Support Routines */
@@ -468,7 +468,7 @@ static void gl_draw_start(void)
        memset(cachepichash, 0, sizeof(cachepichash));
 
        char_texture = Draw_CachePic("gfx/conchars", true)->tex;
-       for (i = 0;i < NUMCROSSHAIRS;i++)
+       for (i = 1;i <= NUMCROSSHAIRS;i++)
                r_crosshairs[i] = Draw_CachePic(va("gfx/crosshair%i", i), false);
 }
 
index 2f4a68e91b2567666402df352f9e37ee13e809a3..af19c935317860b9adaf30dc5a978383cded1ce8 100644 (file)
@@ -3306,7 +3306,7 @@ void R_Shadow_DrawLightSprites(void)
        dlight_t *light;
 
        for (i = 0, light = r_shadow_worldlightchain;light;i++, light = light->next)
-               R_MeshQueue_AddTransparent(light->origin, R_Shadow_DrawLightSprite_TransparentCallback, (entity_render_t *)light, i % NUMCROSSHAIRS, &light->rtlight);
+               R_MeshQueue_AddTransparent(light->origin, R_Shadow_DrawLightSprite_TransparentCallback, (entity_render_t *)light, 1+(i % 5), &light->rtlight);
        R_MeshQueue_AddTransparent(r_editlights_cursorlocation, R_Shadow_DrawCursor_TransparentCallback, NULL, 0, NULL);
 }