function OnWarpEnter() 
	SetMarker("cs\\Warp_0021.wp" , 0 , 0) 

	if not OpenMachineW21 then
		StartAnimationPart("zma1", 0, 1, -1, false)
--		AnimationSetToStart("zma1",false)
	elseif OpenMachineW21 then
		StartAnimationPart("zma1", 1, 2, -1, false)
--		AnimationSetToEnd("zma1",false)
	end

	if not CoffreW221 then
		AnimationSetToStart("zya1")
	else
		AnimationSetToEnd("zya1")
	end

	-- manivelle du calculateur
	AnimationSetToStart("zoa1",false)

--------------------------------------------------------------------------- Puzzle des planètes
		if PuzzlePlanetSolved then
			PutObject("zwa1",false)
		end
		
		if PuzzlePlanetPut then
			AnimationSetToStart("vzan",true)
		end
--------------------------------------------------------------------------- 

--------------------------------------------------------------------------- Puzzle du thème astral
--		if PUZZLE_ASTROCHART_SOLVED then
--			AnimationSetToEnd("zna1",true)
--		else
			AnimationSetToStart("zaa1",false)
			AnimationSetToStart("zca1",false)
			AnimationSetToStart("zea1",false)
			AnimationSetToStart("zga1",false)
			AnimationSetToStart("zia1",false)
			AnimationSetToStart("zka1",false)
--		end
--------------------------------------------------------------------------- 
	if ETAT_DAY == "D4" then 
		PutObject("zoa1",false)
	end
end

function OnWarpLeave()
end

function OnWarpObjectHit(objectName)

	if objectName == "3D\\cs\\Warp_0021.wp" then 
		ChangeWarp(objectName)
	end
end
