diff --git a/src/d_player.h b/src/d_player.h index 4b2978546..65333ecce 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -55,7 +55,8 @@ typedef enum CA_TELEKINESIS, CA_FALLSWITCH, CA_JUMPBOOST, - CA_AIRDRILL + CA_AIRDRILL, + CA_JUMPTHOK } charability_t; //Secondary skin abilities diff --git a/src/dehacked.c b/src/dehacked.c index 9c2fe4d22..284d82c3d 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -7523,6 +7523,7 @@ struct { {"CA_FALLSWITCH",CA_FALLSWITCH}, {"CA_JUMPBOOST",CA_JUMPBOOST}, {"CA_AIRDRILL",CA_AIRDRILL}, + {"CA_JUMPTHOK",CA_JUMPTHOK}, // Secondary {"CA2_NONE",CA2_NONE}, // now slot 0! {"CA2_SPINDASH",CA2_SPINDASH}, diff --git a/src/p_user.c b/src/p_user.c index 57c8fac6a..8549d51d5 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -3733,6 +3733,7 @@ static void P_DoJumpStuff(player_t *player, ticcmd_t *cmd) { case CA_THOK: case CA_HOMINGTHOK: + case CA_JUMPTHOK: // Credit goes to CZ64 and Sryder13 for the original // Now it's Sonic's abilities turn! if (player->pflags & PF_JUMPED) { @@ -3742,12 +3743,19 @@ static void P_DoJumpStuff(player_t *player, ticcmd_t *cmd) P_DoSuperTransformation(player, false); else // Otherwise, THOK! { - if (!(player->pflags & PF_THOKKED) || (player->charability2 == CA2_MULTIABILITY)) + if (!(player->pflags & PF_THOKKED) || ((player->charability2 == CA2_MULTIABILITY) && (!(player->charability == CA_JUMPTHOK)))) { // Catapult the player fixed_t actionspd = player->actionspd; if (player->mo->eflags & MFE_UNDERWATER) actionspd >>= 1; + if (player->charability == CA_JUMPTHOK) + { + if ((actionspd == 60*FRACUNIT) && (actionspd > player->normalspeed)) //Limit only at default + actionspd = player->normalspeed; + player->pflags &= ~PF_JUMPED; + P_DoJump(player, false); + } P_InstaThrust(player->mo, player->mo->angle, FixedMul(actionspd, player->mo->scale)); if (maptol & TOL_2D)