Sakura protection (NEO damage rules)

This commit is contained in:
Antonio Martinez 2025-06-20 15:19:34 -04:00 committed by AJ Martinez
parent 8a2dc00fe8
commit 2ec203822f

View file

@ -3181,6 +3181,12 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
} }
} }
if (inflictor->momx == 0 && inflictor->momy == 0 && inflictor->momz == 0)
{
// Probably a map hazard.
allowcombo = false;
}
if (allowcombo == false && (target->eflags & MFE_PAUSED)) if (allowcombo == false && (target->eflags & MFE_PAUSED))
{ {
return false; return false;
@ -3395,18 +3401,22 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
K_PopPlayerShield(player); K_PopPlayerShield(player);
} }
if (!(gametyperules & GTR_SPHERES) && player->tripwireLeniency) boolean downgraded = false;
if (!(gametyperules & GTR_SPHERES) && player->tripwireLeniency && !P_PlayerInPain(player))
{ {
switch (type) switch (type)
{ {
case DMG_EXPLODE: case DMG_EXPLODE:
type = DMG_TUMBLE; type = DMG_TUMBLE;
downgraded = true;
break; break;
case DMG_TUMBLE: case DMG_TUMBLE:
softenTumble = true; softenTumble = true;
break; break;
case DMG_NORMAL: case DMG_NORMAL:
case DMG_WIPEOUT: case DMG_WIPEOUT:
downgraded = true;
type = DMG_STUMBLE; type = DMG_STUMBLE;
player->ringburst += 5; // THERE IS SIMPLY NO HOPE AT THIS POINT player->ringburst += 5; // THERE IS SIMPLY NO HOPE AT THIS POINT
K_PopPlayerShield(player); K_PopPlayerShield(player);
@ -3453,7 +3463,7 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
ringburst = 0; ringburst = 0;
} }
if (type != DMG_STUMBLE && type != DMG_WHUMBLE) if ((type != DMG_STUMBLE && type != DMG_WHUMBLE) || (type == DMG_STUMBLE && downgraded))
{ {
if (type != DMG_STING) if (type != DMG_STING)
player->flashing = K_GetKartFlashing(player); player->flashing = K_GetKartFlashing(player);