From 116407f68ab42bf34016edec4cd057c4acd2c536 Mon Sep 17 00:00:00 2001 From: NepDisk Date: Sat, 29 Nov 2025 16:49:34 -0500 Subject: [PATCH] HWR_Subsector: avoid calling HWR_AddSprites on already processed sectors https://github.com/Indev450/SRB2Kart-Saturn/commit/7cf3bceaff748f9ce19853281b6348b87ea594fa --- src/hardware/hw_main.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index adf9cc13f..92dc9ad36 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -2855,9 +2855,12 @@ static void HWR_Subsector(size_t num) // hurdler: faux: on ajoute seulement les sprites, le murs sont trac� d'abord if (line) { - // draw sprites first, coz they are clipped to the solidsegs of - // subsectors more 'in front' - HWR_AddSprites(gl_frontsector); + if (sub->sector->validcount != validcount) + { + // draw sprites first, coz they are clipped to the solidsegs of + // subsectors more 'in front' + HWR_AddSprites(gl_frontsector); + } //Hurdler: at this point validcount must be the same, but is not because // gl_frontsector doesn't point anymore to sub->sector due to