* Tweaks to CA_BOUNCE.

* Tweaks to drowning number placement for altered sizes.
This commit is contained in:
toasterbabe 2016-12-24 00:11:54 +00:00
parent f60233027d
commit 102f26182b
2 changed files with 7 additions and 8 deletions

View File

@ -4145,12 +4145,11 @@ static void P_PlayerMobjThinker(mobj_t *mobj)
if (mobj->state-states == S_PLAY_BOUNCE_LANDING)
{
angle_t dashangle = mobj->angle;
if (mobj->player->cmd.forwardmove || mobj->player->cmd.sidemove)
{
dashangle += R_PointToAngle2(0, 0, mobj->player->cmd.forwardmove<<FRACBITS, -mobj->player->cmd.sidemove<<FRACBITS);
}
P_InstaThrust(mobj, dashangle, mobj->player->speed);
P_InstaThrust(
mobj,
R_PointToAngle(mobj->x, mobj->y) + R_PointToAngle2(0, 0, mobj->player->cmd.forwardmove<<FRACBITS, -mobj->player->cmd.sidemove<<FRACBITS),
mobj->player->speed);
goto animonly; // no need for checkposition - doesn't move at ALL
}

View File

@ -2111,8 +2111,8 @@ static void P_CheckUnderwaterAndSpaceTimer(player_t *player)
|| (timeleft == 1*TICRATE + 1) // 0
) {
fixed_t height = (player->mo->eflags & MFE_VERTICALFLIP)
? player->mo->z - FixedMul(8*FRACUNIT - mobjinfo[MT_DROWNNUMBERS].height, player->mo->scale)
: player->mo->z + player->mo->height + FixedMul(8*FRACUNIT, player->mo->scale);
? player->mo->z - FixedMul(8*FRACUNIT + mobjinfo[MT_DROWNNUMBERS].height, FixedMul(player->mo->scale, player->shieldscale))
: player->mo->z + player->mo->height + FixedMul(8*FRACUNIT, FixedMul(player->mo->scale, player->shieldscale));
mobj_t *numbermobj = P_SpawnMobj(player->mo->x, player->mo->y, height, MT_DROWNNUMBERS);
@ -6787,7 +6787,7 @@ static void P_MovePlayer(player_t *player)
// Bouncing...
if (player->pflags & PF_BOUNCING)
{
if (!(player->pflags & PF_JUMPDOWN) || onground) // If not holding the jump button
if (!(player->pflags & PF_JUMPDOWN) || (onground && P_MobjFlip(player->mo)*player->mo->momz <= 0)) // If not holding the jump button OR on flat ground
{
P_ResetPlayer(player); // down, stop bouncing.
if (onground)