diff --git a/src/p_inter.c b/src/p_inter.c index 4d34de374..a8a826fdf 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -145,6 +145,9 @@ boolean P_CanPickupItem(player_t *player, boolean weapon) if (player->powers[pw_flashing] > (flashingtics/4)*3 && player->powers[pw_flashing] < UINT16_MAX) return false; + if (player->mo && player->mo->health <= 0) + return false; + return true; } @@ -3135,7 +3138,7 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da P_ShieldDamage(player, inflictor, source, damage); damage = 0; } - else if (player->mo->health > 1) // No shield but have rings. + else if (!mariomode && player->mo->health > 1) // No shield but have rings. { damage = player->mo->health - 1; P_RingDamage(player, inflictor, source, damage, damagetype); @@ -3297,6 +3300,8 @@ void P_PlayerRingBurst(player_t *player, INT32 num_rings) // Spill the ammo P_PlayerWeaponAmmoBurst(player); + if (mariomode) return; + for (i = 0; i < num_rings; i++) { INT32 objType = mobjinfo[MT_RING].reactiontime; diff --git a/src/p_user.c b/src/p_user.c index ffbff5ed4..219b82529 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -937,7 +937,7 @@ void P_GivePlayerRings(player_t *player, INT32 num_rings) { INT32 gainlives = 0; - while (player->xtralife < maxXtraLife && player->health > 100 * (player->xtralife+1)) + while ((mariomode || player->xtralife < maxXtraLife) && player->health > 100 * (player->xtralife+1)) { ++gainlives; ++player->xtralife; @@ -949,6 +949,12 @@ void P_GivePlayerRings(player_t *player, INT32 num_rings) P_PlayLivesJingle(player); } } + + if (mariomode && player->health > 100) + { + player->mo->health = 1; + player->health = 1; + } } //