mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Bumper inflate refinements part 69
This commit is contained in:
parent
a514a36128
commit
c197d41bdc
4 changed files with 17 additions and 5 deletions
|
|
@ -4554,6 +4554,7 @@ void K_BumperInflate(player_t *player)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
player->bumperinflate = 3;
|
player->bumperinflate = 3;
|
||||||
|
S_StartSound(player->mo, sfx_cdpcm9);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void K_HandleTumbleBounce(player_t *player)
|
static void K_HandleTumbleBounce(player_t *player)
|
||||||
|
|
@ -8783,10 +8784,14 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
||||||
|
|
||||||
if (player->bumperinflate && player->mo->health > 1 && player->mo->hitlag == 0)
|
if (player->bumperinflate && player->mo->health > 1 && player->mo->hitlag == 0)
|
||||||
{
|
{
|
||||||
if (player->speed < K_GetKartSpeed(player, false, false)/2)
|
|
||||||
P_Thrust(player->mo, K_MomentumAngle(player->mo), BUMPER_THRUST);
|
|
||||||
if (player->tumbleBounces && player->tumbleBounces <= TUMBLEBOUNCES)
|
if (player->tumbleBounces && player->tumbleBounces <= TUMBLEBOUNCES)
|
||||||
|
{
|
||||||
player->mo->momz += BUMPER_FLOAT;
|
player->mo->momz += BUMPER_FLOAT;
|
||||||
|
}
|
||||||
|
else if (player->speed < K_GetKartSpeed(player, false, false)/2)
|
||||||
|
{
|
||||||
|
P_Thrust(player->mo, K_MomentumAngle(player->mo), BUMPER_THRUST);
|
||||||
|
}
|
||||||
player->bumperinflate--;
|
player->bumperinflate--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ Make sure this matches the actual number of states
|
||||||
#define INSTAWHIP_TETHERBLOCK (TICRATE*4)
|
#define INSTAWHIP_TETHERBLOCK (TICRATE*4)
|
||||||
#define PUNISHWINDOW (7*TICRATE/10)
|
#define PUNISHWINDOW (7*TICRATE/10)
|
||||||
|
|
||||||
#define BUMPER_FLOAT (4*mapobjectscale)
|
#define BUMPER_FLOAT (8*mapobjectscale)
|
||||||
#define BUMPER_THRUST (10*mapobjectscale)
|
#define BUMPER_THRUST (10*mapobjectscale)
|
||||||
|
|
||||||
#define FLAMESHIELD_MAX (120)
|
#define FLAMESHIELD_MAX (120)
|
||||||
|
|
|
||||||
|
|
@ -4180,8 +4180,10 @@ static void P_BouncePlayerMove(mobj_t *mo, TryMoveResult_t *result)
|
||||||
// Combo avoidance!
|
// Combo avoidance!
|
||||||
if (mo->player && P_PlayerInPain(mo->player) && gametyperules & GTR_BUMPERS && mo->health > 1)
|
if (mo->player && P_PlayerInPain(mo->player) && gametyperules & GTR_BUMPERS && mo->health > 1)
|
||||||
{
|
{
|
||||||
P_DamageMobj(mo, NULL, NULL, 1, DMG_STUMBLE);
|
K_StumblePlayer(mo->player);
|
||||||
|
K_BumperInflate(mo->player);
|
||||||
mo->player->tumbleBounces = TUMBLEBOUNCES;
|
mo->player->tumbleBounces = TUMBLEBOUNCES;
|
||||||
|
mo->hitlag = max(mo->hitlag, 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
mo->momx = tmxmove;
|
mo->momx = tmxmove;
|
||||||
|
|
|
||||||
|
|
@ -6366,7 +6366,12 @@ static void P_MobjSceneryThink(mobj_t *mobj)
|
||||||
|
|
||||||
if (mobj->target->player->bumperinflate)
|
if (mobj->target->player->bumperinflate)
|
||||||
{
|
{
|
||||||
P_SetScale(mobj, mobj->target->scale + (mobj->target->scale * mobj->target->player->bumperinflate / 2));
|
mobj->frame |= FF_INVERT;
|
||||||
|
P_SetScale(mobj, mobj->target->scale + (mobj->target->scale * 3 * mobj->target->player->bumperinflate / 4));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mobj->frame &= ~FF_INVERT;
|
||||||
}
|
}
|
||||||
|
|
||||||
P_UnsetThingPosition(mobj);
|
P_UnsetThingPosition(mobj);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue