mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Extended Insta-Whip punish window
This commit is contained in:
parent
a191c5d394
commit
bfda339538
4 changed files with 11 additions and 6 deletions
|
|
@ -1054,6 +1054,10 @@ 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;
|
||||||
|
|
|
||||||
|
|
@ -14281,7 +14281,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
// which is allowed during painstate as a last-ditch defensive option.
|
// which is allowed during painstate as a last-ditch defensive option.
|
||||||
if (player && player->mo && player->mo->health > 0 && !player->spectator && !mapreset && leveltime > introtime)
|
if (player && player->mo && player->mo->health > 0 && !player->spectator && !mapreset && leveltime > introtime)
|
||||||
{
|
{
|
||||||
boolean chargingwhip = (cmd->buttons & BT_ATTACK) && (player->rings <= 0) && (!player->instaWhipChargeLockout) && (!player->itemRoulette.active);
|
boolean chargingwhip = (cmd->buttons & BT_ATTACK) && (player->rings <= 0) && (!player->instaWhipChargeLockout) && (player->defenseLockout <= PUNISHWINDOW) && (!player->itemRoulette.active);
|
||||||
boolean releasedwhip = (!(cmd->buttons & BT_ATTACK)) && (player->rings <= 0 && player->instaWhipCharge) && !(P_PlayerInPain(player));
|
boolean releasedwhip = (!(cmd->buttons & BT_ATTACK)) && (player->rings <= 0 && player->instaWhipCharge) && !(P_PlayerInPain(player));
|
||||||
|
|
||||||
if (K_PowerUpRemaining(player, POWERUP_BADGE))
|
if (K_PowerUpRemaining(player, POWERUP_BADGE))
|
||||||
|
|
@ -14357,7 +14357,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
player->instaWhipCharge = 0;
|
player->instaWhipCharge = 0;
|
||||||
if (!K_PowerUpRemaining(player, POWERUP_BARRIER))
|
if (!K_PowerUpRemaining(player, POWERUP_BARRIER))
|
||||||
{
|
{
|
||||||
player->defenseLockout = PUNISHWINDOW;
|
player->defenseLockout = 2*PUNISHWINDOW;
|
||||||
}
|
}
|
||||||
|
|
||||||
S_StartSound(player->mo, sfx_iwhp);
|
S_StartSound(player->mo, sfx_iwhp);
|
||||||
|
|
|
||||||
|
|
@ -3503,7 +3503,8 @@ void A_AttractChase(mobj_t *actor)
|
||||||
|
|
||||||
if (actor->extravalue1 && actor->type != MT_EMERALD) // SRB2Kart
|
if (actor->extravalue1 && actor->type != MT_EMERALD) // SRB2Kart
|
||||||
{
|
{
|
||||||
if (!actor->target || P_MobjWasRemoved(actor->target) || !actor->target->player || actor->target->player->baildrop || actor->target->player->bailcharge)
|
if (!actor->target || P_MobjWasRemoved(actor->target) || !actor->target->player
|
||||||
|
|| actor->target->player->baildrop || actor->target->player->bailcharge || actor->target->player->defenseLockout > PUNISHWINDOW)
|
||||||
{
|
{
|
||||||
P_RemoveMobj(actor);
|
P_RemoveMobj(actor);
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -731,7 +731,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
if (player->instaWhipCharge)
|
if (player->instaWhipCharge)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (player->baildrop || player->bailcharge)
|
if (player->baildrop || player->bailcharge || player->defenseLockout > PUNISHWINDOW)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Don't immediately pick up spilled rings
|
// Don't immediately pick up spilled rings
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue