local deathTileSound = ffi.cast("char*", 0x522738)

function main(self)
	if self.State == 0 then
		self.time = 0
		self.DrawFlags.NoDraw = true
		self.State = 1
	end
	if self.State == 1 then
		CameraToClaw()
		self.Flags.AlwaysActive = false
		ffi.copy(deathTileSound, "LEVEL_DEATHTILE")
		self.State = 2
	end
	if self.State == 2 then
		if GetClaw():InMinMax(self) then
			CameraToPoint(GetClaw().X, self.YMin)
			self.Flags.AlwaysActive = true
			PrivateCopyCast("CUSTOM_FALL", 0x522738, true)
			self.time = GetTime() + 1000
		elseif self.Flags.AlwaysActive and GetTime() > self.time then
			self.State = 1
		end
	end
end