Use damage stumble for stumble sectors / terrain again (allows DI)

This commit is contained in:
Antonio Martinez 2025-09-27 05:58:50 -04:00
parent 7b10e4e2bd
commit 140f9846aa
2 changed files with 8 additions and 2 deletions

View file

@ -505,7 +505,11 @@ void K_ProcessTerrainEffect(mobj_t *mo)
if (dmg & DMG_STUMBLE && !G_CompatLevel(0x0010)) if (dmg & DMG_STUMBLE && !G_CompatLevel(0x0010))
{ {
if (player->mo->hitlag == 0 && (player->mo->momz >= 0) == (P_MobjFlip(player->mo) >= 0)) if (player->mo->hitlag == 0 && (player->mo->momz >= 0) == (P_MobjFlip(player->mo) >= 0))
K_StumblePlayer(player); {
player->pflags2 |= PF2_ALWAYSDAMAGED;
P_DamageMobj(mo, NULL, NULL, 1, dmg);
player->pflags2 &= ~PF2_ALWAYSDAMAGED;
}
} }
else else
{ {

View file

@ -5432,7 +5432,9 @@ static void P_EvaluateDamageType(player_t *player, sector_t *sector, boolean isT
{ {
if (isTouching && player->mo->hitlag == 0 && (player->mo->momz >= 0) == (P_MobjFlip(player->mo) >= 0)) if (isTouching && player->mo->hitlag == 0 && (player->mo->momz >= 0) == (P_MobjFlip(player->mo) >= 0))
{ {
K_StumblePlayer(player); player->pflags2 |= PF2_ALWAYSDAMAGED;
P_DamageMobj(player->mo, NULL, NULL, 1, DMG_STUMBLE);
player->pflags2 &= ~PF2_ALWAYSDAMAGED;
} }
} }