addHook("ThinkFrame", do
	for player in players.iterate
		//really fast time
		if (player.mo and player.mo.skin == "jimmyharold")
			if not player.powers[pw_invulnerability]
			and not player.powers[pw_extralife]
			and not player.powers[pw_super]
			and not (player.exiting)
				if player.powers[pw_sneakers] then
					player.mo.state = S_PLAY_SNEAKERWORRY
					P_InstaThrust(player.mo ,player.mo.angle, (36*FRACUNIT))
				end
			end
		end
	end
end)

//climbing
addHook("MobjMoveBlocked", function(mo)
    if not mo.player then return end
	if mo.skin == "jimmyharold" then
		mo.jimwallrun = $ or 0
		if (mo.player.cmd.buttons & BT_CUSTOM1) 
		and mo.jimwallrun <= 3*TICRATE then
			P_InstaThrust(mo ,mo.angle, (10*FRACUNIT))
			if P_GetPlayerControlDirection(mo.player) == 0 then
				mo.momz = 0
				if mo.state != S_PLAY_RIDE then
					mo.state = S_PLAY_RIDE
				end
			elseif P_GetPlayerControlDirection(mo.player) == 1 then
				P_SetObjectMomZ(mo, 7*FRACUNIT, false)
				P_SpawnGhostMobj(mo)
				mo.jimwallrun = $ + 1
				if mo.state != S_PLAY_ROLL then
					mo.state = S_PLAY_ROLL
				end
			elseif P_GetPlayerControlDirection(mo.player) == 2 then
				P_SetObjectMomZ(mo,(0 - 14*FRACUNIT), false)
				P_SpawnGhostMobj(mo)
				mo.jimwallrun = $ + 1
				if mo.state != S_PLAY_FALL then
					mo.state = S_PLAY_FALL
				end
			end
		end
	end
end)

addHook("MobjThinker", function(mo)
    if not mo.player then return end
	if mo.skin == "jimmyharold" then
		mo.jimwallrun = $ or 0
		if P_IsObjectOnGround(mo) then
			mo.jimwallrun = 0
		elseif (mo.player.cmd.buttons & BT_CUSTOM1) 
		and mo.jimwallrun <= 3*TICRATE 
		and mo.jimwallrun >= 1 then
			P_InstaThrust(mo ,mo.angle, (10*FRACUNIT))
		end
	end
end)

//BoNk
addHook("MobjMoveBlocked", function(mo)
    if not mo.player then return end
	if mo.skin == "jimmyharold" then
		mo.jimwallrun = $ or 0
		if mo.player.speed >= 35*FRACUNIT then
			P_InstaThrust(mo ,mo.angle, ((0 - mo.player.speed)+20*FRACUNIT))
			P_SetObjectMomZ(mo, 7*FRACUNIT, false)
			mo.state = S_PLAY_PAIN
		end
	end
end)
