mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Lightningcharge can punt, blocks
This commit is contained in:
parent
7b4cf9a07c
commit
fbe2f9fd56
2 changed files with 28 additions and 6 deletions
17
src/k_kart.c
17
src/k_kart.c
|
|
@ -3183,24 +3183,24 @@ fixed_t K_PlayerTripwireSpeedThreshold(const player_t *player)
|
||||||
if (modeattacking && !(gametyperules & GTR_CATCHER))
|
if (modeattacking && !(gametyperules & GTR_CATCHER))
|
||||||
required_speed = 4 * K_GetKartSpeed(player, false, false);
|
required_speed = 4 * K_GetKartSpeed(player, false, false);
|
||||||
|
|
||||||
if ((gametyperules & GTR_CIRCUIT) && !K_Cooperative() && M_NotFreePlay() && !modeattacking)
|
if ((gametyperules & GTR_CIRCUIT) && !K_Cooperative() && M_NotFreePlay() && !modeattacking)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
All of this will be for making Sonic Boom easier when you're drowning in the back, like a "reverse" proration
|
All of this will be for making Sonic Boom easier when you're drowning in the back, like a "reverse" proration
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define REVERSED_SONICBOOM_PRORATION (30000)
|
#define REVERSED_SONICBOOM_PRORATION (30000)
|
||||||
#define MAX_SONICBOOM_REDUCTION (7*FRACUNIT/8)
|
#define MAX_SONICBOOM_REDUCTION (7*FRACUNIT/8)
|
||||||
|
|
||||||
UINT32 dist = K_GetItemRouletteDistance(player, D_NumPlayersInRace());
|
UINT32 dist = K_GetItemRouletteDistance(player, D_NumPlayersInRace());
|
||||||
|
|
||||||
if (dist > REVERSED_SONICBOOM_PRORATION)
|
if (dist > REVERSED_SONICBOOM_PRORATION)
|
||||||
{
|
{
|
||||||
dist = REVERSED_SONICBOOM_PRORATION;
|
dist = REVERSED_SONICBOOM_PRORATION;
|
||||||
}
|
}
|
||||||
|
|
||||||
fixed_t distfactor = FixedDiv(dist, REVERSED_SONICBOOM_PRORATION); //
|
fixed_t distfactor = FixedDiv(dist, REVERSED_SONICBOOM_PRORATION); //
|
||||||
fixed_t sonicboom_aid = Easing_InCubic(distfactor, FRACUNIT, MAX_SONICBOOM_REDUCTION);
|
fixed_t sonicboom_aid = Easing_InCubic(distfactor, FRACUNIT, MAX_SONICBOOM_REDUCTION);
|
||||||
|
|
||||||
required_speed = FixedMul(sonicboom_aid, required_speed);
|
required_speed = FixedMul(sonicboom_aid, required_speed);
|
||||||
|
|
||||||
|
|
@ -3209,7 +3209,7 @@ fixed_t K_PlayerTripwireSpeedThreshold(const player_t *player)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
required_speed += FixedMul(required_speed, K_PlayerScamPercentage(player, 3/2));
|
required_speed += FixedMul(required_speed, K_PlayerScamPercentage(player, 3/2));
|
||||||
|
|
||||||
if(player->position == 1)
|
if(player->position == 1)
|
||||||
{
|
{
|
||||||
required_speed = 9 * K_GetKartSpeed(player, false, false); // Seek employment
|
required_speed = 9 * K_GetKartSpeed(player, false, false); // Seek employment
|
||||||
|
|
@ -17103,6 +17103,11 @@ boolean K_PlayerCanPunt(player_t *player)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (player->lightningcharge > 0)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (player->tripwirePass >= TRIPWIRE_BLASTER && player->speed >= K_PlayerTripwireSpeedThreshold(player))
|
if (player->tripwirePass >= TRIPWIRE_BLASTER && player->speed >= K_PlayerTripwireSpeedThreshold(player))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -3944,6 +3944,12 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
||||||
{
|
{
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
else if (player->lightningcharge &&
|
||||||
|
(type != DMG_EXPLODE || inflictor->type != MT_SPBEXPLOSION || !inflictor->movefactor))
|
||||||
|
{
|
||||||
|
;
|
||||||
|
sfx = sfx_s3k45;
|
||||||
|
}
|
||||||
else if (player->hyudorotimer > 0)
|
else if (player->hyudorotimer > 0)
|
||||||
;
|
;
|
||||||
else
|
else
|
||||||
|
|
@ -4016,13 +4022,24 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
||||||
{
|
{
|
||||||
K_DoPowerClash(target, inflictor);
|
K_DoPowerClash(target, inflictor);
|
||||||
|
|
||||||
|
if (player->lightningcharge)
|
||||||
|
{
|
||||||
|
K_SpawnDriftElectricSparks(player, SKINCOLOR_PURPLE, true);
|
||||||
|
}
|
||||||
|
|
||||||
if (inflictor->type == MT_SUPER_FLICKY)
|
if (inflictor->type == MT_SUPER_FLICKY)
|
||||||
{
|
{
|
||||||
Obj_BlockSuperFlicky(inflictor);
|
Obj_BlockSuperFlicky(inflictor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
S_StartSound(target, sfx);
|
||||||
}
|
}
|
||||||
else if (source)
|
else if (source)
|
||||||
|
{
|
||||||
K_DoPowerClash(target, source);
|
K_DoPowerClash(target, source);
|
||||||
|
S_StartSound(target, sfx);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Full invulnerability
|
// Full invulnerability
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue