Fixed a bug involving players being thrown out of minecarts

This commit is contained in:
MascaraSnake 2019-06-16 16:39:06 +02:00
parent b6790c7f35
commit 622a44f551
2 changed files with 1 additions and 4 deletions

View File

@ -3660,9 +3660,6 @@ void P_PlayerRingBurst(player_t *player, INT32 num_rings)
}
if (player->mo->eflags & MFE_VERTICALFLIP)
mo->momz *= -1;
if (P_IsObjectOnGround(player->mo))
player->powers[pw_carry] = CR_NONE;
}
player->losstime += 10*TICRATE;

View File

@ -8948,7 +8948,7 @@ void P_PushableThinker(mobj_t *mobj)
if (mobj->type == MT_MINECART && mobj->health)
{
// If player is ded, remove this minecart
if (!mobj->target || P_MobjWasRemoved(mobj->target) || !mobj->target->health)
if (!mobj->target || P_MobjWasRemoved(mobj->target) || !mobj->target->health || !mobj->target->player || mobj->target->player->powers[pw_carry] != CR_MINECART)
{
P_KillMobj(mobj, NULL, NULL, 0);
return;