diff --git a/libs/video/renderer/r_light.c b/libs/video/renderer/r_light.c index 278710005..6875c8cbb 100644 --- a/libs/video/renderer/r_light.c +++ b/libs/video/renderer/r_light.c @@ -300,8 +300,6 @@ R_MarkLights (vec4f_t lightorigin, dlight_t *light, int lightnum, || leaf->mins[1] > maxs[1] || leaf->maxs[1] < mins[1] || leaf->mins[2] > maxs[2] || leaf->maxs[2] < mins[2]) continue; - if (R_CullBox (r_refdef.frustum, leaf->mins, leaf->maxs)) - continue; msurface_t **msurf = brush->marksurfaces + leaf->firstmarksurface; for (m = 0; m < leaf->nummarksurfaces; m++) { msurface_t *surf = *msurf++; @@ -321,8 +319,7 @@ R_PushDlights (const vec3_t entorigin) unsigned int i; dlight_t *l; - // because the count hasn't advanced yet for this frame - r_dlightframecount = r_framecount + 1; + r_dlightframecount = r_framecount; if (!r_dlight_lightmap) return; diff --git a/libs/video/renderer/r_screen.c b/libs/video/renderer/r_screen.c index e69fb3fe3..4ccefda0a 100644 --- a/libs/video/renderer/r_screen.c +++ b/libs/video/renderer/r_screen.c @@ -183,7 +183,6 @@ SCR_CalcRefdef (void) static void render_scene (void) { - r_framecount++; EntQueue_Clear (r_ent_queue); r_funcs->render_view (); r_funcs->draw_particles (&r_psystem); @@ -280,6 +279,7 @@ SCR_UpdateScreen (transform_t camera, double realtime, SCR_Func *scr_funcs) R_MarkLeaves (scr_scene->viewleaf, r_node_visframes, r_leaf_visframes, r_face_visframes); } + r_framecount++; R_PushDlights (vec3_origin); r_funcs->begin_frame ();