diff --git a/src/d_player.h b/src/d_player.h index 4f993c1dc..1d2c6bf79 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -801,6 +801,8 @@ struct player_t fixed_t spindashspeed; // Spindash release speed UINT8 spindashboost; // Spindash release boost timer + UINT8 ringboostinprogress; // Ring overhead, don't sting! + fixed_t fastfall; // Fast fall momentum fixed_t fastfallBase; // Fast fall base speed multiplier diff --git a/src/k_collide.cpp b/src/k_collide.cpp index 65e33c9e8..075a1806f 100644 --- a/src/k_collide.cpp +++ b/src/k_collide.cpp @@ -1328,7 +1328,7 @@ boolean K_PvPTouchDamage(mobj_t *t1, mobj_t *t2) 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); // CONS_Printf("T2 stung\n"); diff --git a/src/k_kart.c b/src/k_kart.c index fd6cd7c54..49537a77e 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -9975,7 +9975,7 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd) // Race: spawn ring debt 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; @@ -10748,6 +10748,9 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd) } } + if (player->ringboostinprogress) + player->ringboostinprogress--; + if (player->baildrop) { // freeze the stunned timer while baildrop is active @@ -15041,6 +15044,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground) { P_SetOrigin(ring, ring->x, ring->y, ring->z); ring->extravalue1 = 1; + player->ringboostinprogress = 25; } diff --git a/src/lua_playerlib.c b/src/lua_playerlib.c index 57e575aee..71b9a0838 100644 --- a/src/lua_playerlib.c +++ b/src/lua_playerlib.c @@ -347,6 +347,8 @@ static int player_get(lua_State *L) lua_pushinteger(L, plr->spindashspeed); else if (fastcmp(field,"spindashboost")) lua_pushinteger(L, plr->spindashboost); + else if (fastcmp(field,"ringboostinprogress")) + lua_pushinteger(L, plr->ringboostinprogress); else if (fastcmp(field,"fastfall")) lua_pushfixed(L, plr->fastfall); else if (fastcmp(field,"fastfallbase")) @@ -1012,6 +1014,8 @@ static int player_set(lua_State *L) plr->spindashspeed = luaL_checkinteger(L, 3); else if (fastcmp(field,"spindashboost")) plr->spindashboost = luaL_checkinteger(L, 3); + else if (fastcmp(field,"ringboostinprogress")) + plr->ringboostinprogress = luaL_checkinteger(L, 3); else if (fastcmp(field,"fastfall")) plr->fastfall = luaL_checkfixed(L, 3); else if (fastcmp(field,"fastfallbase")) diff --git a/src/p_saveg.cpp b/src/p_saveg.cpp index 3da388378..905f5ae79 100644 --- a/src/p_saveg.cpp +++ b/src/p_saveg.cpp @@ -512,6 +512,7 @@ static void P_NetArchivePlayers(savebuffer_t *save) WRITEUINT16(save->p, players[i].spindash); WRITEFIXED(save->p, players[i].spindashspeed); WRITEUINT8(save->p, players[i].spindashboost); + WRITEUINT8(save->p, players[i].ringboostinprogress); WRITEFIXED(save->p, players[i].fastfall); 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].spindashspeed = READFIXED(save->p); players[i].spindashboost = READUINT8(save->p); + players[i].ringboostinprogress = READUINT8(save->p); players[i].fastfall = READFIXED(save->p); players[i].fastfallBase = READFIXED(save->p);