X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=r_crosshairs.c;h=83a45ecb74717ee2e92009de48a17a824111810a;hb=44bac8b331b5e48f29a18759496abaa27a52566c;hp=46585f980edbc0adcf6e9d46e24bd3f47cfba121;hpb=c2995f2c4c030b1c3adb163fd84b4ea5b3d2b104;p=xonotic%2Fdarkplaces.git diff --git a/r_crosshairs.c b/r_crosshairs.c index 46585f98..83a45ecb 100644 --- a/r_crosshairs.c +++ b/r_crosshairs.c @@ -21,13 +21,13 @@ void R_Crosshairs_Init(void) void DrawCrosshair(int num) { int i; - byte *color; + qbyte *color; float scale, base; char *picname; cachepic_t *pic; if (num < 0 || num >= NUMCROSSHAIRS) num = 0; - if (cl.viewentity) + if (cl.viewentity >= 1 && cl.viewentity <= cl.maxclients) { i = (cl.scores[cl.viewentity-1].colors & 0xF) << 4; if (i >= 208 && i < 224) // blue @@ -37,7 +37,7 @@ void DrawCrosshair(int num) } else i = 15; - color = (byte *) &d_8to24table[i]; + color = (qbyte *) &d_8to24table[i]; if (crosshair_flashspeed.value >= 0.01f) base = (sin(realtime * crosshair_flashspeed.value * (M_PI*2.0f)) * crosshair_flashrange.value); else