From c72d0c1b39c324d6227a474f1c5311df6d7570c8 Mon Sep 17 00:00:00 2001 From: Yamagi Date: Mon, 29 Jul 2024 19:18:48 +0200 Subject: [PATCH 1/2] Add back linker options somehow lost in 8cedbb0. Closes #1129, fixed by @ArminiusTux. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 72377b13..5e16f05e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -748,7 +748,7 @@ set_target_properties(q2ded PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/release ) if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") - target_link_libraries(q2ded ${yquake2LinkerFlags}) + target_link_libraries(q2ded ${yquake2LinkerFlags} ${yquake2ZLibLinkerFlags} ws2_32 winmm) else() target_link_libraries(q2ded ${yquake2LinkerFlags} ${yquake2ServerLinkerFlags} ${yquake2ZLibLinkerFlags}) endif() From 1df86ae16dbefc921671b39d0d3cdd8339f2d4b2 Mon Sep 17 00:00:00 2001 From: Jaime Moreira Date: Wed, 31 Jul 2024 12:13:32 -0400 Subject: [PATCH 2/2] lightmapchain cleared of surfaces added twice --- src/client/refresh/gl1/gl1_surf.c | 5 +++-- src/client/refresh/gl1/header/model.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/client/refresh/gl1/gl1_surf.c b/src/client/refresh/gl1/gl1_surf.c index 25050188..6b6c0ffd 100644 --- a/src/client/refresh/gl1/gl1_surf.c +++ b/src/client/refresh/gl1/gl1_surf.c @@ -1143,9 +1143,9 @@ R_GetBrushesLighting(void) for (k = 0; k < currentmodel->nummodelsurfaces; k++, surf++) { if (surf->texinfo->flags & (SURF_TRANS33 | SURF_TRANS66 | SURF_WARP) - || surf->flags & SURF_DRAWTURB) + || surf->flags & SURF_DRAWTURB || surf->lmchain_frame == r_framecount) { - continue; + continue; // either not affected by light, or already in the chain } // find which side of the node we are on @@ -1155,6 +1155,7 @@ R_GetBrushesLighting(void) if (((surf->flags & SURF_PLANEBACK) && (dot < -BACKFACE_EPSILON)) || (!(surf->flags & SURF_PLANEBACK) && (dot > BACKFACE_EPSILON))) { + surf->lmchain_frame = r_framecount; // don't add this twice to the chain surf->lightmapchain = gl_lms.lightmap_surfaces[surf->lightmaptexturenum]; gl_lms.lightmap_surfaces[surf->lightmaptexturenum] = surf; } diff --git a/src/client/refresh/gl1/header/model.h b/src/client/refresh/gl1/header/model.h index 2eda331d..43b296ec 100644 --- a/src/client/refresh/gl1/header/model.h +++ b/src/client/refresh/gl1/header/model.h @@ -59,6 +59,7 @@ typedef struct msurface_s glpoly_t *polys; /* multiple if warped */ struct msurface_s *texturechain; struct msurface_s *lightmapchain; + int lmchain_frame; // avoids adding this surface twice to the lightmap chain mtexinfo_t *texinfo;