diff --git a/src/d_clisrv.c b/src/d_clisrv.c index abcdb7580..ce142ffd1 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -2550,7 +2550,7 @@ void CL_ClearPlayer(INT32 playernum) PlayerPointerRemove(players[playernum].mo); PlayerPointerRemove(players[playernum].followmobj); PlayerPointerRemove(players[playernum].stumbleIndicator); - PlayerPointerRemove(players[playernum].sliptideZipIndicator); + PlayerPointerRemove(players[playernum].wavedashIndicator); PlayerPointerRemove(players[playernum].trickIndicator); #undef PlayerPointerRemove diff --git a/src/d_player.h b/src/d_player.h index b4777e67c..bd951e7c7 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -895,14 +895,16 @@ struct player_t UINT8 tripwireReboundDelay; // When failing Tripwire, brieftly lock out speed-based tripwire pass (anti-cheese) - UINT16 sliptideZip; // How long is our chained sliptide? Grant a proportional boost when it's over. - UINT8 sliptideZipDelay; // How long since the last sliptide? Only boost once you've been straightened out for a bit. - UINT16 sliptideZipBoost; // The actual boost granted from sliptideZip. + UINT16 wavedash; // How long is our chained sliptide? Grant a proportional boost when it's over. + UINT8 wavedashdelay; // How long since the last sliptide? Only boost once you've been straightened out for a bit. + UINT16 wavedashboost; // The actual boost granted from wavedash. + UINT16 trickdashboost; // The actual boost granted from wavedash. + boolean trickdash; UINT8 lastsafelap; mobj_t *stumbleIndicator; - mobj_t *sliptideZipIndicator; + mobj_t *wavedashIndicator; mobj_t *trickIndicator; mobj_t *whip; mobj_t *hand; diff --git a/src/deh_tables.c b/src/deh_tables.c index 5a087fcb0..c0d35b1b5 100644 --- a/src/deh_tables.c +++ b/src/deh_tables.c @@ -3314,7 +3314,7 @@ const char *const STATE_LIST[] = { // array length left dynamic for sanity testi "S_MAGICIANBOXTOP", "S_MAGICIANBOXBOTTOM", - "S_SLIPTIDEZIP", + "S_WAVEDASH", "S_INSTAWHIP", "S_INSTAWHIP_RECHARGE1", @@ -5547,7 +5547,7 @@ const char *const MOBJTYPE_LIST[] = { // array length left dynamic for sanity t "MT_MONITOR_SHARD", "MT_MAGICIANBOX", - "MT_SLIPTIDEZIP", + "MT_WAVEDASH", "MT_INSTAWHIP", "MT_INSTAWHIP_RECHARGE", diff --git a/src/g_game.c b/src/g_game.c index 3b4ca5125..687af8a7f 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -2243,7 +2243,7 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps) // These are mostly subservient to the player, and may not clean themselves up. PlayerPointerRemove(players[player].followmobj); PlayerPointerRemove(players[player].stumbleIndicator); - PlayerPointerRemove(players[player].sliptideZipIndicator); + PlayerPointerRemove(players[player].wavedashIndicator); PlayerPointerRemove(players[player].trickIndicator); #undef PlayerPointerRemove diff --git a/src/info.c b/src/info.c index a5fc9677d..8e3b38bb9 100644 --- a/src/info.c +++ b/src/info.c @@ -558,7 +558,8 @@ char sprnames[NUMSPRITES + 1][5] = "IMDB", // Item Monitor Small Shard (Debris) "MTWK", // Item Monitor Glass Twinkle - "SLPT", // Sliptide zip indicator + "SLPT", // Wavedash indicator + "TRBS", // Trickdash indicator "IWHP", // Instawhip "WPRE", // Instawhip Recharge @@ -4126,7 +4127,7 @@ state_t states[NUMSTATES] = {SPR_MGBT, FF_FLOORSPRITE|0, -1, {NULL}, 0, 0, S_NULL}, // S_MAGICIANBOX_TOP {SPR_MGBB, FF_FLOORSPRITE|0, -1, {NULL}, 0, 0, S_NULL}, // S_MAGICIANBOX_BOTTOM - {SPR_SLPT, FF_PAPERSPRITE|0, -1, {NULL}, 0, 0, S_NULL}, // S_SLIPTIDEZIP + {SPR_SLPT, FF_PAPERSPRITE|0, -1, {NULL}, 0, 0, S_NULL}, // S_WAVEDASH {SPR_IWHP, FF_FLOORSPRITE|FF_ANIMATE|0, -1, {NULL}, 6, 2, S_NULL}, // S_INSTAWHIP {SPR_NULL, 0, 1, {NULL}, 0, 0, S_INSTAWHIP_RECHARGE2}, // S_INSTAWHIP_RECHARGE1 @@ -23078,9 +23079,9 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_NULL // raisestate }, - { // MT_SLIPTIDEZIP + { // MT_WAVEDASH -1, // doomednum - S_SLIPTIDEZIP, // spawnstate + S_WAVEDASH, // spawnstate 1000, // spawnhealth S_NULL, // seestate sfx_None, // seesound diff --git a/src/info.h b/src/info.h index 01642bb20..f27c34e85 100644 --- a/src/info.h +++ b/src/info.h @@ -1115,7 +1115,8 @@ typedef enum sprite SPR_IMDB, // Item Monitor Small Shard (Debris) SPR_MTWK, // Item Monitor Glass Twinkle - SPR_SLPT, // Sliptide zip indicator + SPR_SLPT, // Wavedash indicator + SPR_TRBS, // Trickdash indicator SPR_IWHP, // Instawhip SPR_WPRE, // Instawhip Recharge @@ -4537,7 +4538,7 @@ typedef enum state S_MAGICIANBOX_TOP, S_MAGICIANBOX_BOTTOM, - S_SLIPTIDEZIP, + S_WAVEDASH, S_INSTAWHIP, S_INSTAWHIP_RECHARGE1, @@ -6808,7 +6809,7 @@ typedef enum mobj_type MT_MONITOR_PART, MT_MONITOR_SHARD, MT_MAGICIANBOX, - MT_SLIPTIDEZIP, + MT_WAVEDASH, MT_INSTAWHIP, MT_INSTAWHIP_RECHARGE, diff --git a/src/k_kart.c b/src/k_kart.c index 15f0e28f7..ff5d6e34f 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -1263,6 +1263,9 @@ static boolean K_HasInfiniteTether(player_t *player) if (player->eggmanexplode > 0) return true; + if (player->trickdash) + return true; + return false; } @@ -1881,9 +1884,9 @@ static void K_SpawnGenericSpeedLines(player_t *player, boolean top) fast->colorized = true; fast->renderflags |= RF_ADD; } - else if (player->sliptideZipBoost) + else if (player->wavedashboost || player->trickdashboost) { - fast->color = SKINCOLOR_WHITE; + fast->color = (player->trickdashboost) ? K_RainbowColor(leveltime) : SKINCOLOR_WHITE; fast->colorized = true; } else if (player->ringboost) @@ -3231,12 +3234,17 @@ static void K_GetKartBoostPower(player_t *player) ); } - if (player->sliptideZipBoost) + if (player->wavedashboost) { - // NB: This is intentionally under the 25% threshold required to initiate a sliptide + // NB: This is intentionally under the 25% handleboost threshold required to initiate a sliptide ADDBOOST(8*FRACUNIT/10, 4*FRACUNIT, 2*SLIPTIDEHANDLING/5); // + 80% top speed, + 400% acceleration, +20% handling } + if (player->trickdashboost) + { + ADDBOOST(8*FRACUNIT/10, 8*FRACUNIT, 3*SLIPTIDEHANDLING/5); // + 80% top speed, + 800% acceleration, +30% handling + } + if (player->spindashboost) // Spindash boost { const fixed_t MAXCHARGESPEED = K_GetSpindashChargeSpeed(player); @@ -4074,7 +4082,7 @@ void K_InitStumbleIndicator(player_t *player) P_SetTarget(&new->target, player->mo); } -void K_InitSliptideZipIndicator(player_t *player) +void K_InitWavedashIndicator(player_t *player) { mobj_t *new = NULL; @@ -4088,14 +4096,14 @@ void K_InitSliptideZipIndicator(player_t *player) return; } - if (P_MobjWasRemoved(player->sliptideZipIndicator) == false) + if (P_MobjWasRemoved(player->wavedashIndicator) == false) { - P_RemoveMobj(player->sliptideZipIndicator); + P_RemoveMobj(player->wavedashIndicator); } - new = P_SpawnMobjFromMobj(player->mo, 0, 0, 0, MT_SLIPTIDEZIP); + new = P_SpawnMobjFromMobj(player->mo, 0, 0, 0, MT_WAVEDASH); - P_SetTarget(&player->sliptideZipIndicator, new); + P_SetTarget(&player->wavedashIndicator, new); P_SetTarget(&new->target, player->mo); } @@ -4250,11 +4258,11 @@ void K_UpdateStumbleIndicator(player_t *player) #define MIN_WAVEDASH_CHARGE ((7*TICRATE/16)*9) -static boolean K_IsLosingSliptideZip(player_t *player) +static boolean K_IsLosingWavedash(player_t *player) { if (player->mo == NULL || P_MobjWasRemoved(player->mo) == true) return true; - if (!K_Sliptiding(player) && player->sliptideZip < MIN_WAVEDASH_CHARGE) + if (!K_Sliptiding(player) && player->wavedash < MIN_WAVEDASH_CHARGE) return true; if (!K_Sliptiding(player) && player->drift == 0 && P_IsObjectOnGround(player->mo) && player->sneakertimer == 0 @@ -4263,7 +4271,7 @@ static boolean K_IsLosingSliptideZip(player_t *player) return false; } -void K_UpdateSliptideZipIndicator(player_t *player) +void K_UpdateWavedashIndicator(player_t *player) { mobj_t *mobj = NULL; @@ -4277,13 +4285,13 @@ void K_UpdateSliptideZipIndicator(player_t *player) return; } - if (player->sliptideZipIndicator == NULL || P_MobjWasRemoved(player->sliptideZipIndicator) == true) + if (player->wavedashIndicator == NULL || P_MobjWasRemoved(player->wavedashIndicator) == true) { - K_InitSliptideZipIndicator(player); + K_InitWavedashIndicator(player); return; } - mobj = player->sliptideZipIndicator; + mobj = player->wavedashIndicator; angle_t momentumAngle = K_MomentumAngle(player->mo); P_MoveOrigin(mobj, player->mo->x - FixedMul(40*mapobjectscale, FINECOSINE(momentumAngle >> ANGLETOFINESHIFT)), @@ -4293,7 +4301,7 @@ void K_UpdateSliptideZipIndicator(player_t *player) P_SetScale(mobj, 3 * player->mo->scale / 2); // No stored boost (or negligible enough that it might be a mistake) - if (player->sliptideZip <= HIDEWAVEDASHCHARGE) + if (player->wavedash <= HIDEWAVEDASHCHARGE) { mobj->renderflags |= RF_DONTDRAW; mobj->frame = 7; @@ -4302,8 +4310,8 @@ void K_UpdateSliptideZipIndicator(player_t *player) mobj->renderflags &= ~RF_DONTDRAW; - UINT32 chargeFrame = 7 - min(7, player->sliptideZip / 100); - UINT32 decayFrame = min(7, player->sliptideZipDelay / 2); + UINT32 chargeFrame = 7 - min(7, player->wavedash / 100); + UINT32 decayFrame = min(7, player->wavedashdelay / 2); if (max(chargeFrame, decayFrame) > mobj->frame) mobj->frame++; else if (max(chargeFrame, decayFrame) < mobj->frame) @@ -4312,7 +4320,7 @@ void K_UpdateSliptideZipIndicator(player_t *player) mobj->renderflags &= ~RF_TRANSMASK; mobj->renderflags |= RF_PAPERSPRITE; - if (K_IsLosingSliptideZip(player)) + if (K_IsLosingWavedash(player)) { // Decay timer's ticking mobj->rollangle += 3*ANG30/4; @@ -4324,6 +4332,17 @@ void K_UpdateSliptideZipIndicator(player_t *player) // Storing boost mobj->rollangle += 3*ANG15/4; } + + if (player->trickdash) + { + mobj->sprite = SPR_TRBS; + mobj->renderflags |= RF_ADD; + } + else + { + mobj->sprite = SPR_SLPT; + mobj->renderflags &= ~RF_ADD; + } } static mobj_t *K_TrickCatholocismBlast(mobj_t *trickIndicator, fixed_t destscale, angle_t rollangle) @@ -8107,7 +8126,7 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd) if (player->sneakertimer || player->ringboost || player->driftboost || player->startboost || player->eggmanexplode || player->trickboost - || player->gateBoost || player->sliptideZipBoost) + || player->gateBoost || player->wavedashboost || player->trickdashboost) { #if 0 if (player->invincibilitytimer) @@ -8393,9 +8412,14 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd) if (player->dropdashboost) player->dropdashboost--; - if (player->sliptideZipBoost > 0 && onground == true) + if (player->wavedashboost > 0 && onground == true) { - player->sliptideZipBoost--; + player->wavedashboost--; + } + + if (player->trickdashboost > 0 && onground == true) + { + player->trickdashboost--; } if (player->spindashboost) @@ -8864,7 +8888,7 @@ void K_KartPlayerAfterThink(player_t *player) K_KartResetPlayerColor(player); K_UpdateStumbleIndicator(player); - K_UpdateSliptideZipIndicator(player); + K_UpdateWavedashIndicator(player); K_UpdateTrickIndicator(player); // Move held objects (Bananas, Orbinaut, etc) @@ -9925,8 +9949,9 @@ static void K_KartDrift(player_t *player, boolean onground) player->drift = player->driftcharge = player->aizdriftstrat = 0; player->pflags &= ~(PF_BRAKEDRIFT|PF_GETSPARKS); // And take away wavedash properties: advanced cornering demands advanced finesse - player->sliptideZip = 0; - player->sliptideZipBoost = 0; + player->wavedash = 0; + player->wavedashboost = 0; + player->trickdashboost = 0; } else if ((player->pflags & PF_DRIFTINPUT) && player->drift != 0) { @@ -10028,11 +10053,11 @@ static void K_KartDrift(player_t *player, boolean onground) || (!player->aizdriftstrat) || (player->steering > 0) != (player->aizdriftstrat > 0)) { - if (!player->drift && player->steering && player->aizdriftstrat && player->sliptideZip // If we were sliptiding last tic, + if (!player->drift && player->steering && player->aizdriftstrat && player->wavedash // If we were sliptiding last tic, && (player->steering > 0) == (player->aizdriftstrat > 0) // we're steering in the right direction, && player->speed >= K_GetKartSpeed(player, false, true)) // and we're above the threshold to spawn dust... { - keepsliptide = true; // Then keep your current sliptide, but note the behavior change for sliptidezip handling. + keepsliptide = true; // Then keep your current sliptide, but note the behavior change for wavedash handling. } else { @@ -10060,9 +10085,9 @@ static void K_KartDrift(player_t *player, boolean onground) // This makes wavedash charge noticeably slower on even modest delay, despite the magnitude of the turn seeming the same. // So we only require 90% of a turn to get full charge strength. - player->sliptideZip += addCharge; + player->wavedash += addCharge; - if (player->sliptideZip >= MIN_WAVEDASH_CHARGE && (player->sliptideZip - addCharge) < MIN_WAVEDASH_CHARGE) + if (player->wavedash >= MIN_WAVEDASH_CHARGE && (player->wavedash - addCharge) < MIN_WAVEDASH_CHARGE) S_StartSound(player->mo, sfx_waved5); } @@ -10088,16 +10113,16 @@ static void K_KartDrift(player_t *player, boolean onground) if (!K_Sliptiding(player) || keepsliptide) { - if (!keepsliptide && K_IsLosingSliptideZip(player) && player->sliptideZip > 0) + if (!keepsliptide && K_IsLosingWavedash(player) && player->wavedash > 0) { - if (player->sliptideZip > HIDEWAVEDASHCHARGE && !S_SoundPlaying(player->mo, sfx_waved2)) + if (player->wavedash > HIDEWAVEDASHCHARGE && !S_SoundPlaying(player->mo, sfx_waved2)) S_StartSoundAtVolume(player->mo, sfx_waved2, 255); // Losing combo time, going to boost S_StopSoundByID(player->mo, sfx_waved1); S_StopSoundByID(player->mo, sfx_waved4); - player->sliptideZipDelay++; - if (player->sliptideZipDelay > TICRATE/2) + player->wavedashdelay++; + if (player->wavedashdelay > TICRATE/2) { - if (player->sliptideZip >= MIN_WAVEDASH_CHARGE) + if (player->wavedash >= MIN_WAVEDASH_CHARGE) { fixed_t maxZipPower = 2*FRACUNIT; fixed_t minZipPower = 1*FRACUNIT; @@ -10112,30 +10137,36 @@ static void K_KartDrift(player_t *player, boolean onground) fixed_t yourPowerReduction = FixedDiv(yourPenalty * FRACUNIT, penaltySpread * FRACUNIT); fixed_t yourPower = maxZipPower - FixedMul(yourPowerReduction, powerSpread); - int yourBoost = FixedInt(FixedMul(yourPower, player->sliptideZip/10 * FRACUNIT)); + int yourBoost = FixedInt(FixedMul(yourPower, player->wavedash/10 * FRACUNIT)); - /* - CONS_Printf("SZ %d MZ %d mZ %d pwS %d mP %d MP %d peS %d yPe %d yPR %d yPw %d yB %d\n", - player->sliptideZip, maxZipPower, minZipPower, powerSpread, minPenalty, maxPenalty, penaltySpread, yourPenalty, yourPowerReduction, yourPower, yourBoost); - */ + if (player->trickdash) + { + player->trickdashboost += 3*yourBoost/2; + S_StartSoundAtVolume(player->mo, sfx_gshba, 255); + } + else + { + player->wavedashboost += yourBoost; + } - player->sliptideZipBoost += yourBoost; + S_StartSoundAtVolume(player->mo, sfx_waved3, 255); // Boost + + player->trickdash = 0; K_SpawnDriftBoostExplosion(player, 0); - S_StartSoundAtVolume(player->mo, sfx_waved3, 255); // Boost } S_StopSoundByID(player->mo, sfx_waved1); S_StopSoundByID(player->mo, sfx_waved2); S_StopSoundByID(player->mo, sfx_waved4); - player->sliptideZip = 0; - player->sliptideZipDelay = 0; + player->wavedash = 0; + player->wavedashdelay = 0; } } else { S_StopSoundByID(player->mo, sfx_waved1); S_StopSoundByID(player->mo, sfx_waved2); - if (player->sliptideZip > 0 && !S_SoundPlaying(player->mo, sfx_waved4)) + if (player->wavedash > 0 && !S_SoundPlaying(player->mo, sfx_waved4)) S_StartSoundAtVolume(player->mo, sfx_waved4, 255); // Passive woosh } @@ -10149,10 +10180,10 @@ static void K_KartDrift(player_t *player, boolean onground) } else { - player->sliptideZipDelay = 0; + player->wavedashdelay = 0; S_StopSoundByID(player->mo, sfx_waved2); S_StopSoundByID(player->mo, sfx_waved4); - if (player->sliptideZip > HIDEWAVEDASHCHARGE && !S_SoundPlaying(player->mo, sfx_waved1)) + if (player->wavedash > HIDEWAVEDASHCHARGE && !S_SoundPlaying(player->mo, sfx_waved1)) S_StartSoundAtVolume(player->mo, sfx_waved1, 255); // Charging } @@ -10711,7 +10742,7 @@ static void K_KartSpindashWind(mobj_t *parent) P_SetTarget(&wind->target, parent); - if (parent->player && parent->player->sliptideZipBoost) + if (parent->player && parent->player->wavedashboost) P_SetScale(wind, wind->scale * 2); if (parent->momx || parent->momy) @@ -10775,7 +10806,7 @@ static void K_KartSpindash(player_t *player) K_KartSpindashWind(player->mo); } - if ((player->sliptideZipBoost > 0) && (spawnWind == true)) + if ((player->wavedashboost > 0 || player->trickdashboost > 0) && (spawnWind == true)) { K_KartSpindashWind(player->mo); } @@ -11885,7 +11916,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground) if (player->throwdir == -1) { P_InstaThrust(player->mo, player->mo->angle, player->speed + (80 * mapobjectscale)); - player->sliptideZipBoost += TICRATE; // Just for keeping speed briefly vs. tripwire etc. + player->wavedashboost += TICRATE; // Just for keeping speed briefly vs. tripwire etc. // If this doesn't turn out to be reliable, I'll change it to directly set leniency or something. } K_PlayAttackTaunt(player->mo); @@ -12218,6 +12249,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground) { S_StartSound(player->mo, sfx_trick0); player->dotrickfx = true; + player->trickboostdecay = min(TICRATE*3/4, abs(momz/FRACUNIT)); if (cmd->turning > 0) { @@ -12252,6 +12284,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground) { S_StartSound(player->mo, sfx_trick0); player->dotrickfx = true; + player->trickboostdecay = min(TICRATE*3/4, abs(momz/FRACUNIT)); if (cmd->throwdir > 0) // forward trick { @@ -12366,24 +12399,31 @@ void K_MoveKartPlayer(player_t *player, boolean onground) } else if ((player->trickpanel != TRICKSTATE_NONE) && P_IsObjectOnGround(player->mo)) // Landed from trick { + K_SpawnDashDustRelease(player); + if (player->fastfall) { + P_InstaThrust(player->mo, player->mo->angle, 2*abs(player->fastfall)/3 + 15*FRACUNIT); player->mo->hitlag = 3; - K_SpawnDashDustRelease(player); - P_InstaThrust(player->mo, player->mo->angle, 30*FRACUNIT); - S_StartSound(player->mo, sfx_gshce); + S_StartSound(player->mo, sfx_gshac); // TODO player->fastfall = 0; // intentionally skip bounce } - - if (player->trickpanel == TRICKSTATE_BACK) // upward trick + else { S_StartSound(player->mo, sfx_s23c); K_SpawnDashDustRelease(player); player->trickboost = TICRATE - player->trickboostdecay; - } + player->wavedash += 150; // bonus for the slow fall + //player->wavedashdelay = TICRATE/2 - 2; + player->wavedashdelay = 0; - player->sliptideZip += 300; - player->sliptideZipDelay = 0; + if (player->trickpanel == TRICKSTATE_FORWARD) + player->trickboostpower /= 18; + else if (player->trickpanel != TRICKSTATE_BACK) + player->trickboostpower /= 9; + + player->trickdash = true; + } player->trickpanel = TRICKSTATE_NONE; player->trickboostdecay = 0; diff --git a/src/k_kart.h b/src/k_kart.h index 3f6293bba..d5782e550 100644 --- a/src/k_kart.h +++ b/src/k_kart.h @@ -119,10 +119,10 @@ angle_t K_StumbleSlope(angle_t angle, angle_t pitch, angle_t roll); void K_StumblePlayer(player_t *player); boolean K_CheckStumble(player_t *player, angle_t oldPitch, angle_t oldRoll, boolean fromAir); void K_InitStumbleIndicator(player_t *player); -void K_InitSliptideZipIndicator(player_t *player); +void K_InitWavedashIndicator(player_t *player); void K_InitTrickIndicator(player_t *player); void K_UpdateStumbleIndicator(player_t *player); -void K_UpdateSliptideZipIndicator(player_t *player); +void K_UpdateWavedashIndicator(player_t *player); void K_UpdateTrickIndicator(player_t *player); INT32 K_ExplodePlayer(player_t *player, mobj_t *inflictor, mobj_t *source); void K_DebtStingPlayer(player_t *player, mobj_t *source); diff --git a/src/k_respawn.c b/src/k_respawn.c index 21af8253d..107e7c7ed 100644 --- a/src/k_respawn.c +++ b/src/k_respawn.c @@ -156,7 +156,8 @@ void K_DoIngameRespawn(player_t *player) player->ringboost = 0; player->driftboost = player->strongdriftboost = 0; player->gateBoost = 0; - player->sliptideZip = player->sliptideZipBoost = player->sliptideZipDelay = 0; + player->trickdash = 0; + player->wavedash = player->wavedashboost = player->wavedashdelay = player->trickdashboost = 0; K_TumbleInterrupt(player); P_ResetPlayer(player); diff --git a/src/lua_playerlib.c b/src/lua_playerlib.c index 0bda04838..6314665b9 100644 --- a/src/lua_playerlib.c +++ b/src/lua_playerlib.c @@ -325,12 +325,16 @@ static int player_get(lua_State *L) lua_pushinteger(L, plr->tripwireLeniency); else if (fastcmp(field,"tripwireReboundDelay")) lua_pushinteger(L, plr->tripwireReboundDelay); - else if (fastcmp(field,"sliptideZip")) - lua_pushinteger(L, plr->sliptideZip); - else if (fastcmp(field,"sliptideZipDelay")) - lua_pushinteger(L, plr->sliptideZipDelay); - else if (fastcmp(field,"sliptideZipBoost")) - lua_pushinteger(L, plr->sliptideZipBoost); + else if (fastcmp(field,"wavedash")) + lua_pushinteger(L, plr->wavedash); + else if (fastcmp(field,"wavedashdelay")) + lua_pushinteger(L, plr->wavedashdelay); + else if (fastcmp(field,"wavedashboost")) + lua_pushinteger(L, plr->wavedashboost); + else if (fastcmp(field,"trickdashboost")) + lua_pushinteger(L, plr->trickdashboost); + else if (fastcmp(field,"trickdash")) + lua_pushinteger(L, plr->trickdash); else if (fastcmp(field,"lastsafelap")) lua_pushinteger(L, plr->lastsafelap); else if (fastcmp(field,"instaWhipCharge")) @@ -809,12 +813,16 @@ static int player_set(lua_State *L) plr->tripwireLeniency = luaL_checkinteger(L, 3); else if (fastcmp(field,"tripwireReboundDelay")) plr->tripwireReboundDelay = luaL_checkinteger(L, 3); - else if (fastcmp(field,"sliptideZip")) - plr->sliptideZip = luaL_checkinteger(L, 3); - else if (fastcmp(field,"sliptideZipDelay")) - plr->sliptideZipDelay = luaL_checkinteger(L, 3); - else if (fastcmp(field,"sliptideZipBoost")) - plr->sliptideZipBoost = luaL_checkinteger(L, 3); + else if (fastcmp(field,"wavedash")) + plr->wavedash = luaL_checkinteger(L, 3); + else if (fastcmp(field,"wavedashdelay")) + plr->wavedashdelay = luaL_checkinteger(L, 3); + else if (fastcmp(field,"wavedashboost")) + plr->wavedashboost = luaL_checkinteger(L, 3); + else if (fastcmp(field,"trickdashboost")) + plr->trickdashboost = luaL_checkinteger(L, 3); + else if (fastcmp(field,"trickdash")) + plr->trickdash = luaL_checkinteger(L, 3); else if (fastcmp(field,"lastsafelap")) plr->lastsafelap = luaL_checkinteger(L, 3); else if (fastcmp(field,"instaWhipCharge")) diff --git a/src/p_inter.c b/src/p_inter.c index fc7458ad6..2d1f7b0ff 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -2558,7 +2558,7 @@ static boolean P_KillPlayer(player_t *player, mobj_t *inflictor, mobj_t *source, } PlayerPointerRemove(player->stumbleIndicator); - PlayerPointerRemove(player->sliptideZipIndicator); + PlayerPointerRemove(player->wavedashIndicator); PlayerPointerRemove(player->trickIndicator); #undef PlayerPointerRemove diff --git a/src/p_mobj.c b/src/p_mobj.c index efb668fec..565647cb7 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -12543,7 +12543,7 @@ void P_SpawnPlayer(INT32 playernum) p->griefValue = 0; K_InitStumbleIndicator(p); - K_InitSliptideZipIndicator(p); + K_InitWavedashIndicator(p); K_InitTrickIndicator(p); if (gametyperules & GTR_ITEMARROWS) diff --git a/src/p_saveg.c b/src/p_saveg.c index 1860b84e8..f86cf2c3d 100644 --- a/src/p_saveg.c +++ b/src/p_saveg.c @@ -75,7 +75,7 @@ typedef enum SKYBOXCENTER = 0x0010, HOVERHYUDORO = 0x0020, STUMBLE = 0x0040, - SLIPTIDEZIP = 0x0080, + WAVEDASH = 0x0080, RINGSHOOTER = 0x0100, WHIP = 0x0200, HAND = 0x0400, @@ -311,8 +311,8 @@ static void P_NetArchivePlayers(savebuffer_t *save) if (players[i].stumbleIndicator) flags |= STUMBLE; - if (players[i].sliptideZipIndicator) - flags |= SLIPTIDEZIP; + if (players[i].wavedashIndicator) + flags |= WAVEDASH; if (players[i].trickIndicator) flags |= TRICKINDICATOR; @@ -352,8 +352,8 @@ static void P_NetArchivePlayers(savebuffer_t *save) if (flags & STUMBLE) WRITEUINT32(save->p, players[i].stumbleIndicator->mobjnum); - if (flags & SLIPTIDEZIP) - WRITEUINT32(save->p, players[i].sliptideZipIndicator->mobjnum); + if (flags & WAVEDASH) + WRITEUINT32(save->p, players[i].wavedashIndicator->mobjnum); if (flags & TRICKINDICATOR) WRITEUINT32(save->p, players[i].trickIndicator->mobjnum); @@ -542,9 +542,11 @@ static void P_NetArchivePlayers(savebuffer_t *save) WRITEUINT8(save->p, players[i].tripwireReboundDelay); - WRITEUINT16(save->p, players[i].sliptideZip); - WRITEUINT8(save->p, players[i].sliptideZipDelay); - WRITEUINT16(save->p, players[i].sliptideZipBoost); + WRITEUINT16(save->p, players[i].wavedash); + WRITEUINT8(save->p, players[i].wavedashdelay); + WRITEUINT16(save->p, players[i].wavedashboost); + WRITEUINT8(save->p, players[i].trickdash); + WRITEUINT16(save->p, players[i].trickdashboost); WRITEUINT8(save->p, players[i].lastsafelap); @@ -869,8 +871,8 @@ static void P_NetUnArchivePlayers(savebuffer_t *save) if (flags & STUMBLE) players[i].stumbleIndicator = (mobj_t *)(size_t)READUINT32(save->p); - if (flags & SLIPTIDEZIP) - players[i].sliptideZipIndicator = (mobj_t *)(size_t)READUINT32(save->p); + if (flags & WAVEDASH) + players[i].wavedashIndicator = (mobj_t *)(size_t)READUINT32(save->p); if (flags & TRICKINDICATOR) players[i].trickIndicator = (mobj_t *)(size_t)READUINT32(save->p); @@ -1060,9 +1062,11 @@ static void P_NetUnArchivePlayers(savebuffer_t *save) players[i].tripwireReboundDelay = READUINT8(save->p); - players[i].sliptideZip = READUINT16(save->p); - players[i].sliptideZipDelay = READUINT8(save->p); - players[i].sliptideZipBoost = READUINT16(save->p); + players[i].wavedash = READUINT16(save->p); + players[i].wavedashdelay = READUINT8(save->p); + players[i].wavedashboost = READUINT16(save->p); + players[i].trickdash = READUINT8(save->p); + players[i].trickdashboost = READUINT16(save->p); players[i].lastsafelap = READUINT8(save->p); @@ -5600,12 +5604,12 @@ static void P_RelinkPointers(void) if (!P_SetTarget(&players[i].stumbleIndicator, P_FindNewPosition(temp))) CONS_Debug(DBG_GAMELOGIC, "stumbleIndicator not found on player %d\n", i); } - if (players[i].sliptideZipIndicator) + if (players[i].wavedashIndicator) { - temp = (UINT32)(size_t)players[i].sliptideZipIndicator; - players[i].sliptideZipIndicator = NULL; - if (!P_SetTarget(&players[i].sliptideZipIndicator, P_FindNewPosition(temp))) - CONS_Debug(DBG_GAMELOGIC, "sliptideZipIndicator not found on player %d\n", i); + temp = (UINT32)(size_t)players[i].wavedashIndicator; + players[i].wavedashIndicator = NULL; + if (!P_SetTarget(&players[i].wavedashIndicator, P_FindNewPosition(temp))) + CONS_Debug(DBG_GAMELOGIC, "wavedashIndicator not found on player %d\n", i); } if (players[i].trickIndicator) { diff --git a/src/p_user.c b/src/p_user.c index 81a5cd555..ef505d934 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -4000,7 +4000,7 @@ void P_PlayerThink(player_t *player) PlayerPointerErase(player->followmobj); PlayerPointerErase(player->stumbleIndicator); - PlayerPointerErase(player->sliptideZipIndicator); + PlayerPointerErase(player->wavedashIndicator); PlayerPointerErase(player->trickIndicator); PlayerPointerErase(player->whip); PlayerPointerErase(player->hand);