- do not load models or sound files in headless server mode

This commit is contained in:
Mark Vejvoda
2011-09-26 05:29:52 +00:00
parent f5c7eff49c
commit 5a79cad34b
5 changed files with 46 additions and 12 deletions

View File

@@ -34,6 +34,8 @@ namespace Shared{ namespace Graphics{
using namespace Util;
bool Model::masterserverMode = false;
// =====================================================
// class Mesh
// =====================================================
@@ -777,6 +779,9 @@ void Model::load(const string &path, bool deletePixMapAfterLoad,
this->sourceLoader = (sourceLoader != NULL ? *sourceLoader : "");
this->fileName = path;
if(this->masterserverMode == true) {
return;
}
string extension= path.substr(path.find_last_of('.') + 1);
if(extension=="g3d" || extension=="G3D") {
loadG3d(path,deletePixMapAfterLoad,loadedFileList, this->sourceLoader);