/// Passive Ability: No Air Walk
// removes the air walk making you change to your falling state

// CUSTOMIZE SECTION START
local skin = "sbag2025" // your character here
local sound = sfx_wdjump // the sound of the state change
// CUSTOMIZE SECTION END PROCCED BELOW IF YOU KNOW WHAT YOUR DOING


addHook("PlayerThink", function(player)
	if player.mo and player.mo.skin == skin
	and not P_IsObjectOnGround(player.mo)
		if player.mo.state == S_PLAY_WALK
		or player.mo.state == S_PLAY_RUN
		or player.mo.state == S_PLAY_DASH
		or player.mo.state == S_PLAY_ROLL
		or player.mo.state == S_PLAY_PAIN
			player.mo.state = S_PLAY_ROLL
			player.pflags = $ |PF_JUMPED
			S_StartSound(player.mo, sound)
		end
	end
end)