move the ResourceManager init back to where it was, to prevent problems

This commit is contained in:
Thijs Wenker 2017-06-29 00:52:51 +02:00
parent 794495c197
commit 93679f7c3b
4 changed files with 7 additions and 5 deletions

View file

@ -62,6 +62,8 @@ Agent::Agent(ReceivedMessage& message) :
_entityEditSender.setPacketsPerSecond(DEFAULT_ENTITY_PPS_PER_SCRIPT);
DependencyManager::get<EntityScriptingInterface>()->setPacketSender(&_entityEditSender);
DependencyManager::set<ResourceManager>();
DependencyManager::registerInheritance<SpatialParentFinder, AssignmentParentFinder>();
DependencyManager::set<ResourceCacheSharedItems>();
@ -79,7 +81,6 @@ Agent::Agent(ReceivedMessage& message) :
DependencyManager::set<RecordingScriptingInterface>();
DependencyManager::set<UsersScriptingInterface>();
DependencyManager::set<ResourceManager>();
auto& packetReceiver = DependencyManager::get<NodeList>()->getPacketReceiver();

View file

@ -31,9 +31,9 @@ EntityServer::EntityServer(ReceivedMessage& message) :
OctreeServer(message),
_entitySimulation(NULL)
{
DependencyManager::set<ResourceManager>();
DependencyManager::set<ResourceCacheSharedItems>();
DependencyManager::set<ScriptCache>();
DependencyManager::set<ResourceManager>();
auto& packetReceiver = DependencyManager::get<NodeList>()->getPacketReceiver();
packetReceiver.registerListenerForTypes({ PacketType::EntityAdd, PacketType::EntityEdit, PacketType::EntityErase, PacketType::EntityPhysics },

View file

@ -494,7 +494,6 @@ public:
DependencyManager::set<PathUtils>();
DependencyManager::set<SceneScriptingInterface>();
DependencyManager::set<TestActionFactory>();
DependencyManager::set<ResourceManager>();
}
QTestWindow() {
@ -520,6 +519,8 @@ public:
_octree->getTree()->setSimulation(simpleSimulation);
_entitySimulation = simpleSimulation;
}
DependencyManager::set<ResourceManager>();
setFlags(Qt::MSWindowsOwnDC | Qt::Window | Qt::Dialog | Qt::WindowMinMaxButtonsHint | Qt::WindowTitleHint);
_size = QSize(800, 600);

View file

@ -289,7 +289,6 @@ public:
DependencyManager::set<GeometryCache>();
DependencyManager::set<ModelCache>();
DependencyManager::set<PathUtils>();
DependencyManager::set<ResourceManager>();
}
struct TextureLoad {
@ -329,7 +328,8 @@ public:
installEventFilter(this);
QThreadPool::globalInstance()->setMaxThreadCount(2);
QThread::currentThread()->setPriority(QThread::HighestPriority);
QThread::currentThread()->setPriority(QThread::HighestPriority);
DependencyManager::set<ResourceManager>();
setFlags(Qt::MSWindowsOwnDC | Qt::Window | Qt::Dialog | Qt::WindowMinMaxButtonsHint | Qt::WindowTitleHint);
_size = QSize(800, 600);
_renderThread._size = _size;