freeslot(
"sfx_woaga2",
"sfx_eventb",
"sfx_wackyb",
"sfx_speeup",
"sfx_ptnuse",
"sfx_wpnuse",
"SPR_POTN")

freeslot("MT_POTION_NOTICE")
freeslot("S_POTION_FOLLOW")

sfxinfo[sfx_woaga2].caption = "Secret Found!"
sfxinfo[sfx_wackyb].caption = "Wacky Workbench Bouncer"
sfxinfo[sfx_eventb].caption = "Event Time!"
sfxinfo[sfx_speeup].caption = "Let's speed up!"
sfxinfo[sfx_ptnuse].caption = "Used Potion"
sfxinfo[sfx_wpnuse].caption = "Used Weapon"

local function LooseTossUp(mo)
	local loosejump = P_SpawnMobj((P_RandomRange(1888, 1952)*FRACUNIT),(P_RandomRange(-480,-554)*FRACUNIT),-672*FRACUNIT,MT_FLINGRING)
		loosejump.momz = (P_RandomRange(17,40)*FRACUNIT)
		loosejump.angle = ANG1*(P_RandomRange(0,360))
		loosejump.fuse = 5*TICRATE
		P_InstaThrust(loosejump,loosejump.angle,(P_RandomRange(1,70)*FRACUNIT))
	local loosejump = P_SpawnMobj((P_RandomRange(1888, 1952)*FRACUNIT),(P_RandomRange(-480,-554)*FRACUNIT),200*FRACUNIT,MT_FLINGRING)
		loosejump.momz = (P_RandomRange(-1,-25)*FRACUNIT)
		loosejump.angle = ANG1*(P_RandomRange(0,360))
		loosejump.fuse = 5*TICRATE
		P_InstaThrust(loosejump,loosejump.angle,(P_RandomRange(1,70)*FRACUNIT))

end

addHook("LinedefExecute", LooseTossUp, "RINGUP")

addHook("IntermissionThinker", function()
	if not mapheaderinfo[gamemap].casinover return end
	S_ChangeMusic("ACTALW", false, consoleplayer)
end)

addHook("MapLoad", function()
	if not mapheaderinfo[gamemap].casinover return end
	if gametype ~= GT_COOP
		for players in players.iterate
			COM_BufInsertText(player, "tunes MP9BJM")
		end
	else
		for players in players.iterate
			COM_BufInsertText(player, "tunes MP9VBJ")
		end
	end
end)