From dfc6ffe2baf9e7570c0650b16c3e06e58967b4ea Mon Sep 17 00:00:00 2001 From: Alug Date: Mon, 9 Sep 2024 21:50:24 +0200 Subject: [PATCH] fix off by one in sprite lightlevels --- src/hardware/hw_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 95c8942c7..b5f60b717 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -3846,7 +3846,7 @@ static void HWR_SplitSprite(gr_vissprite_t *spr) if (!(list[i].flags & FF_NOSHADE) && (list[i].flags & FF_CUTSPRITES)) { if (!(spr->mobj->frame & FF_FULLBRIGHT)) - lightlevel = min(*list[i-1].lightlevel, 255); + lightlevel = min(*list[i].lightlevel, 255); colormap = list[i].extra_colormap; }