mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 04:21:47 +00:00
Don't apply whip hitlag when damage fails
This commit is contained in:
parent
09a2c8783a
commit
c21f2a41b2
1 changed files with 11 additions and 6 deletions
|
|
@ -1039,7 +1039,10 @@ boolean K_InstaWhipCollide(mobj_t *shield, mobj_t *victim)
|
||||||
}
|
}
|
||||||
|
|
||||||
// if you're here, you're getting hit
|
// if you're here, you're getting hit
|
||||||
P_DamageMobj(victim, shield, attacker, 1, DMG_WHUMBLE);
|
boolean hit = P_DamageMobj(victim, shield, attacker, 1, DMG_WHUMBLE);
|
||||||
|
|
||||||
|
if (!hit)
|
||||||
|
return false;
|
||||||
|
|
||||||
K_DropPowerUps(victimPlayer);
|
K_DropPowerUps(victimPlayer);
|
||||||
|
|
||||||
|
|
@ -1107,9 +1110,11 @@ boolean K_InstaWhipCollide(mobj_t *shield, mobj_t *victim)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
P_DamageMobj(victim, shield, attacker, 1, DMG_NORMAL);
|
if (P_DamageMobj(victim, shield, attacker, 1, DMG_NORMAL))
|
||||||
K_AddHitLag(attacker, attackerHitlag, false);
|
{
|
||||||
shield->hitlag = attacker->hitlag;
|
K_AddHitLag(attacker, attackerHitlag, false);
|
||||||
|
shield->hitlag = attacker->hitlag;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue