local threedays_soundamount = 6
for i = 0, threedays_soundamount
	freeslot("sfx_FH3DY" + i)
end

//Main thinker
function A_ThreeDaysThinker(mo, var1, var2)
	mo.cusval = $ + 1
	mo.frame = ($ &~ FF_FRAMEMASK) | ((mo.cusval/var2) % var1)
	
	local honk = mo.hprev
	if honk and honk.valid and honk.fuse == TICRATE/2 - 1
	and ((honk.renderflags & RF_DONTDRAW) != RF_DONTDRAW)
		mo.threedays_progression = ($ != nil and $ + 1) or 0
		S_StartSound(nil, sfx_fh3dy1 + (mo.threedays_progression % threedays_soundamount))
	end
end