From 56c91eba230c69d7a41ba4c0fb4a4066b5df90fa Mon Sep 17 00:00:00 2001 From: Alug Date: Tue, 26 Nov 2024 15:06:16 +0100 Subject: [PATCH] fix early return in comparePolygons thx durr very cool! --- src/hardware/hw_batching.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hardware/hw_batching.c b/src/hardware/hw_batching.c index 80798b30e..a61388bfa 100644 --- a/src/hardware/hw_batching.c +++ b/src/hardware/hw_batching.c @@ -180,9 +180,9 @@ static int comparePolygons(const void *p1, const void *p2) diff = poly1->surf.LightInfo.fade_start - poly2->surf.LightInfo.fade_start; if (diff != 0) return diff; diff = poly1->surf.LightInfo.fade_end - poly2->surf.LightInfo.fade_end; + if (diff != 0) return diff; diff = poly1->surf.LightInfo.directional - poly2->surf.LightInfo.directional; - if (diff != 0) return diff; return diff; }