Esempio n. 1
0
        public void Update100()
        {
            FillAirDensity();
            if (m_grid.IsStatic || m_airDensity == 0f)
            {
                return;
            }

            if (m_profileAt <= Globals.UpdateCount)
            {
                Log.DebugLog("Starting profile task", Logger.severity.DEBUG);
                m_profileAt   = ulong.MaxValue;
                m_profileTask = new ProfileTask(m_grid.EntityId);
                RemoteTask.StartTask(m_profileTask, ((MyCubeGrid)m_grid).CubeBlocks.Count < 100);
                return;
            }
            if (m_profileTask != null && m_profileTask.CurrentStatus > RemoteTask.Status.Started)
            {
                if (m_profileTask.CurrentStatus == RemoteTask.Status.Success)
                {
                    DragCoefficient = m_profileTask.DragCoefficient;
                    for (int i = 0; i < 6; ++i)
                    {
                        Log.DebugLog("Direction: " + (Base6Directions.Direction)i + ", DragCoefficient: " + DragCoefficient[i], Logger.severity.DEBUG);
                    }
                }
                m_profileTask = null;
            }
        }