void stalker_movement_manager_obstacles::build_level_path					()
{
#ifndef MASTER_GOLD
	if (!psAI_Flags.test(aiObstaclesAvoiding)) {
		inherited::build_level_path	();
		return;
	}
#endif // MASTER_GOLD

#ifdef DEBUG
	CTimer							timer;
	timer.Start						();
#endif // DEBUG

	if (m_last_dest_vertex_id != level_path().dest_vertex_id())
		remove_query_objects		(object().Position(),5.f);

	m_last_fail_time				= 0;

	m_failed_to_build_path			= false;
//	Msg								("[%6d] m_failed_to_build_path = %s (stalker_movement_manager_obstacles::build_level_path)",Device.dwTimeGlobal,m_failed_to_build_path ? "true" : "false");

	save_current_state				();
	m_static_obstacles.inactive_query().copy			(m_static_obstacles.active_query());
	m_static_obstacles.inactive_query().update_objects	(object().Position(),10000.f);

#ifndef MASTER_GOLD
	if (!psAI_Flags.test(aiObstaclesAvoidingStatic))
		m_dynamic_obstacles.inactive_query().copy		(m_dynamic_obstacles.active_query());
#endif // MASTER_GOLD

	do {
		if (m_failed_to_build_path)
			break;

		inherited::build_level_path	();

		if (level_path().failed()) {
			m_static_obstacles.clear();
			m_saved_current_iteration.clear	();

			level_path().invalidate_failed_info	();
			
			inherited::build_level_path	();
			
			if (level_path().failed()) {
#ifndef MASTER_GOLD
				Msg					("! level_path().failed() during navigation");
#endif // #ifndef MASTER_GOLD
				break;
			}
		}
	}
	while (!simulate_path_navigation());

	m_last_dest_vertex_id			= level_path().dest_vertex_id();
//	Msg								("[%6d][%6d][%s][%f] build_level_path",Device.dwFrame,Device.dwTimeGlobal,*object().cName(),timer.GetElapsed_sec()*1000.f);
}
示例#2
0
文件: sudoku.c 项目: rushi4444/sudoku
void assume()
{
	int allright,row,colum,count;
	save_current_state();
	for(row=0;row<9;row++)
		for(colum=0;colum<9;colum++)
			for(count=1;count<10;count++)
				if(node[row][colum].check[count]==EMPTY)
				{
					st_node(row,colum,count);
					if(0==assume1())
						break;
				}
}