mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Make Grow less irritating (allow stack, don't insta strip from shrink)
This commit is contained in:
parent
afb82e7990
commit
2cbc035411
2 changed files with 60 additions and 58 deletions
59
src/k_kart.c
59
src/k_kart.c
|
|
@ -10505,40 +10505,41 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
{
|
||||
if (player->growshrinktimer < 0)
|
||||
{
|
||||
// If you're shrunk, then "grow" will just make you normal again.
|
||||
// Old v1 behavior was to have Grow counter Shrink,
|
||||
// but Shrink is now so ephemeral that it should just work.
|
||||
K_RemoveGrowShrink(player);
|
||||
// So we fall through here.
|
||||
}
|
||||
else
|
||||
|
||||
K_PlayPowerGloatSound(player->mo);
|
||||
|
||||
player->mo->scalespeed = mapobjectscale/TICRATE;
|
||||
player->mo->destscale = FixedMul(mapobjectscale, GROW_SCALE);
|
||||
|
||||
if (K_PlayerShrinkCheat(player) == true)
|
||||
{
|
||||
K_PlayPowerGloatSound(player->mo);
|
||||
|
||||
player->mo->scalespeed = mapobjectscale/TICRATE;
|
||||
player->mo->destscale = FixedMul(mapobjectscale, GROW_SCALE);
|
||||
|
||||
if (K_PlayerShrinkCheat(player) == true)
|
||||
{
|
||||
player->mo->destscale = FixedMul(player->mo->destscale, SHRINK_SCALE);
|
||||
}
|
||||
|
||||
player->growshrinktimer = max(player->growshrinktimer, ((gametyperules & GTR_CLOSERPLAYERS) ? 8 : 12) * TICRATE);
|
||||
|
||||
if (player->invincibilitytimer > 0)
|
||||
{
|
||||
; // invincibility has priority in P_RestoreMusic, no point in starting here
|
||||
}
|
||||
else if (P_IsLocalPlayer(player) == true)
|
||||
{
|
||||
S_ChangeMusicSpecial("kgrow");
|
||||
}
|
||||
else //used to be "if (P_IsDisplayPlayer(player) == false)"
|
||||
{
|
||||
S_StartSound(player->mo, sfx_alarmg);
|
||||
}
|
||||
|
||||
P_RestoreMusic(player);
|
||||
S_StartSound(player->mo, sfx_kc5a);
|
||||
player->mo->destscale = FixedMul(player->mo->destscale, SHRINK_SCALE);
|
||||
}
|
||||
|
||||
player->growshrinktimer = max(0, player->growshrinktimer);
|
||||
player->growshrinktimer += ((gametyperules & GTR_CLOSERPLAYERS) ? 8 : 12) * TICRATE;
|
||||
|
||||
if (player->invincibilitytimer > 0)
|
||||
{
|
||||
; // invincibility has priority in P_RestoreMusic, no point in starting here
|
||||
}
|
||||
else if (P_IsLocalPlayer(player) == true)
|
||||
{
|
||||
S_ChangeMusicSpecial("kgrow");
|
||||
}
|
||||
else //used to be "if (P_IsDisplayPlayer(player) == false)"
|
||||
{
|
||||
S_StartSound(player->mo, sfx_alarmg);
|
||||
}
|
||||
|
||||
P_RestoreMusic(player);
|
||||
S_StartSound(player->mo, sfx_kc5a);
|
||||
|
||||
player->itemamount--;
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -542,50 +542,51 @@ boolean Obj_ShrinkLaserCollide(mobj_t *gun, mobj_t *victim)
|
|||
// Take away Shrink.
|
||||
K_RemoveGrowShrink(victim->player);
|
||||
}
|
||||
else
|
||||
|
||||
victim->player->growshrinktimer += 3*TICRATE;
|
||||
S_StartSound(victim, sfx_kc5a);
|
||||
|
||||
if (prevTimer <= 0)
|
||||
{
|
||||
victim->player->growshrinktimer += 3*TICRATE;
|
||||
S_StartSound(victim, sfx_kc5a);
|
||||
victim->scalespeed = mapobjectscale/TICRATE;
|
||||
victim->destscale = FixedMul(mapobjectscale, GROW_SCALE);
|
||||
|
||||
if (prevTimer <= 0)
|
||||
if (K_PlayerShrinkCheat(victim->player) == true)
|
||||
{
|
||||
victim->scalespeed = mapobjectscale/TICRATE;
|
||||
victim->destscale = FixedMul(mapobjectscale, GROW_SCALE);
|
||||
|
||||
if (K_PlayerShrinkCheat(victim->player) == true)
|
||||
{
|
||||
victim->destscale = FixedMul(victim->destscale, SHRINK_SCALE);
|
||||
}
|
||||
|
||||
if (victim->player->invincibilitytimer > 0)
|
||||
{
|
||||
; // invincibility has priority in P_RestoreMusic, no point in starting here
|
||||
}
|
||||
else if (P_IsLocalPlayer(victim->player) == true)
|
||||
{
|
||||
S_ChangeMusicSpecial("kgrow");
|
||||
}
|
||||
else //used to be "if (P_IsDisplayPlayer(victim->player) == false)"
|
||||
{
|
||||
S_StartSound(victim, sfx_alarmg);
|
||||
}
|
||||
|
||||
P_RestoreMusic(victim->player);
|
||||
victim->destscale = FixedMul(victim->destscale, SHRINK_SCALE);
|
||||
}
|
||||
|
||||
if (victim->player->invincibilitytimer > 0)
|
||||
{
|
||||
; // invincibility has priority in P_RestoreMusic, no point in starting here
|
||||
}
|
||||
else if (P_IsLocalPlayer(victim->player) == true)
|
||||
{
|
||||
S_ChangeMusicSpecial("kgrow");
|
||||
}
|
||||
else //used to be "if (P_IsDisplayPlayer(victim->player) == false)"
|
||||
{
|
||||
S_StartSound(victim, sfx_alarmg);
|
||||
}
|
||||
|
||||
P_RestoreMusic(victim->player);
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (prevTimer > 0)
|
||||
{
|
||||
// Take away Grow.
|
||||
K_RemoveGrowShrink(victim->player);
|
||||
// Dock some Grow time.
|
||||
// (Hack-adjacent: Always make sure there's a tic left so standard timer handling can remove the effect properly.)
|
||||
victim->player->growshrinktimer -= min(3*TICRATE/2, victim->player->growshrinktimer - 1);
|
||||
S_StartSound(victim, sfx_s3k40);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Start shrinking!
|
||||
victim->player->growshrinktimer -= 5*TICRATE;
|
||||
S_StartSound(victim, sfx_kc59);
|
||||
S_StartSound(victim, sfx_kc59); // I don't think you ever get to hear this while the pohbee laser is in your teeth, but best effort.
|
||||
|
||||
if (prevTimer >= 0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue