mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'damaging-sector-stumble' into 'master'
Use damage stumble for stumble sectors / terrain again (allows DI) See merge request kart-krew-dev/ring-racers-internal!2911
This commit is contained in:
commit
9bdd01f5a6
2 changed files with 12 additions and 4 deletions
|
|
@ -504,8 +504,13 @@ void K_ProcessTerrainEffect(mobj_t *mo)
|
|||
|
||||
if (dmg & DMG_STUMBLE && !G_CompatLevel(0x0010))
|
||||
{
|
||||
if (player->mo->hitlag == 0 && (player->mo->momz >= 0) == (P_MobjFlip(player->mo) >= 0))
|
||||
K_StumblePlayer(player);
|
||||
if (player->mo->hitlag == 0 &&
|
||||
(player->mo->momz == 0 || (player->mo->momz > 0) != (P_MobjFlip(player->mo) > 0)))
|
||||
{
|
||||
player->pflags2 |= PF2_ALWAYSDAMAGED;
|
||||
P_DamageMobj(mo, NULL, NULL, 1, dmg);
|
||||
player->pflags2 &= ~PF2_ALWAYSDAMAGED;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5430,9 +5430,12 @@ static void P_EvaluateDamageType(player_t *player, sector_t *sector, boolean isT
|
|||
}
|
||||
else
|
||||
{
|
||||
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 || (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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue