mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'invinc-shrink-nerfs' into 'master'
Grow/invinc tweakpass Closes #1333 See merge request KartKrew/Kart!2321
This commit is contained in:
commit
dc116bfccc
5 changed files with 25 additions and 5 deletions
|
|
@ -982,6 +982,8 @@ struct player_t
|
||||||
UINT8 lastsafelap;
|
UINT8 lastsafelap;
|
||||||
UINT8 lastsafecheatcheck;
|
UINT8 lastsafecheatcheck;
|
||||||
|
|
||||||
|
UINT8 ignoreAirtimeLeniency; // We bubblebounced or otherwise did an airtime thing with control, powerup timers should still count down
|
||||||
|
|
||||||
fixed_t topAccel; // Reduced on straight wall collisions to give players extra recovery time
|
fixed_t topAccel; // Reduced on straight wall collisions to give players extra recovery time
|
||||||
|
|
||||||
mobj_t *stumbleIndicator;
|
mobj_t *stumbleIndicator;
|
||||||
|
|
|
||||||
14
src/k_kart.c
14
src/k_kart.c
|
|
@ -8947,7 +8947,7 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player->invincibilitytimer && (onground == true || K_PowerUpRemaining(player, POWERUP_SMONITOR)))
|
if (player->invincibilitytimer && (player->ignoreAirtimeLeniency > 0 || onground == true || K_PowerUpRemaining(player, POWERUP_SMONITOR)))
|
||||||
player->invincibilitytimer--;
|
player->invincibilitytimer--;
|
||||||
|
|
||||||
if (!player->invincibilitytimer)
|
if (!player->invincibilitytimer)
|
||||||
|
|
@ -8983,7 +8983,7 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
||||||
|
|
||||||
if ((player->respawn.state == RESPAWNST_NONE) && player->growshrinktimer != 0)
|
if ((player->respawn.state == RESPAWNST_NONE) && player->growshrinktimer != 0)
|
||||||
{
|
{
|
||||||
if (player->growshrinktimer > 0 && onground == true)
|
if (player->growshrinktimer > 0 && (onground == true || player->ignoreAirtimeLeniency > 0))
|
||||||
player->growshrinktimer--;
|
player->growshrinktimer--;
|
||||||
if (player->growshrinktimer < 0)
|
if (player->growshrinktimer < 0)
|
||||||
player->growshrinktimer++;
|
player->growshrinktimer++;
|
||||||
|
|
@ -9009,6 +9009,9 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
||||||
player->finalfailsafe = 0;
|
player->finalfailsafe = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (player->ignoreAirtimeLeniency)
|
||||||
|
player->ignoreAirtimeLeniency--;
|
||||||
|
|
||||||
if (player->freeRingShooterCooldown && !player->mo->hitlag)
|
if (player->freeRingShooterCooldown && !player->mo->hitlag)
|
||||||
player->freeRingShooterCooldown--;
|
player->freeRingShooterCooldown--;
|
||||||
|
|
||||||
|
|
@ -11913,6 +11916,8 @@ boolean K_FastFallBounce(player_t *player)
|
||||||
fixed_t fallspeed = abs(player->fastfall);
|
fixed_t fallspeed = abs(player->fastfall);
|
||||||
P_InstaThrust(player->mo, player->mo->angle, 11*max(minspeed, fallspeed)/10);
|
P_InstaThrust(player->mo, player->mo->angle, 11*max(minspeed, fallspeed)/10);
|
||||||
|
|
||||||
|
player->ignoreAirtimeLeniency = max(player->ignoreAirtimeLeniency, TICRATE);
|
||||||
|
|
||||||
bounce += 3 * mapobjectscale;
|
bounce += 3 * mapobjectscale;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -12559,12 +12564,13 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
if (ATTACK_IS_DOWN && !HOLDING_ITEM && NO_HYUDORO) // Doesn't hold your item slot hostage normally, so you're free to waste it if you have multiple
|
if (ATTACK_IS_DOWN && !HOLDING_ITEM && NO_HYUDORO) // Doesn't hold your item slot hostage normally, so you're free to waste it if you have multiple
|
||||||
{
|
{
|
||||||
UINT32 behind = K_GetItemRouletteDistance(player, player->itemRoulette.playing);
|
UINT32 behind = K_GetItemRouletteDistance(player, player->itemRoulette.playing);
|
||||||
UINT32 behindScaled = behind * TICRATE / 4000;
|
UINT32 behindScaled = behind * TICRATE / 4500;
|
||||||
behindScaled = min(behindScaled, 10*TICRATE);
|
behindScaled = min(behindScaled, 10*TICRATE);
|
||||||
|
|
||||||
K_DoInvincibility(player,
|
K_DoInvincibility(player,
|
||||||
max(10u * TICRATE + behindScaled, player->invincibilitytimer + 5u*TICRATE));
|
max(7u * TICRATE + behindScaled, player->invincibilitytimer + 5u*TICRATE));
|
||||||
K_PlayPowerGloatSound(player->mo);
|
K_PlayPowerGloatSound(player->mo);
|
||||||
|
|
||||||
player->itemamount--;
|
player->itemamount--;
|
||||||
player->botvars.itemconfirm = 0;
|
player->botvars.itemconfirm = 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -368,6 +368,8 @@ static int player_get(lua_State *L)
|
||||||
lua_pushinteger(L, plr->lastsafelap);
|
lua_pushinteger(L, plr->lastsafelap);
|
||||||
else if (fastcmp(field,"lastsafecheatcheck"))
|
else if (fastcmp(field,"lastsafecheatcheck"))
|
||||||
lua_pushinteger(L, plr->lastsafecheatcheck);
|
lua_pushinteger(L, plr->lastsafecheatcheck);
|
||||||
|
else if (fastcmp(field,"ignoreairtimeleniency"))
|
||||||
|
lua_pushinteger(L, plr->ignoreAirtimeLeniency);
|
||||||
else if (fastcmp(field,"topaccel"))
|
else if (fastcmp(field,"topaccel"))
|
||||||
lua_pushinteger(L, plr->topAccel);
|
lua_pushinteger(L, plr->topAccel);
|
||||||
else if (fastcmp(field,"instawhipcharge"))
|
else if (fastcmp(field,"instawhipcharge"))
|
||||||
|
|
@ -916,6 +918,8 @@ static int player_set(lua_State *L)
|
||||||
plr->lastsafelap = luaL_checkinteger(L, 3);
|
plr->lastsafelap = luaL_checkinteger(L, 3);
|
||||||
else if (fastcmp(field,"lastsafecheatcheck"))
|
else if (fastcmp(field,"lastsafecheatcheck"))
|
||||||
plr->lastsafecheatcheck = luaL_checkinteger(L, 3);
|
plr->lastsafecheatcheck = luaL_checkinteger(L, 3);
|
||||||
|
else if (fastcmp(field,"ignoreairtimeleniency"))
|
||||||
|
plr->ignoreAirtimeLeniency = luaL_checkinteger(L, 3);
|
||||||
else if (fastcmp(field,"topaccel"))
|
else if (fastcmp(field,"topaccel"))
|
||||||
plr->topAccel = luaL_checkinteger(L, 3);
|
plr->topAccel = luaL_checkinteger(L, 3);
|
||||||
else if (fastcmp(field,"instawhipcharge"))
|
else if (fastcmp(field,"instawhipcharge"))
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@
|
||||||
#include "../z_zone.h"
|
#include "../z_zone.h"
|
||||||
#include "../k_waypoint.h"
|
#include "../k_waypoint.h"
|
||||||
#include "../music.h"
|
#include "../music.h"
|
||||||
|
#include "../m_easing.h"
|
||||||
|
|
||||||
#define POHBEE_HOVER (128 << FRACBITS)
|
#define POHBEE_HOVER (128 << FRACBITS)
|
||||||
#define POHBEE_SPEED (128 << FRACBITS)
|
#define POHBEE_SPEED (128 << FRACBITS)
|
||||||
|
|
@ -569,7 +570,10 @@ boolean Obj_ShrinkLaserCollide(mobj_t *gun, mobj_t *victim)
|
||||||
K_RemoveGrowShrink(victim->player);
|
K_RemoveGrowShrink(victim->player);
|
||||||
}
|
}
|
||||||
|
|
||||||
victim->player->growshrinktimer += 6*TICRATE;
|
UINT8 oldGrow = max(victim->player->growshrinktimer, 0);
|
||||||
|
fixed_t easePercent = min(oldGrow * 6*TICRATE / FRACUNIT, FRACUNIT);
|
||||||
|
victim->player->growshrinktimer += Easing_OutSine(easePercent, 6*TICRATE, 2*TICRATE);
|
||||||
|
|
||||||
S_StartSound(victim, sfx_kc5a);
|
S_StartSound(victim, sfx_kc5a);
|
||||||
|
|
||||||
if (victim->player->roundconditions.consecutive_grow_lasers < UINT8_MAX)
|
if (victim->player->roundconditions.consecutive_grow_lasers < UINT8_MAX)
|
||||||
|
|
|
||||||
|
|
@ -587,6 +587,8 @@ static void P_NetArchivePlayers(savebuffer_t *save)
|
||||||
WRITEUINT8(save->p, players[i].lastsafelap);
|
WRITEUINT8(save->p, players[i].lastsafelap);
|
||||||
WRITEUINT8(save->p, players[i].lastsafecheatcheck);
|
WRITEUINT8(save->p, players[i].lastsafecheatcheck);
|
||||||
|
|
||||||
|
WRITEUINT8(save->p, players[i].ignoreAirtimeLeniency);
|
||||||
|
|
||||||
WRITEFIXED(save->p, players[i].topAccel);
|
WRITEFIXED(save->p, players[i].topAccel);
|
||||||
|
|
||||||
WRITEMEM(save->p, players[i].public_key, PUBKEYLENGTH);
|
WRITEMEM(save->p, players[i].public_key, PUBKEYLENGTH);
|
||||||
|
|
@ -1183,6 +1185,8 @@ static void P_NetUnArchivePlayers(savebuffer_t *save)
|
||||||
players[i].lastsafelap = READUINT8(save->p);
|
players[i].lastsafelap = READUINT8(save->p);
|
||||||
players[i].lastsafecheatcheck = READUINT8(save->p);
|
players[i].lastsafecheatcheck = READUINT8(save->p);
|
||||||
|
|
||||||
|
players[i].ignoreAirtimeLeniency = READUINT8(save->p);
|
||||||
|
|
||||||
players[i].topAccel = READFIXED(save->p);
|
players[i].topAccel = READFIXED(save->p);
|
||||||
|
|
||||||
READMEM(save->p, players[i].public_key, PUBKEYLENGTH);
|
READMEM(save->p, players[i].public_key, PUBKEYLENGTH);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue