Skip to content

Commit

Permalink
Revert "Fix UB after GL_RebuildLighting()."
Browse files Browse the repository at this point in the history
This reverts commit 0f26547.
  • Loading branch information
skullernet committed Dec 15, 2023
1 parent a3e8cb8 commit b8bc79d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/refresh/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -668,11 +668,6 @@ void R_RenderFrame(refdef_t *fd)

Q_assert(gl_static.world.cache || (fd->rdflags & RDF_NOWORLDMODEL));

if (lm.dirty) {
GL_RebuildLighting();
lm.dirty = false;
}

glr.drawframe++;
glr.rand_seed = fd->time * 20;

Expand All @@ -684,6 +679,11 @@ void R_RenderFrame(refdef_t *fd)
glr.fd.num_dlights = 0;
}

if (lm.dirty) {
GL_RebuildLighting();
lm.dirty = false;
}

bool waterwarp = (glr.fd.rdflags & RDF_UNDERWATER) && gl_static.use_shaders && gl_waterwarp->integer;

if (waterwarp) {
Expand Down

0 comments on commit b8bc79d

Please sign in to comment.