mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-05-10 10:51:42 +00:00
Only apply instawhip extended punish if it totally whiffs
This commit is contained in:
parent
bfda339538
commit
6d3ef37f95
2 changed files with 11 additions and 6 deletions
|
|
@ -1054,10 +1054,6 @@ boolean K_InstaWhipCollide(mobj_t *shield, mobj_t *victim)
|
||||||
attackerPlayer->roundconditions.checkthisframe = true;
|
attackerPlayer->roundconditions.checkthisframe = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove extended whip recovery from the attacker
|
|
||||||
if (attackerPlayer->defenseLockout > PUNISHWINDOW)
|
|
||||||
attackerPlayer->defenseLockout -= PUNISHWINDOW;
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -1104,12 +1100,14 @@ boolean K_InstaWhipCollide(mobj_t *shield, mobj_t *victim)
|
||||||
if (K_TryPickMeUp(attacker, victim, true))
|
if (K_TryPickMeUp(attacker, victim, true))
|
||||||
{
|
{
|
||||||
shield->hitlag = attacker->hitlag; // players hitlag is handled in K_TryPickMeUp, and we need to set for the shield too
|
shield->hitlag = attacker->hitlag; // players hitlag is handled in K_TryPickMeUp, and we need to set for the shield too
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
P_DamageMobj(victim, shield, attacker, 1, DMG_NORMAL);
|
P_DamageMobj(victim, shield, attacker, 1, DMG_NORMAL);
|
||||||
K_AddHitLag(attacker, attackerHitlag, false);
|
K_AddHitLag(attacker, attackerHitlag, false);
|
||||||
shield->hitlag = attacker->hitlag;
|
shield->hitlag = attacker->hitlag;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
11
src/p_map.c
11
src/p_map.c
|
|
@ -749,7 +749,14 @@ static BlockItReturn_t PIT_CheckThing(mobj_t *thing)
|
||||||
return BMIT_CONTINUE; // overhead
|
return BMIT_CONTINUE; // overhead
|
||||||
if (g_tm.thing->z + g_tm.thing->height < thing->z)
|
if (g_tm.thing->z + g_tm.thing->height < thing->z)
|
||||||
return BMIT_CONTINUE; // underneath
|
return BMIT_CONTINUE; // underneath
|
||||||
K_InstaWhipCollide(g_tm.thing, thing);
|
|
||||||
|
boolean hit = K_InstaWhipCollide(g_tm.thing, thing);
|
||||||
|
if (hit && g_tm.thing->target && !P_MobjWasRemoved(g_tm.thing->target) && g_tm.thing->target->player)
|
||||||
|
{
|
||||||
|
player_t *attacker = g_tm.thing->target->player;
|
||||||
|
if (attacker->defenseLockout > PUNISHWINDOW)
|
||||||
|
attacker->defenseLockout -= PUNISHWINDOW;
|
||||||
|
}
|
||||||
return BMIT_CONTINUE;
|
return BMIT_CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -4197,7 +4204,7 @@ static void P_BouncePlayerMove(mobj_t *mo, TryMoveResult_t *result)
|
||||||
if (mo->eflags & MFE_VERTICALFLIP)
|
if (mo->eflags & MFE_VERTICALFLIP)
|
||||||
mo->momz -= 40*mo->scale;
|
mo->momz -= 40*mo->scale;
|
||||||
else
|
else
|
||||||
mo->momz += 40*mo->scale;
|
mo->momz += 40*mo->scale;
|
||||||
}
|
}
|
||||||
|
|
||||||
mo->momx = tmxmove;
|
mo->momx = tmxmove;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue