Fix headup hole lookup (#267) (#268)

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 <contact@artur-rojek.eu>
This commit is contained in:
Artur Rojek 2022-12-11 23:44:38 +01:00 committed by GitHub
parent f4eb9a8607
commit 1531f4a9d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 1 deletions

View File

@ -618,7 +618,6 @@ int FindAHeadupHoleWoofBarkSoundsABitRude(int pSlot_index) {
}
if (the_headup->type == eHeadup_unused) {
empty_one = i;
break;
}
}
return empty_one;