//my ass is on fire aaaaaah -pizzano
addHook("ShouldDamage", function(target, inflictor, source, damage, damagetype)
	if target and target.valid
	and target.player and target.player.valid
	and target.player.pizzanoreal
	and (target.eflags & MFE_TOUCHLAVA)
	and (damagetype & DMG_FIRE)
	and not (damagetype & DMG_INSTAKILL)
	    if not CheckCel(target.player, FRACUNIT)
		P_SetObjectMomZ(target, 20*FRACUNIT)
		end
		S_StartSound(target, sfx_pnuch)
		target.player.assonfire = true
		target.player.state = S_PZNO_FIREASS
		target.player.machxdtimerr = 0
		return false
	end
    if target and target.valid
	and target.player and target.player.valid
	and target.player.pizzanoreal
	and (damagetype & DMG_FIRE)
	and not (damagetype & DMG_INSTAKILL)
	and target.player.assonfire
	return false
	end
	
end)

addHook("ThinkFrame", function()
for player in players.iterate do
if player.assonfire == nil
player.assonfire = false
end
if player.pizzanoreal

    if player.assonfire
	and player.mo.state ~= S_PZNO_FIREASS
	and not P_IsObjectOnGround(player.mo)
		player.mo.state = S_PZNO_FIREASS
		player.machxdtimerr = 0
end
     if player.assonfire
	 and P_IsObjectOnGround(player.mo)
	 and player.mo.state ~= S_PZNO_FIREASS_LAND
	 and player.mo.state ~= S_PLAY_STND
	 player.mo.state = S_PZNO_FIREASS_LAND
	 player.machxdtimerr = 0
	 P_InstaThrust(player.mo, player.mo.angle, 16*FRACUNIT)
end
     if player.assonfire
	 and P_IsObjectOnGround(player.mo)
	 and player.mo.state == S_PZNO_FIREASS_LAND
	 player.pflags = $|PF_FULLSTASIS
	 player.fireonassgrounded = $+1
	 else
	 player.fireonassgrounded = 0
end
     if player.assonfire
	 and P_IsObjectOnGround(player.mo)
	 and player.mo.state == S_PZNO_FIREASS_LAND
	 and  player.fireonassgrounded >= 15
	 player.mo.state = S_PLAY_STND
	 player.fireonassgrounded = 0
end
    if player.assonfire
	 and player.mo.state == S_PLAY_STND
	 player.assonfire = false
	 player.pflags = $ & ~PF_FULLSTASIS
end
end
end
end)
