diff --git a/src/lua_baselib.c b/src/lua_baselib.c index 304c866c9..2534c92ac 100644 --- a/src/lua_baselib.c +++ b/src/lua_baselib.c @@ -1730,12 +1730,11 @@ static int lib_pResetCamera(lua_State *L) static int lib_pSuperReady(lua_State *L) { player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER)); - boolean transform = (boolean)lua_opttrueboolean(L, 2); //HUDSAFE INLEVEL if (!player) return LUA_ErrInvalid(L, "player_t"); - lua_pushboolean(L, P_SuperReady(player, transform)); + lua_pushboolean(L, P_SuperReady(player)); return 1; } diff --git a/src/p_local.h b/src/p_local.h index 249c3cd4b..f2470f72d 100644 --- a/src/p_local.h +++ b/src/p_local.h @@ -203,7 +203,7 @@ mobj_t *P_LookForEnemies(player_t *player, boolean nonenemies, boolean bullet); void P_NukeEnemies(mobj_t *inflictor, mobj_t *source, fixed_t radius); void P_Earthquake(mobj_t *inflictor, mobj_t *source, fixed_t radius); boolean P_HomingAttack(mobj_t *source, mobj_t *enemy); /// \todo doesn't belong in p_user -boolean P_SuperReady(player_t *player, boolean transform); +boolean P_SuperReady(player_t *player); void P_DoJump(player_t *player, boolean soundandstate, boolean allowflip); void P_DoSpinDashDust(player_t *player); #define P_AnalogMove(player) (P_ControlStyle(player) == CS_LMAOGALOG) diff --git a/src/p_user.c b/src/p_user.c index 3ee13aca9..c5ff5aa72 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -4438,27 +4438,21 @@ static void P_DoSuperStuff(player_t *player) // // Returns true if player is ready to transform or detransform // -boolean P_SuperReady(player_t *player, boolean transform) +boolean P_SuperReady(player_t *player) { - if (!transform && - (player->powers[pw_super] < TICRATE*3/2 - || !G_CoopGametype())) // No turning back in competitive! - return false; - else if (transform - && (player->powers[pw_super] - || !ALL7EMERALDS(emeralds) - || !(player->rings >= 50))) - return false; - if (player->mo + && (player->rings >= 50) + && ALL7EMERALDS(emeralds) + && (player->charflags & SF_SUPER) + && (player->pflags & PF_JUMPED) + && !player->powers[pw_super] + && !player->powers[pw_invulnerability] + && !(player->powers[pw_shield] & SH_NOSTACK) && !player->powers[pw_tailsfly] && !player->powers[pw_carry] - && (player->charflags & SF_SUPER) && !P_PlayerInPain(player) && !player->climbing && !(player->pflags & (PF_JUMPSTASIS|PF_THOKKED|PF_STARTDASH|PF_GLIDING|PF_SLIDING|PF_SHIELDABILITY)) - && ((player->pflags & PF_JUMPED) || (P_IsObjectOnGround(player->mo) && (player->panim == PA_IDLE || player->panim == PA_EDGE - || player->panim == PA_WALK || player->panim == PA_RUN || (player->charflags & SF_DASHMODE && player->panim == PA_DASH)))) && !(maptol & TOL_NIGHTS)) return true; @@ -5318,8 +5312,7 @@ static void P_DoJumpStuff(player_t *player, ticcmd_t *cmd, boolean spinshieldhac ; else if (cmd->buttons & BT_SPIN) { - if (spinshieldhack && !(player->pflags & PF_SPINDOWN) && P_SuperReady(player, true) - && !player->powers[pw_invulnerability] && !(player->powers[pw_shield] & SH_NOSTACK)) // These two checks are no longer in P_SuperReady + if (spinshieldhack && !(player->pflags & PF_SPINDOWN) && P_SuperReady(player)) { // If you're using two-button play, can turn Super and aren't already, // and you don't have a shield, then turn Super! @@ -8805,10 +8798,6 @@ void P_MovePlayer(player_t *player) // Transform into super if we can! if (P_SuperReady(player, true)) P_DoSuperTransformation(player, false); - - // Detransform from super if we can! - else if (P_SuperReady(player, false)) - P_DoSuperDetransformation(player); } } diff --git a/src/y_inter.c b/src/y_inter.c index 2add8645b..cbe71901d 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -579,9 +579,9 @@ void Y_IntermissionDrawer(void) { if (LUA_HudEnabled(hud_intermissiontitletext)) { - const char *ringtext = "\x82" "get 50 rings, then"; + const char *ringtext = "\x82" "50 rings, no shield"; const char *tut1text = "\x82" "press " "\x80" "shield"; - const char *tut2text = "\x82" "to transform"; + const char *tut2text = "\x82" "mid-" "\x80" "jump"; ttheight = 8; V_DrawLevelTitle(data.spec.passedx1 + xoffset1, ttheight, 0, data.spec.passed1); ttheight += V_LevelNameHeight(data.spec.passed3) + 2;