summaryrefslogtreecommitdiffstats
path: root/src/game-server/mapmanager.cpp
diff options
context:
space:
mode:
authorGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-08-27 21:32:48 +0000
committerGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-08-27 21:32:48 +0000
commitc4a2cd54d72f776d6e37eae7a8c67caa81269f4f (patch)
tree66c1b9c179d1d8b8b87a4d1c45fa81ac8cae5b9d /src/game-server/mapmanager.cpp
parent0161bb419930e6ab2893410c64edab0102e4b761 (diff)
downloadmanaserv-c4a2cd54d72f776d6e37eae7a8c67caa81269f4f.tar.gz
manaserv-c4a2cd54d72f776d6e37eae7a8c67caa81269f4f.tar.xz
manaserv-c4a2cd54d72f776d6e37eae7a8c67caa81269f4f.zip
Removed extensions from map names.
Diffstat (limited to 'src/game-server/mapmanager.cpp')
-rw-r--r--src/game-server/mapmanager.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/game-server/mapmanager.cpp b/src/game-server/mapmanager.cpp
index ab0d0fe..713bd2c 100644
--- a/src/game-server/mapmanager.cpp
+++ b/src/game-server/mapmanager.cpp
@@ -116,8 +116,13 @@ void MapManager::raiseActive(int mapId)
return;
}
- std::string const &file = composite->getName();
- MapReader::readMap("maps/" + file, composite);
+ std::string file = "maps/" + composite->getName() + ".tmx";
+ ResourceManager *resman = ResourceManager::getInstance();
+ if (!resman->exists(file))
+ {
+ file += ".gz";
+ }
+ MapReader::readMap(file, composite);
LOG_INFO("Activated map \"" << file << "\" (id " << mapId << ")");
// Add some testing stuff