if global.target_door_id != -1
{
    with(oDoor)
	{
        if door_id == global.target_door_id
		{
            other.x = x;
            other.y = y;
			global.door_direction = door_direction;
        }
    }
	state = state_exit_door;
	enter_room_timer = enter_room_timer_max;
	
	if global.door_direction == "UP"
	{
		y_spd = jump_spd;
	}
}
else
{
	with(oSavePoint)
	{
		if uuid = global.save_data.world.current_savepoint
		{
			global.player.x = x;
			global.player.y = y;
		}
	}
	camera_snap();
}

if global.save_data.player.corpse.targetRoom == room
	icl(oEnemyCorpse,
	global.save_data.player.corpse.xPos,
	global.save_data.player.corpse.yPos);