addHook("SpinSpecial", function(player) if player.mo.skin == "sonic" and not (player.pflags & PF_THOKKED) and not player.powers[pw_shield] and not (player.pflags & PF_FULLSTASIS) and (player.pflags & PF_JUMPED) and not (player.mo.state == S_PLAY_PAIN) and (P_IsObjectOnGround(player.mo) == false) then S_StartSound(player.mo, sfx_spndsh) player.mo.state = S_PLAY_SPINDASH player.charge = true player.pflags = $|PF_THOKKED end end) addHook("PlayerThink", function(player) if player.mo.skin == "sonic" and player.speed < 45*FRACUNIT and player.charge == true and not player.powers[pw_super] and (P_IsObjectOnGround(player.mo) == true) then S_StartSound(player.mo, sfx_zoom) player.mo.state = S_PLAY_ROLL player.charge = false player.pflags = $|PF_SPINNING P_Thrust(player.mo, player.mo.angle, 20*FRACUNIT) end if player.mo.skin == "sonic" and player.charge == true and player.powers[pw_super] and player.speed < 60*FRACUNIT and (P_IsObjectOnGround(player.mo) == true) then S_StartSound(player.mo, sfx_zoom) player.mo.state = S_PLAY_ROLL player.charge = false player.pflags = $|PF_SPINNING P_Thrust(player.mo, player.mo.angle, 50*FRACUNIT) P_NukeEnemies(player.mo, player.mo, 1) P_StartQuake(20*FRACUNIT, 4) end-- if player.mo.skin == "sonic" and player.charge == true and player.speed > 45*FRACUNIT and not player.powers[pw_super] and (P_IsObjectOnGround(player.mo) == true) then S_StartSound(player.mo, sfx_zoom) player.mo.state = S_PLAY_ROLL player.charge = false player.pflags = $|PF_SPINNING P_InstaThrust(player.mo, player.mo.angle, 50*FRACUNIT) end if player.mo.skin == "sonic" and player.charge == true and player.speed > 60*FRACUNIT and player.powers[pw_super] and (P_IsObjectOnGround(player.mo) == true) then S_StartSound(player.mo, sfx_zoom) player.mo.state = S_PLAY_ROLL player.charge = false player.pflags = $|PF_SPINNING P_Thrust(player.mo, player.mo.angle, 70*FRACUNIT) P_NukeEnemies(player.mo, player.mo, 1) P_StartQuake(20*FRACUNIT, 4) end end) --this still needs thok barrier check, the dropdash works good without it, it just won't cling to walls addHook("MobjMoveBlocked", function(mo) local player = mo.player if player.charge == true and not player.powers[pw_super] P_SetObjectMomZ(player.mo, 10*FRACUNIT + player.speed/4) player.charge = false S_StartSound(player.mo, sfx_zoom) player.mo.state = S_PLAY_ROLL player.pflags = $|PF_SPINNING end end, MT_PLAYER) addHook("MobjMoveBlocked", function(mo) local player = mo.player if player.charge == true and player.powers[pw_super] P_SetObjectMomZ(player.mo, 15*FRACUNIT + player.speed/4) player.charge = false P_StartQuake(20*FRACUNIT, 4) P_NukeEnemies(player.mo, player.mo, 1) S_StartSound(player.mo, sfx_zoom) player.mo.state = S_PLAY_ROLL player.pflags = $|PF_SPINNING end end, MT_PLAYER)