diff options
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/client.cpp b/src/client.cpp index e47bce142..504297a6d 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -860,6 +860,25 @@ bool Client::loadMedia(const std::string &data, const std::string &filename) return true; } + const char *model_ext[] = { + ".b3d", ".md2", ".obj", + NULL + }; + name = removeStringEnd(filename, model_ext); + if(name != "") + { + verbosestream<<"Client: Storing model into Irrlicht: " + <<"file \""<<filename<<"\""<<std::endl; + + io::IFileSystem *irrfs = m_device->getFileSystem(); + + // Create an irrlicht memory file + io::IReadFile *rfile = irrfs->createMemoryReadFile(*data_rw, data_rw.getSize(), filename.c_str(), true); + assert(rfile); + //rfile->drop(); + return true; + } + errorstream<<"Client: Don't know how to load file \"" <<filename<<"\""<<std::endl; return false; |