Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 877 vs 878 for /trunk/Source Code/Scenes/Scene.cpp

Diff revisions: vs.
  @@ -74,7 +74,7 @@
74 74 _sceneState = MemoryManager_NEW SceneState(*this);
75 75 _input = MemoryManager_NEW SceneInput(*this, _context.input());
76 76 _sceneGraph = MemoryManager_NEW SceneGraph(*this);
77 - _aiManager = MemoryManager_NEW AI::AIManager(*this);
77 + _aiManager = MemoryManager_NEW AI::AIManager(*this, _context.input().parent().taskPool());
78 78 _lightPool = MemoryManager_NEW LightPool(*this, _context.gfx());
79 79 _envProbePool = MemoryManager_NEW SceneEnvironmentProbePool(*this);
80 80
  @@ -919,8 +919,7 @@
919 919 }
920 920
921 921 bool Scene::initializeAI(bool continueOnErrors) {
922 - _aiTask = std::thread(DELEGATE_BIND(&AI::AIManager::update, _aiManager));
923 - setThreadName(&_aiTask, Util::StringFormat("AI_THREAD_SCENE_%s", getName().c_str()).c_str());
922 + _aiManager->initialize();
924 923 return true;
925 924 }
926 925
  @@ -928,8 +927,7 @@
928 927 bool Scene::deinitializeAI(bool continueOnErrors) {
929 928 _aiManager->stop();
930 929 WAIT_FOR_CONDITION(!_aiManager->running());
931 - _aiTask.join();
932 -
930 +
933 931 return true;
934 932 }
935 933
  @@ -994,6 +992,7 @@
994 992 _sceneTimer += deltaTime;
995 993 updateSceneStateInternal(deltaTime);
996 994 _sceneGraph->sceneUpdate(deltaTime, *_sceneState);
995 + _aiManager->update(deltaTime);
997 996 for (U8 i = 0; i < to_U8(_scenePlayers.size()); ++i) {
998 997 U8 playerIndex = _scenePlayers[i]->index();
999 998 findHoverTarget(playerIndex);