local function mometumjumpthok(p)
	if p.mo.skin == "frontiersclassic"
	and not (p.pflags & PF_THOKKED)
	and p.canspawnthering == true
	and p.charability == CA_NONE
		P_Thrust(p.mo, p.mo.angle, p.actionspd)
		P_SetObjectMomZ(p.mo, 12*FRACUNIT)
		local jumpthokring = P_SpawnMobjFromMobj(p.mo, 0, 0, 0, MT_JUMPTHOKRING)
		jumpthokring.color = p.mo.color
		jumpthokring.angle = p.cmd.angleturn << 16 + R_PointToAngle2(0, 0, p.cmd.forwardmove*FRACUNIT, -p.cmd.sidemove*FRACUNIT) + ANGLE_90
		jumpthokring.scale = p.mo.scale
		jumpthokring.destscale = p.mo.scale
		jumpthokring.tics = 3
		S_StartSound(p.mo, sfx_thok)
		p.canspawnthering = false
		p.pflags = $|PF_THOKKED
	end
end

addHook("AbilitySpecial", mometumjumpthok)

local function thoktrail(p)
	if p.mo.skin == "frontiersclassic"
	and (p.pflags & PF_THOKKED)
		local thoktrail = P_SpawnMobjFromMobj(p.mo, 0, 0, 0, MT_THOK)
		thoktrail.color = p.mo.color
		thoktrail.fuse = 5
	end
end

addHook("PlayerThink", thoktrail)
	
local function givememyringbackplease(p)
	if p.mo.skin == "frontiersclassic"
	and P_IsObjectOnGround(p.mo)
		p.canspawnthering = true
	end
end

addHook("PlayerThink", givememyringbackplease)