ensure the new flag is cleared properly

This commit is contained in:
katsy 2020-12-05 23:17:01 -05:00
parent 8541409329
commit 3dbb44e7b1

View file

@ -1085,6 +1085,9 @@ void P_ResetPlayer(player_t *player)
player->powers[pw_carry] = CR_NONE;
}
if (player->powers[pw_carry] == CR_MACESPIN || player->powers[pw_carry] == CR_GENERIC)
player->mo->flags &= ~MF_NOCLIPHEIGHT;
if (!(player->powers[pw_carry] == CR_NIGHTSMODE || player->powers[pw_carry] == CR_NIGHTSFALL || player->powers[pw_carry] == CR_BRAKGOOP || player->powers[pw_carry] == CR_MINECART))
player->powers[pw_carry] = CR_NONE;
@ -4426,6 +4429,8 @@ void P_DoJump(player_t *player, boolean soundandstate)
if (!(player->mo->tracer->flags & MF_MISSILE)) // Missiles remember their owner!
P_SetTarget(&player->mo->tracer->target, NULL);
P_SetTarget(&player->mo->tracer, NULL);
player->mo->flags &= ~MF_NOCLIPHEIGHT;
}
else if (player->powers[pw_carry] == CR_ROPEHANG)
{
@ -5257,6 +5262,7 @@ static void P_DoJumpStuff(player_t *player, ticcmd_t *cmd)
player->powers[pw_carry] = CR_NONE;
P_SetTarget(&player->mo->tracer, NULL);
player->powers[pw_flashing] = TICRATE/4;
player->mo->flags &= ~MF_NOCLIPHEIGHT;
}
// can't jump while in air, can't jump while jumping
else if (onground || player->climbing || player->powers[pw_carry])