addHook("PlayerThink", function(p) if p.bounceupready == nil then p.bounceupready = 0 end if p.bounceupready == 1 then p.thrustfactor = skins[p.mo.skin].thrustfactor*2 else p.thrustfactor = skins[p.mo.skin].thrustfactor end if p.mo.skin == "sonic" or p.mo.skin == "tails" or p.mo.skin == "knuckles" or p.mo.skin == "metalsonic" then if p.mo.state == S_PLAY_JUMP or p.mo.state == S_PLAY_FALL then if p.cmd.buttons & BT_SPIN then p.mo.state = S_PLAY_ROLL p.pflags = $ |(PF_JUMPED)|(PF_SPINNING) P_SetObjectMomZ(p.mo, -15*FRACUNIT, false) P_SpawnThokMobj(p) p.prevmomz = p.mo.momz p.powers[pw_strong] = STR_STOMP|STR_HEAVY p.bounceupready = 1 end end if (p.mo.eflags & MFE_JUSTHITFLOOR) > 0 then if p.bounceupready == 1 then p.mo.state = S_PLAY_JUMP p.pflags = $ |(PF_JUMPED)|(PF_SPINNING) P_SetObjectMomZ(p.mo, abs(p.prevmomz), false) S_StartSound(p.mo, sfx_bnce2) p.powers[pw_strong] = STR_STOMP|STR_HEAVY p.bounceupready = 0 end end end end)