fix goto in bike.c

This commit is contained in:
Kurausukun 2021-05-09 00:09:28 -04:00 committed by huderlem
parent 7740ca1303
commit dbc1b9aacf

View file

@ -614,27 +614,24 @@ static void AcroBikeTransition_WheelieHoppingMoving(u8 direction)
return;
}
collision = GetBikeCollision(direction);
// TODO: Try to get rid of this goto
if (collision == 0 || collision == COLLISION_WHEELIE_HOP)
{
goto derp;
}
else if (collision == COLLISION_LEDGE_JUMP)
{
PlayerLedgeHoppingWheelie(direction);
}
else if (collision < COLLISION_STOP_SURFING || collision > COLLISION_ROTATING_GATE)
if (collision && collision != COLLISION_WHEELIE_HOP)
{
if (collision == COLLISION_LEDGE_JUMP)
{
PlayerLedgeHoppingWheelie(direction);
return;
}
if (collision >= COLLISION_STOP_SURFING && collision <= COLLISION_ROTATING_GATE)
{
return;
}
if (collision < COLLISION_VERTICAL_RAIL)
{
AcroBikeTransition_WheelieHoppingStanding(direction);
}
else
{
derp:
PlayerMovingHoppingWheelie(direction);
return;
}
}
PlayerMovingHoppingWheelie(direction);
}
static void AcroBikeTransition_SideJump(u8 direction)