Slow climbing down underwater

This commit is contained in:
lachwright 2019-10-28 22:21:20 +08:00
parent b93c2467e7
commit 46ba988541

View file

@ -5979,8 +5979,13 @@ static void P_3dMovement(player_t *player)
if (player->climbing)
{
if (cmd->forwardmove)
{
if (player->mo->eflags & MFE_UNDERWATER)
P_SetObjectMomZ(player->mo, FixedDiv(cmd->forwardmove*FRACUNIT, 10*FRACUNIT), false);
else
P_SetObjectMomZ(player->mo, FixedDiv(cmd->forwardmove*FRACUNIT, 15*FRACUNIT>>1), false);
}
}
else if (!analogmove
&& cmd->forwardmove != 0 && !(player->pflags & PF_GLIDING || player->exiting
|| (P_PlayerInPain(player) && !onground)))
@ -6013,7 +6018,12 @@ static void P_3dMovement(player_t *player)
}
// Sideways movement
if (player->climbing)
{
if (player->mo->eflags & MFE_UNDERWATER)
P_InstaThrust(player->mo, player->mo->angle-ANGLE_90, FixedDiv(cmd->sidemove*player->mo->scale, 10*FRACUNIT));
else
P_InstaThrust(player->mo, player->mo->angle-ANGLE_90, FixedDiv(cmd->sidemove*player->mo->scale, 15*FRACUNIT>>1));
}
// Analog movement control
else if (analogmove)
{