Пример #1
0
        public override void UpdateAfterSimulation()
        {
            base.UpdateAfterSimulation();

            if (MyPerGameSettings.EnableAi)
            {
                PerformBotRemovals();

                AgentSpawnData newBotData;
                while (m_processQueue.TryDequeue(out newBotData))
                {
                    m_agentsToSpawn[newBotData.BotId] = newBotData;
                    Sync.Players.RequestNewPlayer(newBotData.BotId, MyDefinitionManager.Static.GetRandomCharacterName(), newBotData.AgentDefinition.BotModel);
                }

                ProfilerShort.Begin("Debug draw");
                if (m_debugDrawPathfinding && m_pathfinding != null) 
                    m_pathfinding.DebugDraw();
      
                m_botCollection.DebugDraw();
                DebugDrawBots();
                DrawDebugTarget();
                ProfilerShort.End();
            }
        }
Пример #2
0
        public override void UpdateAfterSimulation()
        {
            base.UpdateAfterSimulation();

            if (MyPerGameSettings.EnableAi)
            {
                if (m_removeQueue.Count > 0)
                {
                    foreach (var playerNumber in m_removeQueue)
                    {
                        MyPlayer player = Sync.Players.TryGetPlayerById(new MyPlayer.PlayerId(MySteam.UserId, playerNumber));
                        Sync.Players.RemovePlayer(player);
                    }
                    m_removeQueue.Clear();
                }

                ProfilerShort.Begin("Debug draw");
                m_pathfinding.DebugDraw();
                m_botCollection.DebugDraw();
                ProfilerShort.End();
            }
        }