fix goto in bike.c
This commit is contained in:
parent
7740ca1303
commit
dbc1b9aacf
1 changed files with 12 additions and 15 deletions
27
src/bike.c
27
src/bike.c
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue