minor branching fix in FuncPlayer

This commit is contained in:
nukeykt 2019-12-03 09:23:09 +09:00 committed by Christoph Oelckers
parent 426570729e
commit 099a995495

View file

@ -2946,12 +2946,11 @@ do_default_b:
} }
else else
{ {
int nEyeLevel = eyelevel[nPlayer]; if (eyelevel[nPlayer] < -8320) {
eyelevel[nPlayer] += ((-8320 - eyelevel[nPlayer]) >> 1);
if (nEyeLevel < -8320) {
eyelevel[nPlayer] = ((-8320 - nEyeLevel) >> 1) + nEyeLevel;
} }
loc_1BD2E:
if (totalvel[nPlayer] < 1) { if (totalvel[nPlayer] < 1) {
nActionB = 6; nActionB = 6;
} }
@ -2981,13 +2980,7 @@ do_default_b:
// CHECKME - confirm branching in this area is OK // CHECKME - confirm branching in this area is OK
if (var_48) if (var_48)
{ {
// loc_1BD2E: goto loc_1BD2E;
if (totalvel[nPlayer] < 1) {
nActionB = 6;
}
else {
nActionB = 7;
}
} }
else else
{ {
@ -3003,38 +2996,19 @@ do_default_b:
} }
} }
} }
// loc_1BE30
if (buttons & kButtonFire) // was var_38
{
if (bUnderwater)
{
nActionB = 11;
}
else
{
if (nActionB != 2 && nActionB != 1)
{
nActionB = 5;
}
}
}
} }
else // player's health is 0 // loc_1BE30
if (buttons & kButtonFire) // was var_38
{ {
// loc_1BE30 if (bUnderwater)
if (buttons & kButtonFire) // was var_38
{ {
if (bUnderwater) nActionB = 11;
}
else
{
if (nActionB != 2 && nActionB != 1)
{ {
nActionB = 11; nActionB = 5;
}
else
{
if (nActionB != 2 && nActionB != 1)
{
nActionB = 5;
}
} }
} }
} }