-- Background: Storehouse door
function obj138init()
	if (obj.dir() == 2) then
		obj.x(obj.x() - TILE*FRACUNIT/2)
	else
		obj.x(obj.x() + TILE*FRACUNIT/2)
	end
end

function obj138()
	if (obj.anim() == 10) then
		if (obj.tics() == 0) then
			sfx(26)
			if (obj.dir() == 2) then
				obj.x(obj.x()+FRACUNIT)
			end
		end
		if (obj.duration() > 9999) then
			obj.destroy()
		end
	end
end
