public static bool HasDCMedian(NetInfo netInfo)
 {
     foreach (NetInfo.Node nodeInfo in netInfo.m_nodes)
     {
         bool isDC = nodeInfo.m_directConnect && nodeInfo.m_connectGroup != 0;
         if (isDC && DirectConnectUtil.IsMedian(nodeInfo, netInfo))
         {
             return(true);
         }
     }
     return(false);
 }
        public static void FixMaxTurnAngles()
        {
            int loadedCount = PrefabCollection <NetInfo> .LoadedCount();

            for (uint i = 0; i < loadedCount; ++i)
            {
                try {
                    NetInfo netInfo = PrefabCollection <NetInfo> .GetLoaded(i);

                    if (netInfo == null)
                    {
                        Log.Warning("Bad prefab with null info");
                        continue;
                    }
                    else if (netInfo.m_netAI == null)
                    {
                        Log.Warning("Bad prefab with null info.m_NetAI");
                        continue;
                    }
                    if (netInfo.m_connectGroup == NetInfo.ConnectGroup.None)
                    {
                        continue;
                    }
                    bool hasTracks = false;
                    foreach (var nodeInfo in netInfo.m_nodes)
                    {
                        bool isMedian = DirectConnectUtil.IsMedian(nodeInfo: nodeInfo, netInfo: netInfo);
                        hasTracks = nodeInfo.m_directConnect && !isMedian;
                    }
                    if (!hasTracks)
                    {
                        if (!OriginalTurnAngles.ContainsKey(netInfo))
                        {
                            OriginalTurnAngles[netInfo] = netInfo.m_maxTurnAngle;
                        }
                        netInfo.SetMaxTurnAngle(180);
                    }
                }
                catch (Exception e) {
                    Log.Error(e.ToString());
                }
            } // end for
        }