local function UltimateRollJumpLock(player) for player in players.iterate do if not (player and player.valid and player.mo) then continue end if (player.pflags & PF_SPINNING) and not (player.mo and player.mo.skin == "charmy") and not (player.mo and player.mo.skin == "adventuresonic") --Characters that get excluded and ((player.mo and player.mo.skin ~= "mario" and player.mo.skin ~= "luigi") --allow control on dive state for the bros or ((player.mo and (player.mo.skin == "mario" or player.mo.skin == "luigi")) and player.mo.state == S_PLAY_ROLL)) and not (player.pflags & PF_JUMPED) and not P_IsObjectOnGround(player.mo) and not (player.mo.eflags & (MFE_TOUCHWATER)) then player.rolledge = true player.pflags = $|PF_JUMPED|PF_THOKKED&~PF_SPINNING if player.rolledge and not (player.mo and player.mo.skin == "silver") --Exclude only from the change of state and not (player.mo and player.mo.skin == "bomb") and not (player.mo and player.mo.skin == "mario") and not (player.mo and player.mo.skin == "luigi") player.mo.state = S_PLAY_JUMP end end --RollEdge and misc things if player.rolledge == true and (player.mo and (player.mo.skin == "mario" or player.mo.skin == "luigi")) --allow control on dive state for the bros and player.mo.state == S_PLAY_ROLL player.rolledge = false player.mo.state = S_MARIO_RECOVER end if player.rolledge == true player.canbreaknow = true end if player.canbreaknow == true player.powers[pw_strong] = $ | (STR_ANIM | STR_WALL) end if player.rolledge == true and (player.mo and player.mo.skin == "trip") and (player.cmd.buttons & BT_JUMP) player.rolledge = false player.canbreaknow = false end if player.rolledge == true and P_IsObjectOnGround(player.mo) player.rolledge = false player.canbreaknow = false player.mariocanroll = false end --water skipping activation if player.rolledge and not (player.mo and player.mo.skin == "mario") and not (player.mo and player.mo.skin == "luigi") and player.canbreaknow and (player.mo.eflags & (MFE_TOUCHWATER)) --allow control on dive state for the bros player.pflags = $|PF_SPINNING&~PF_JUMPED player.pflags = $ & ~PF_THOKKED end -- Jump when spinning on ground if not P_IsObjectOnGround(player.mo) and (player.pflags & PF_SPINNING) and (player.pflags & PF_JUMPED) player.pflags = $ & ~PF_SPINNING end end end addHook("PreThinkFrame", UltimateRollJumpLock, Luigifix) addHook("PostThinkFrame", UltimateRollJumpLock, Luigifix)