diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game-server/mapmanager.cpp | 3 | ||||
-rw-r--r-- | src/game-server/mapmanager.hpp | 8 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/game-server/mapmanager.cpp b/src/game-server/mapmanager.cpp index de752c00..3044d350 100644 --- a/src/game-server/mapmanager.cpp +++ b/src/game-server/mapmanager.cpp @@ -102,8 +102,7 @@ void MapManager::deinitialize() MapComposite *MapManager::getMap(int mapId) { Maps::iterator i = maps.find(mapId); - assert(i != maps.end()); - return i->second; + return (i != maps.end()) ? i->second : NULL; } void MapManager::raiseActive(int mapId) diff --git a/src/game-server/mapmanager.hpp b/src/game-server/mapmanager.hpp index 432b0b1a..5abc51dc 100644 --- a/src/game-server/mapmanager.hpp +++ b/src/game-server/mapmanager.hpp @@ -36,7 +36,7 @@ namespace MapManager /** * Loads map reference file and prepares maps. */ - void initialize(std::string const &); + void initialize(std::string const &mapReferenceFile); /** * Destroy loaded maps. @@ -45,8 +45,10 @@ namespace MapManager /** * Returns the requested map. + * + * @return the requested map, or NULL if no map with the given ID exists. */ - MapComposite *getMap(int); + MapComposite *getMap(int mapId); /** * Returns all the maps. @@ -56,7 +58,7 @@ namespace MapManager /** * Sets the activity status of the map. */ - void raiseActive(int); + void raiseActive(int mapId); } #endif |