From 26ab42af5d43c641237a59ca12c97143c5fb571b Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Tue, 11 Jul 2023 21:53:35 +0100 Subject: Better order --- src/entities.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/entities.c b/src/entities.c index a1aa9db..321af98 100644 --- a/src/entities.c +++ b/src/entities.c @@ -83,9 +83,9 @@ void entities_sort() { uint8_t j = i; while (j > 0 && ( - sort[j - 1]->y > sort[j]->y - || ((sort[j - 1]->y >> 4) == (sort[j]->y >> 4) - && sort[j - 1]->used > sort[j]->used) + ((sort[j - 1]->y >> 4) == (sort[j]->y >> 4) + && sort[j - 1]->used > sort[j]->used) + || sort[j - 1]->y > sort[j]->y )) { t = sort[j]; -- cgit v1.2.3