freeslot("S_PLAY_SPECCYHUGS", "SPR2_HUG_", "S_SoundPlaying", "sfx_bdiv", "sfx_bfuc2", "sfx_bwina", "sfx_baoa1", "sfx_baof1", "sfx_bred1", "sfx_bwin1", "sfx_bwin2", "sfx_bgot1", "sfx_bmed2", "sfx_bmed1", "sfx_bus1", "sfx_bded", "sfx_bfuk1", "sfx_bfuk2", "sfx_bsum1", "sfx_bfuk3", "sfx_baof1", "sfx_bskl2", "sfx_bnop1", "sfx_bmor2", "sfx_bmor1",  "sfx_bnic1", "sfx_bskl3", "sfx_bskl1", "sfx_blv1", "S_PLAY_BDOVE", "S_PLAY_BRISE")
states[S_PLAY_BDOVE] = {SPR_PLAY, SPR2_ROLL|FF_ANIMATE, 1, nil, 0, 0, S_PLAY_BDOVE}
states[S_PLAY_BRISE] = {SPR_PLAY, SPR2_SPNG|FF_ANIMATE, 1, nil, 0, 0, S_PLAY_BDOVE}

//This is for the Hard Drop
addHook("ThinkFrame", function()
for player in players.iterate do
-- initialize custom variables
player.bwaitduration = player.bwaitduration or 20 -- 1 second (35 tics)
player.bwait = player.bwait or false
player.bdivetimer = player.bdivetimer or 0
player.haswaited = player.haswaited or false
player.bdivespeed = player.bdivespeed or 0

if not player.powers[pw_super] then
player.bdivespeed = 6 * FRACUNIT
else
player.bdivespeed = 12 * FRACUNIT
end

if P_IsObjectOnGround(player.mo) then
player.bwait = false -- reset the stalling flag when the player touches down again
player.bdivetimer = 0
player.haswaited = false
end

if player.mo.state == S_PLAY_SPRING then
player.bwait = false -- reset the stalling flag when the player touches down again
player.bdivetimer = 0
player.haswaited = false
end

if player.mo and player.mo.valid  and not (gametype == GT_LTMMURDERMYSTERY) and player.mo.skin == "bob" then

if (player.cmd.buttons & BT_CUSTOM1) and not player.bwait and not player.haswaited and (player.mo.state == S_PLAY_SPRING or S_PLAY_ROLL) and not P_IsObjectOnGround(player.mo) then
player.bwait = true
player.bdivetimer = player.bwaitduration
player.haswaited = true

-- play the start sound effect for stalling
S_StartSound(player.mo, sfx_bhol)
end

if player.bwait then
P_SetObjectMomZ(player.mo, player.bdivespeed)
player.mo.state = S_PLAY_BRISE

player.bdivetimer = player.bdivetimer - 1
if player.bdivetimer >= 1 and player.speed >= 20 * FRACUNIT and not player.powers[pw_super] then
P_InstaThrust(player.mo, player.mo.angle, FixedMul(19 * FRACUNIT, player.mo.scale))
end

if player.bdivetimer <= 0 then
player.bwait = false
P_SetObjectMomZ(player.mo, -30 * FRACUNIT)
P_SpawnThokMobj(player)
player.mo.state = S_PLAY_BDOVE

-- play the end sound effect when stalling ends
S_StartSound(player.mo, sfx_bdiv)
player.mo.state = S_PLAY_BDOVE
end	
end

end
end
end)