1
0
Fork 0
forked from fte/fteqw

getlightstylergb: fix lightstyle check, fixing it returning the same light value

This commit is contained in:
Marco Cawthorne 2024-11-20 14:19:00 -08:00
parent 5a98bf1ef0
commit fee8027e2c

View file

@ -4839,7 +4839,7 @@ static void QCBUILTIN PF_getlightstylergb (pubprogfuncs_t *prinst, struct global
return;
}
if (stnum < cl_max_lightstyles || !cl_lightstyle[stnum].length)
if (stnum >= cl_max_lightstyles || !cl_lightstyle[stnum].length)
value = ('m'-'a')*22 * r_lightstylescale.value;
else if (cl_lightstyle[stnum].map[0] == '=')
value = atof(cl_lightstyle[stnum].map+1)*256*r_lightstylescale.value;