Bound r_maxdlights properly.

QF's implementation doesn't support more than 32 dlights (32 bit int).
This commit is contained in:
Bill Currie 2012-07-03 15:27:48 +09:00
parent eefefb79b0
commit e58cd75660

View file

@ -106,7 +106,7 @@ R_FindNearLights (const vec3_t pos, int count, dlight_t **lights)
void
R_MaxDlightsCheck (cvar_t *var)
{
r_maxdlights = max(var->int_val, 0);
r_maxdlights = bound (0, var->int_val, 32);
if (r_dlights)
free (r_dlights);