summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--src/resources/resourcemanager.cpp9
2 files changed, 8 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 96e33a15..4c4bd735 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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;
}