- Exhumed: Tidy up a long ternary in updatePlayerAction().

This commit is contained in:
Mitchell Richters 2023-04-18 22:17:59 +10:00
parent 258ab0db89
commit f9b9345e01

View file

@ -1273,9 +1273,17 @@ static void updatePlayerAction(Player* const pPlayer, const bool bUnderwater)
{
nextAction = 7 - (pPlayer->totalvel < 1);
}
else if (pPlayer->totalvel <= 1)
{
nextAction = bUnderwater;
}
else if (pPlayer->totalvel <= 30)
{
nextAction = 2;
}
else
{
nextAction = (pPlayer->totalvel <= 1) ? bUnderwater : (pPlayer->totalvel <= 30) ? 2 : 1;
nextAction = 1;
}
}