diff options
Diffstat (limited to 'src/game-server/mapmanager.cpp')
-rw-r--r-- | src/game-server/mapmanager.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/game-server/mapmanager.cpp b/src/game-server/mapmanager.cpp index bee43585..ab9b2dc5 100644 --- a/src/game-server/mapmanager.cpp +++ b/src/game-server/mapmanager.cpp @@ -70,7 +70,7 @@ int MapManager::initialize(const std::string &mapReferenceFile) std::string name = XML::getProperty(node, "name", std::string()); // Test id and map name - if (id != 0 && !name.empty()) + if (id > 0 && !name.empty()) { // Testing if the file is actually in the maps folder std::string file = std::string("maps/") + name + ".tmx"; @@ -89,6 +89,18 @@ int MapManager::initialize(const std::string &mapReferenceFile) ++loadedMaps; } } + else + { + if (name.empty()) + { + LOG_WARN("Invalid unnamed map Id: " << id << '.'); + } + else + { + LOG_WARN("Invalid map Id: " << id << " for map: " + << name << '.'); + } + } } if (loadedMaps > 0) |