mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Bail stun etc
This commit is contained in:
parent
9c0432eb1b
commit
4e6fa59b48
2 changed files with 11 additions and 5 deletions
13
src/k_kart.c
13
src/k_kart.c
|
|
@ -9813,9 +9813,9 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
||||||
|
|
||||||
// UINT16 oldringboost = player->ringboost;
|
// UINT16 oldringboost = player->ringboost;
|
||||||
|
|
||||||
if (player->superring == 0 || player->stunned)
|
if (!player->baildrop && (player->superring == 0 || player->stunned))
|
||||||
player->ringboost -= max((player->ringboost / roller), 1);
|
player->ringboost -= max((player->ringboost / roller), 1);
|
||||||
else if (K_LegacyRingboost(player))
|
else if (K_LegacyRingboost(player) || player->baildrop)
|
||||||
player->ringboost--;
|
player->ringboost--;
|
||||||
else
|
else
|
||||||
player->ringboost -= min(K_GetFullKartRingPower(player, false) - 1, max(player->ringboost / 2 / roller, 1));
|
player->ringboost -= min(K_GetFullKartRingPower(player, false) - 1, max(player->ringboost / 2 / roller, 1));
|
||||||
|
|
@ -10005,6 +10005,11 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
||||||
|
|
||||||
if (player->baildrop)
|
if (player->baildrop)
|
||||||
{
|
{
|
||||||
|
if (player->stunned & 0x8000)
|
||||||
|
player->stunned = 0x8000 | BAILSTUN;
|
||||||
|
else
|
||||||
|
player->stunned = BAILSTUN;
|
||||||
|
|
||||||
mobj_t *pmo = player->mo;
|
mobj_t *pmo = player->mo;
|
||||||
// particle spawn
|
// particle spawn
|
||||||
#define BAILSPARKLE_MAXBAIL 61 // amount of bail rings needed for max sparkle spawn frequency
|
#define BAILSPARKLE_MAXBAIL 61 // amount of bail rings needed for max sparkle spawn frequency
|
||||||
|
|
@ -13981,10 +13986,10 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
player->rings = 0;
|
player->rings = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT32 totalrings = player->rings + player->superring + player->pickuprings;
|
UINT32 totalrings = player->rings + player->superring + player->pickuprings + debtrings;
|
||||||
totalrings = max(totalrings, 0);
|
totalrings = max(totalrings, 0);
|
||||||
UINT32 bailboost = FixedInt(FixedMul(totalrings*FRACUNIT, BAIL_BOOST));
|
UINT32 bailboost = FixedInt(FixedMul(totalrings*FRACUNIT, BAIL_BOOST));
|
||||||
UINT32 baildrop = debtrings + FixedInt(FixedMul((totalrings)*FRACUNIT, BAIL_DROP));
|
UINT32 baildrop = FixedInt(FixedMul((totalrings)*FRACUNIT, BAIL_DROP));
|
||||||
|
|
||||||
if (player->itemRoulette.active)
|
if (player->itemRoulette.active)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -45,9 +45,10 @@ Make sure this matches the actual number of states
|
||||||
#define PUNISHWINDOW (7*TICRATE/10)
|
#define PUNISHWINDOW (7*TICRATE/10)
|
||||||
|
|
||||||
#define BAIL_MAXCHARGE (84) // tics to bail when in painstate nad in air, on ground is half, if you touch this, also update Obj_BailChargeThink synced animation logic
|
#define BAIL_MAXCHARGE (84) // tics to bail when in painstate nad in air, on ground is half, if you touch this, also update Obj_BailChargeThink synced animation logic
|
||||||
#define BAIL_DROP (FRACUNIT/2)
|
#define BAIL_DROP (FRACUNIT)
|
||||||
#define BAIL_BOOST (FRACUNIT)
|
#define BAIL_BOOST (FRACUNIT)
|
||||||
#define BAIL_DROPFREQUENCY (3)
|
#define BAIL_DROPFREQUENCY (3)
|
||||||
|
#define BAILSTUN (TICRATE*10)
|
||||||
|
|
||||||
#define MAXCOMBOTHRUST (mapobjectscale*20)
|
#define MAXCOMBOTHRUST (mapobjectscale*20)
|
||||||
#define MAXCOMBOFLOAT (mapobjectscale*10)
|
#define MAXCOMBOFLOAT (mapobjectscale*10)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue