mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-15 18:17:19 +00:00
Players cannot be invincible to Insta-whip vs Guard counter
Hacked into P_DamageMobj by way of inflictor == target
This commit is contained in:
parent
49f0b31db7
commit
ecf9fd53f6
2 changed files with 9 additions and 2 deletions
|
|
@ -860,7 +860,8 @@ boolean K_InstaWhipCollide(mobj_t *shield, mobj_t *victim)
|
|||
attacker->momx = attacker->momy = 0;
|
||||
P_Thrust(attacker, thrangle, mapobjectscale*7);
|
||||
|
||||
P_DamageMobj(attacker, victim, victim, 1, DMG_TUMBLE);
|
||||
// target is inflictor: hack to let invincible players lose to guard
|
||||
P_DamageMobj(attacker, attacker, victim, 1, DMG_TUMBLE);
|
||||
|
||||
// A little extra juice, so successful reads are usually positive or zero on spheres.
|
||||
victimPlayer->spheres = std::min(victimPlayer->spheres + 10, 40);
|
||||
|
|
@ -883,7 +884,7 @@ boolean K_InstaWhipCollide(mobj_t *shield, mobj_t *victim)
|
|||
|
||||
P_PlayVictorySound(victim);
|
||||
|
||||
P_DamageMobj(attacker, victim, victim, 1, DMG_TUMBLE);
|
||||
P_DamageMobj(attacker, attacker, victim, 1, DMG_TUMBLE);
|
||||
|
||||
S_StartSound(victim, sfx_mbv92);
|
||||
K_AddHitLag(attacker, victimHitlag, true);
|
||||
|
|
|
|||
|
|
@ -3076,6 +3076,12 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
|||
invincible = false;
|
||||
}
|
||||
|
||||
// Hack for instawhip-guard counter, lets invincible players lose to guard
|
||||
if (inflictor == target)
|
||||
{
|
||||
invincible = false;
|
||||
}
|
||||
|
||||
// TODO: doing this from P_DamageMobj limits punting to objects that damage the player.
|
||||
// And it may be kind of yucky.
|
||||
// But this is easier than accounting for every condition in PIT_CheckThing!
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue