mirror of
https://github.com/glest/glest-source.git
synced 2025-09-25 23:19:07 +02:00
- do not load models or sound files in headless server mode
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user