From fed7fc4f0a6b871adef04c18411633e44a6ae1b0 Mon Sep 17 00:00:00 2001 From: pkmnsnfrn Date: Wed, 14 Aug 2024 21:35:03 -0700 Subject: [PATCH] Fixed bug with checkobjectat --- src/field_specials.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/field_specials.c b/src/field_specials.c index a99a21f6b7..38e4fa4fde 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -4301,15 +4301,16 @@ bool32 CheckObjectAtXY(void) for (i = 0; i < OBJECT_EVENTS_COUNT; i++) { if (!gObjectEvents[i].active) - return FALSE; + continue; if (gObjectEvents[i].currentCoords.x != x) - return FALSE; + continue; if (gObjectEvents[i].currentCoords.y != y) - return FALSE; + continue; + return TRUE; } - return TRUE; + return FALSE; } bool32 Script_GetSetPokedexFlag(void)