summaryrefslogtreecommitdiff
path: root/src/item_use.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/item_use.c')
-rwxr-xr-xsrc/item_use.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/item_use.c b/src/item_use.c
index 29ceb7cae..c9a7fe1c7 100755
--- a/src/item_use.c
+++ b/src/item_use.c
@@ -725,11 +725,11 @@ static void ItemUseOnFieldCB_WailmerPailBerry(u8 taskId)
static bool8 TryToWaterSudowoodo(void)
{
u16 x, y;
- u8 z;
+ u8 elevation;
u8 objId;
GetXYCoordsOneStepInFrontOfPlayer(&x, &y);
- z = PlayerGetZCoord();
- objId = GetObjectEventIdByXYZ(x, y, z);
+ elevation = PlayerGetElevation();
+ objId = GetObjectEventIdByPosition(x, y, elevation);
if (objId == OBJECT_EVENTS_COUNT || gObjectEvents[objId].graphicsId != OBJ_EVENT_GFX_SUDOWOODO)
return FALSE;
else