Coins are no defense now! (This lecture is boring.)

This commit is contained in:
toasterbabe 2016-10-13 15:13:33 +01:00
parent 80300ac476
commit a119db3a85
2 changed files with 13 additions and 2 deletions

View file

@ -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;

View file

@ -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;
}
}
//