diff --git a/src/d_player.h b/src/d_player.h index c17b8d48d62a662b32494117e77fa65c84f130bd..4742002fc346d2b66c2daf4a30eae68a339416bb 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -779,6 +779,8 @@ struct player_t UINT16 flamemeter; // Flame Shield dash meter left UINT8 flamelength; // Flame Shield dash meter, number of segments + UINT16 counterdash; // Flame Shield boost without the flame, largely. Used in places where awarding thrust would affect player control. + UINT16 ballhogcharge; // Ballhog charge up -- the higher this value, the more projectiles boolean ballhogtap; // Ballhog released during charge: used to allow semirapid tapfire diff --git a/src/k_kart.c b/src/k_kart.c index 571816340bc6b3795e369e0aff9bcd06d7fd83d3..e231548d42b07f3db567eb8d66ac9a117ddba612 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -3483,6 +3483,16 @@ static void K_GetKartBoostPower(player_t *player) ); } + if (player->counterdash) // "Fake Flame" (bubble, voltage) + { + fixed_t dash = K_FlameShieldDashVar(player->counterdash); + ADDBOOST( + dash, // + infinite top speed + 3*FRACUNIT, // + 300% acceleration + FixedMul(FixedDiv(dash, FRACUNIT/2), SLIPTIDEHANDLING/2) // + infinite handling + ); + } + if (player->wavedashboost) { // NB: This is intentionally under the 25% handleboost threshold required to initiate a sliptide @@ -8920,6 +8930,9 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd) S_StartSoundAtVolume(player->mo, sfx_fshld3, 255/3); } + if (player->counterdash) + player->counterdash--; + if (player->sneakertimer && player->wipeoutslow > 0 && player->wipeoutslow < wipeoutslowtime+1) player->wipeoutslow = wipeoutslowtime+1; @@ -10867,7 +10880,7 @@ static void K_KartDrift(player_t *player, boolean onground) if (player->trickcharge && dokicker) { // 2.2 - Egg-friendly trick stuff - if (G_CompatLevel(0x000A)) + if (G_CompatLevel(0x000B)) { player->driftboost += 20; player->wavedashboost += 10; @@ -10877,7 +10890,7 @@ static void K_KartDrift(player_t *player, boolean onground) else { player->driftboost += TICRATE; - player->flamedash += TICRATE/2; + player->counterdash += TICRATE/2; P_Thrust(player->mo, pushdir, player->speed / 6); } @@ -13201,11 +13214,11 @@ void K_MoveKartPlayer(player_t *player, boolean onground) { K_ThrowKartItem(player, (player->throwdir > 0), MT_BUBBLESHIELDTRAP, -1, 0, 0); if (player->throwdir == -1) - { - P_InstaThrust(player->mo, player->mo->angle, player->speed + (80 * mapobjectscale)); + { + player->counterdash += TICRATE/2; player->wavedashboost += TICRATE; player->wavedashpower = FRACUNIT; - player->fakeBoost = TICRATE/2; + player->fakeBoost += TICRATE/2; } K_PlayAttackTaunt(player->mo); player->bubbleblowup = 0; diff --git a/src/lua_playerlib.c b/src/lua_playerlib.c index d0ba8e5827588ba180e00c2e22ff464e85f8a79c..432af513a3b0fcbb2531dd43f27cd8a605d01bf6 100644 --- a/src/lua_playerlib.c +++ b/src/lua_playerlib.c @@ -428,6 +428,8 @@ static int player_get(lua_State *L) lua_pushinteger(L, plr->bubbleblowup); else if (fastcmp(field,"flamedash")) lua_pushinteger(L, plr->flamedash); + else if (fastcmp(field,"counterdash")) + lua_pushinteger(L, plr->counterdash); else if (fastcmp(field,"flamemeter")) lua_pushinteger(L, plr->flamemeter); else if (fastcmp(field,"flamelength")) @@ -984,6 +986,8 @@ static int player_set(lua_State *L) plr->bubbleblowup = luaL_checkinteger(L, 3); else if (fastcmp(field,"flamedash")) plr->flamedash = luaL_checkinteger(L, 3); + else if (fastcmp(field,"counterdash")) + plr->counterdash = luaL_checkinteger(L, 3); else if (fastcmp(field,"flamemeter")) plr->flamemeter = luaL_checkinteger(L, 3); else if (fastcmp(field,"flamelength")) diff --git a/src/p_saveg.c b/src/p_saveg.c index bef745fdbdb696ea41341e140b6338e6bc20a383..a5a8773189555e75cfe1e8a16bf6ef011f8b66bf 100644 --- a/src/p_saveg.c +++ b/src/p_saveg.c @@ -508,6 +508,7 @@ static void P_NetArchivePlayers(savebuffer_t *save) WRITEUINT8(save->p, players[i].bubblecool); WRITEUINT8(save->p, players[i].bubbleblowup); WRITEUINT16(save->p, players[i].flamedash); + WRITEUINT16(save->p, players[i].counterdash); WRITEUINT16(save->p, players[i].flamemeter); WRITEUINT8(save->p, players[i].flamelength); @@ -1109,6 +1110,7 @@ static void P_NetUnArchivePlayers(savebuffer_t *save) players[i].bubblecool = READUINT8(save->p); players[i].bubbleblowup = READUINT8(save->p); players[i].flamedash = READUINT16(save->p); + players[i].counterdash = READUINT16(save->p); players[i].flamemeter = READUINT16(save->p); players[i].flamelength = READUINT8(save->p);