From 7b321c78c2b212bdddc69851ff9623c5e53e4cb5 Mon Sep 17 00:00:00 2001 From: Tony Jih Date: Tue, 26 Dec 2023 14:51:41 +0800 Subject: [PATCH 1/2] True match Object70_Action1 --- src/object/object70.c | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/src/object/object70.c b/src/object/object70.c index 8cc5a5768..f89798600 100644 --- a/src/object/object70.c +++ b/src/object/object70.c @@ -35,23 +35,19 @@ void Object70_Init(Entity* this) { } void Object70_Action1(Entity* this) { - u8 bVar1; if (this->type == 0) { - if (gPlayerEntity.z.WORD == 0) { - if ((((gPlayerState.dash_state & 0x40) == 0) && (gPlayerState.floor_type == SURFACE_SWAMP)) && - ((gPlayerEntity.action == PLAYER_NORMAL || - ((gPlayerEntity.action == PLAYER_ROLL || (gPlayerEntity.action == PLAYER_JUMP)))))) { - goto _080974FA; - } else { - if (gPlayerEntity.z.WORD == 0) { - CreateFx(&gPlayerEntity, FX_GREEN_SPLASH, 0); - } + if (gPlayerEntity.z.WORD != 0 || (gPlayerState.dash_state & 0x40) != 0 || + gPlayerState.floor_type != SURFACE_SWAMP || + (gPlayerEntity.action != PLAYER_NORMAL && gPlayerEntity.action != PLAYER_ROLL && + gPlayerEntity.action != PLAYER_JUMP)) { + if (gPlayerEntity.z.WORD == 0) { + CreateFx(&gPlayerEntity, FX_GREEN_SPLASH, 0); } + + gPlayerEntity.spriteOrientation.flipY = 2; + DeleteThisEntity(); } - gPlayerEntity.spriteOrientation.flipY = 2; - DeleteThisEntity(); - _080974FA: this->x = gPlayerEntity.x; this->y = gPlayerEntity.y; if (gPlayerState.jump_status == 0) { @@ -62,15 +58,16 @@ void Object70_Action1(Entity* this) { this->spritePriority.b0 = 7; } } + return; + } - } else { - if (gPlayerEntity.action != PLAYER_USEENTRANCE) { - if (this->collisionLayer == 1) { - gPlayerEntity.spriteOrientation.flipY = 2; - } else { - gPlayerEntity.spriteOrientation.flipY = 1; - } - DeleteThisEntity(); + if (gPlayerEntity.action != PLAYER_USEENTRANCE) { + if (this->collisionLayer == 1) { + gPlayerEntity.spriteOrientation.flipY = 2; + } else { + gPlayerEntity.spriteOrientation.flipY = 1; } + DeleteThisEntity(); } } + From 8a88b7fd33527cd523adbc2afcf5ad2a92b61db3 Mon Sep 17 00:00:00 2001 From: Theo <65437533+notyourav@users.noreply.github.com> Date: Tue, 26 Dec 2023 13:49:48 -0800 Subject: [PATCH 2/2] Fix lint issue --- src/object/object70.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/object/object70.c b/src/object/object70.c index f89798600..efe827431 100644 --- a/src/object/object70.c +++ b/src/object/object70.c @@ -70,4 +70,3 @@ void Object70_Action1(Entity* this) { DeleteThisEntity(); } } -