From 4a217709ca8760158bbb7334b75aac4d9deeb5c9 Mon Sep 17 00:00:00 2001 From: Artur Rojek Date: Sat, 10 Dec 2022 15:17:58 +0100 Subject: [PATCH] Fix headup hole lookup (#267) When searching for a particular headup slot, don't return on the first empty hole, but rather try to find if the matching slot is in use. This resolves a bug where two headups of the same type could end up displayed on top of each other. Signed-off-by: Artur Rojek --- src/DETHRACE/common/displays.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/DETHRACE/common/displays.c b/src/DETHRACE/common/displays.c index 8df5d241..e261630c 100644 --- a/src/DETHRACE/common/displays.c +++ b/src/DETHRACE/common/displays.c @@ -618,7 +618,6 @@ int FindAHeadupHoleWoofBarkSoundsABitRude(int pSlot_index) { } if (the_headup->type == eHeadup_unused) { empty_one = i; - break; } } return empty_one;