mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 17:22:12 +00:00
Coins are no defense now! (This lecture is boring.)
This commit is contained in:
parent
80300ac476
commit
a119db3a85
2 changed files with 13 additions and 2 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue