diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2006-11-26 16:44:23 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2006-11-26 16:44:23 +0000 |
commit | 42f18ad42f3b908d6af849a74273a58840fa67a1 (patch) | |
tree | 40e3979cab1de064f012ee4c5c0b683da736be9d | |
parent | bcfa72e0341c911bf6c020765d1ffe16ccfb72e1 (diff) | |
download | mana-client-42f18ad42f3b908d6af849a74273a58840fa67a1.tar.gz mana-client-42f18ad42f3b908d6af849a74273a58840fa67a1.tar.bz2 mana-client-42f18ad42f3b908d6af849a74273a58840fa67a1.tar.xz mana-client-42f18ad42f3b908d6af849a74273a58840fa67a1.zip |
Remove unnecessary check for file existance, loading will just fail with the correct error message.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | src/resources/resourcemanager.cpp | 9 |
2 files changed, 8 insertions, 8 deletions
@@ -1,4 +1,9 @@ -2006-11-26 Bjørn Lindeijer <bjorn@lindeijer.nl> +2006-11-26 Björn Steinbrink <B.Steinbrink@gmx.de> + + * src/resources/resourcemanager.cpp: Remove unnecessary check for + file existance, loading will just fail with the correct error message. + +2006-11-26 Bjørn Lindeijer <bjorn@lindeijer.nl> * src/game.cpp, src/being.cpp, src/net/beinghandler.cpp, src/being.h: Made Being::mDirection protected, forcing the use of setDirection. diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp index f9a57e87..aabd1ccc 100644 --- a/src/resources/resourcemanager.cpp +++ b/src/resources/resourcemanager.cpp @@ -282,18 +282,13 @@ ResourceManager::deleteInstance() void* ResourceManager::loadFile(const std::string &fileName, int &fileSize) { - // If the file doesn't exist indicate failure - if (!PHYSFS_exists(fileName.c_str())) { - logger->log("Warning: %s not found!", fileName.c_str()); - return NULL; - } - // Attempt to open the specified file using PhysicsFS PHYSFS_file *file = PHYSFS_openRead(fileName.c_str()); // If the handler is an invalid pointer indicate failure if (file == NULL) { - logger->log("Warning: %s failed to load!", fileName.c_str()); + logger->log("Warning: Failed to load %s: %s", + fileName.c_str(), PHYSFS_getLastError()); return NULL; } |