Пример #1
0
 void FollowPath()
 {
     if (m_updatePathRate <= 0 || !m_entity.FollowingPath)
     {
         if (m_waypointTracker.Target != null)
         {
             if (m_entity.LockedNode != null)
             {
                 m_entity.LockedNode.Resident = null;
                 m_entity.LockedNode          = null;
             }
             m_entity.ServerCalculatePath(new Vector2(m_waypointTracker.GridPosition.x + XOffset, m_waypointTracker.GridPosition.y));
             m_updatePathRate = GameDataManager.instance.GlobalConfig.m_pathUpdateRate;
         }
     }
 }