Commit bab581ca authored by NTAuthority's avatar NTAuthority

make ModelManager::LoadAllModels into a runnable command

parent fcab6c29
Pipeline #54 skipped
......@@ -6,6 +6,8 @@
#include "TexDict.h"
#include <Console.CommandHelpers.h>
#define MODEL_ID_BASE 0
#define MAX_MODELS 20000
......@@ -95,6 +97,8 @@ private:
std::map <std::string, ModelResource*> basifierLookup;
std::map <std::string, ModelResource*> lodifierLookup;
std::unique_ptr<ConsoleCommand> loadAllModelsCommand;
};
}
\ No newline at end of file
......@@ -16,6 +16,11 @@ ModelManager::ModelManager( streaming::StreamMan& streaming, TextureManager& tex
assert( didRegister == true );
this->models.resize( MAX_MODELS );
this->loadAllModelsCommand = std::make_unique<ConsoleCommand>("load_all_models", [=] ()
{
this->LoadAllModels();
});
}
ModelManager::~ModelManager( void )
......@@ -210,9 +215,6 @@ void ModelManager::LoadAllModels( void )
streaming.Request( model->id );
}
}
// Wait for things to finish ;)
streaming.LoadingBarrier();
}
rw::Object* ModelManager::ModelResource::CloneModel( void )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment