mirror of
https://github.com/glest/glest-source.git
synced 2025-09-27 07:59:00 +02:00
- bugfix to allow headless server to load a texture for new tilesets where they must read it to determine parts.
- converted asserts to exceptions
This commit is contained in:
@@ -63,7 +63,10 @@ static inline std::vector<string> getExtensionsPng() {
|
||||
PNGReader::PNGReader(): FileReader<Pixmap2D>(getExtensionsPng()) {}
|
||||
|
||||
Pixmap2D* PNGReader::read(ifstream& is, const string& path, Pixmap2D* ret) const {
|
||||
assert(GlobalStaticFlags::getIsNonGraphicalModeEnabled() == false);
|
||||
if(GlobalStaticFlags::getIsNonGraphicalModeEnabled() == true) {
|
||||
throw megaglest_runtime_error("Loading graphics in headless server mode not allowed!");
|
||||
}
|
||||
|
||||
//Read file
|
||||
is.seekg(0, ios::end);
|
||||
//size_t length = is.tellg();
|
||||
|
Reference in New Issue
Block a user