void WayPoint::Update(float dt){ //std::cout << "Tott pos: " << m_node->getPosition() << std::endl; if(m_follow_node != NULL) { m_destination = m_follow_node->getPosition(); m_direction = m_destination - m_node->getPosition(); m_follow_node_moving = (m_destination != m_old_destination); m_old_destination = m_destination; } else{ } if (m_direction == Ogre::Vector3::ZERO) { if (NextLocation()) { } } else { UpdateGoal(); //do naaathing //std::cout << "Deque empty: " << m_walk_list.empty() << std::endl; } if (withinDistance(1.0f)){ if(m_follow_node != NULL) { //do nothing for now } else { m_direction = Ogre::Vector3::ZERO; } } };
BTreeConstIterator BTree::begin() { auto x = end(); auto loc = x.NextLocation(); return BTreeConstIterator(pgdb, file, loc.Page, loc.Offset); }