mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Don't sting just after using rings
This commit is contained in:
parent
b746b1a0e4
commit
8649a66e08
5 changed files with 14 additions and 2 deletions
|
|
@ -801,6 +801,8 @@ struct player_t
|
||||||
fixed_t spindashspeed; // Spindash release speed
|
fixed_t spindashspeed; // Spindash release speed
|
||||||
UINT8 spindashboost; // Spindash release boost timer
|
UINT8 spindashboost; // Spindash release boost timer
|
||||||
|
|
||||||
|
UINT8 ringboostinprogress; // Ring overhead, don't sting!
|
||||||
|
|
||||||
fixed_t fastfall; // Fast fall momentum
|
fixed_t fastfall; // Fast fall momentum
|
||||||
fixed_t fastfallBase; // Fast fall base speed multiplier
|
fixed_t fastfallBase; // Fast fall base speed multiplier
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1321,7 +1321,7 @@ boolean K_PvPTouchDamage(mobj_t *t1, mobj_t *t2)
|
||||||
|
|
||||||
bool stung = false;
|
bool stung = false;
|
||||||
|
|
||||||
if (RINGTOTAL(t2->player) <= 0 && t2->health == 1 && !(t2->player->pflags2 & PF2_UNSTINGABLE))
|
if (RINGTOTAL(t2->player) <= 0 && t2->player->ringboostinprogress == 0 && t2->health == 1 && !(t2->player->pflags2 & PF2_UNSTINGABLE))
|
||||||
{
|
{
|
||||||
P_DamageMobj(t2, t1, t1, 1, DMG_STING|DMG_WOMBO);
|
P_DamageMobj(t2, t1, t1, 1, DMG_STING|DMG_WOMBO);
|
||||||
// CONS_Printf("T2 stung\n");
|
// CONS_Printf("T2 stung\n");
|
||||||
|
|
|
||||||
|
|
@ -9931,7 +9931,7 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
||||||
|
|
||||||
// Race: spawn ring debt indicator
|
// Race: spawn ring debt indicator
|
||||||
// Battle: spawn zero-bumpers indicator
|
// Battle: spawn zero-bumpers indicator
|
||||||
if (!(player->pflags2 & PF2_UNSTINGABLE) && ((gametyperules & GTR_SPHERES) ? player->mo->health <= 1 : RINGTOTAL(player) <= 0))
|
if (!(player->pflags2 & PF2_UNSTINGABLE) && player->ringboostinprogress == 0 && ((gametyperules & GTR_SPHERES) ? player->mo->health <= 1 : RINGTOTAL(player) <= 0))
|
||||||
{
|
{
|
||||||
UINT8 doubler;
|
UINT8 doubler;
|
||||||
|
|
||||||
|
|
@ -10711,6 +10711,9 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (player->ringboostinprogress)
|
||||||
|
player->ringboostinprogress--;
|
||||||
|
|
||||||
if (player->baildrop)
|
if (player->baildrop)
|
||||||
{
|
{
|
||||||
// freeze the stunned timer while baildrop is active
|
// freeze the stunned timer while baildrop is active
|
||||||
|
|
@ -14997,6 +15000,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
||||||
{
|
{
|
||||||
P_SetOrigin(ring, ring->x, ring->y, ring->z);
|
P_SetOrigin(ring, ring->x, ring->y, ring->z);
|
||||||
ring->extravalue1 = 1;
|
ring->extravalue1 = 1;
|
||||||
|
player->ringboostinprogress = 25;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -347,6 +347,8 @@ static int player_get(lua_State *L)
|
||||||
lua_pushinteger(L, plr->spindashspeed);
|
lua_pushinteger(L, plr->spindashspeed);
|
||||||
else if (fastcmp(field,"spindashboost"))
|
else if (fastcmp(field,"spindashboost"))
|
||||||
lua_pushinteger(L, plr->spindashboost);
|
lua_pushinteger(L, plr->spindashboost);
|
||||||
|
else if (fastcmp(field,"ringboostinprogress"))
|
||||||
|
lua_pushinteger(L, plr->ringboostinprogress);
|
||||||
else if (fastcmp(field,"fastfall"))
|
else if (fastcmp(field,"fastfall"))
|
||||||
lua_pushfixed(L, plr->fastfall);
|
lua_pushfixed(L, plr->fastfall);
|
||||||
else if (fastcmp(field,"fastfallbase"))
|
else if (fastcmp(field,"fastfallbase"))
|
||||||
|
|
@ -1012,6 +1014,8 @@ static int player_set(lua_State *L)
|
||||||
plr->spindashspeed = luaL_checkinteger(L, 3);
|
plr->spindashspeed = luaL_checkinteger(L, 3);
|
||||||
else if (fastcmp(field,"spindashboost"))
|
else if (fastcmp(field,"spindashboost"))
|
||||||
plr->spindashboost = luaL_checkinteger(L, 3);
|
plr->spindashboost = luaL_checkinteger(L, 3);
|
||||||
|
else if (fastcmp(field,"ringboostinprogress"))
|
||||||
|
plr->ringboostinprogress = luaL_checkinteger(L, 3);
|
||||||
else if (fastcmp(field,"fastfall"))
|
else if (fastcmp(field,"fastfall"))
|
||||||
plr->fastfall = luaL_checkfixed(L, 3);
|
plr->fastfall = luaL_checkfixed(L, 3);
|
||||||
else if (fastcmp(field,"fastfallbase"))
|
else if (fastcmp(field,"fastfallbase"))
|
||||||
|
|
|
||||||
|
|
@ -512,6 +512,7 @@ static void P_NetArchivePlayers(savebuffer_t *save)
|
||||||
WRITEUINT16(save->p, players[i].spindash);
|
WRITEUINT16(save->p, players[i].spindash);
|
||||||
WRITEFIXED(save->p, players[i].spindashspeed);
|
WRITEFIXED(save->p, players[i].spindashspeed);
|
||||||
WRITEUINT8(save->p, players[i].spindashboost);
|
WRITEUINT8(save->p, players[i].spindashboost);
|
||||||
|
WRITEUINT8(save->p, players[i].ringboostinprogress);
|
||||||
|
|
||||||
WRITEFIXED(save->p, players[i].fastfall);
|
WRITEFIXED(save->p, players[i].fastfall);
|
||||||
WRITEFIXED(save->p, players[i].fastfallBase);
|
WRITEFIXED(save->p, players[i].fastfallBase);
|
||||||
|
|
@ -1191,6 +1192,7 @@ static void P_NetUnArchivePlayers(savebuffer_t *save)
|
||||||
players[i].spindash = READUINT16(save->p);
|
players[i].spindash = READUINT16(save->p);
|
||||||
players[i].spindashspeed = READFIXED(save->p);
|
players[i].spindashspeed = READFIXED(save->p);
|
||||||
players[i].spindashboost = READUINT8(save->p);
|
players[i].spindashboost = READUINT8(save->p);
|
||||||
|
players[i].ringboostinprogress = READUINT8(save->p);
|
||||||
|
|
||||||
players[i].fastfall = READFIXED(save->p);
|
players[i].fastfall = READFIXED(save->p);
|
||||||
players[i].fastfallBase = READFIXED(save->p);
|
players[i].fastfallBase = READFIXED(save->p);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue