Skip to content

Commit 7b321c7

Browse files
committed
True match Object70_Action1
1 parent bd44f07 commit 7b321c7

File tree

1 file changed

+18
-21
lines changed

1 file changed

+18
-21
lines changed

src/object/object70.c

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -35,23 +35,19 @@ void Object70_Init(Entity* this) {
3535
}
3636

3737
void Object70_Action1(Entity* this) {
38-
u8 bVar1;
3938

4039
if (this->type == 0) {
41-
if (gPlayerEntity.z.WORD == 0) {
42-
if ((((gPlayerState.dash_state & 0x40) == 0) && (gPlayerState.floor_type == SURFACE_SWAMP)) &&
43-
((gPlayerEntity.action == PLAYER_NORMAL ||
44-
((gPlayerEntity.action == PLAYER_ROLL || (gPlayerEntity.action == PLAYER_JUMP)))))) {
45-
goto _080974FA;
46-
} else {
47-
if (gPlayerEntity.z.WORD == 0) {
48-
CreateFx(&gPlayerEntity, FX_GREEN_SPLASH, 0);
49-
}
40+
if (gPlayerEntity.z.WORD != 0 || (gPlayerState.dash_state & 0x40) != 0 ||
41+
gPlayerState.floor_type != SURFACE_SWAMP ||
42+
(gPlayerEntity.action != PLAYER_NORMAL && gPlayerEntity.action != PLAYER_ROLL &&
43+
gPlayerEntity.action != PLAYER_JUMP)) {
44+
if (gPlayerEntity.z.WORD == 0) {
45+
CreateFx(&gPlayerEntity, FX_GREEN_SPLASH, 0);
5046
}
47+
48+
gPlayerEntity.spriteOrientation.flipY = 2;
49+
DeleteThisEntity();
5150
}
52-
gPlayerEntity.spriteOrientation.flipY = 2;
53-
DeleteThisEntity();
54-
_080974FA:
5551
this->x = gPlayerEntity.x;
5652
this->y = gPlayerEntity.y;
5753
if (gPlayerState.jump_status == 0) {
@@ -62,15 +58,16 @@ void Object70_Action1(Entity* this) {
6258
this->spritePriority.b0 = 7;
6359
}
6460
}
61+
return;
62+
}
6563

66-
} else {
67-
if (gPlayerEntity.action != PLAYER_USEENTRANCE) {
68-
if (this->collisionLayer == 1) {
69-
gPlayerEntity.spriteOrientation.flipY = 2;
70-
} else {
71-
gPlayerEntity.spriteOrientation.flipY = 1;
72-
}
73-
DeleteThisEntity();
64+
if (gPlayerEntity.action != PLAYER_USEENTRANCE) {
65+
if (this->collisionLayer == 1) {
66+
gPlayerEntity.spriteOrientation.flipY = 2;
67+
} else {
68+
gPlayerEntity.spriteOrientation.flipY = 1;
7469
}
70+
DeleteThisEntity();
7571
}
7672
}
73+

0 commit comments

Comments
 (0)