diff options
author | Erik Schilling <ablu.erikschilling@googlemail.com> | 2012-08-31 23:41:56 +0200 |
---|---|---|
committer | Erik Schilling <ablu.erikschilling@googlemail.com> | 2012-09-02 13:32:29 +0200 |
commit | 6a584f49867811e2c122a3eb01111b325d1ed6a8 (patch) | |
tree | c7317fcda140f0692704bf50fff0aaa49150d21c /src/game-server/mapmanager.cpp | |
parent | e6b683cf3b9b938c38c19c75487d3afc7472d78e (diff) | |
download | manaserv-6a584f49867811e2c122a3eb01111b325d1ed6a8.tar.gz manaserv-6a584f49867811e2c122a3eb01111b325d1ed6a8.tar.bz2 manaserv-6a584f49867811e2c122a3eb01111b325d1ed6a8.tar.xz manaserv-6a584f49867811e2c122a3eb01111b325d1ed6a8.zip |
Allow map objects as warp targets
This patch allows map objects as warp targets.
For use:
- Create object in tiled with type="WARP_DEST"
- Set name to anything you want
- Create usual WARP object
- Leave out the DEST_{X,Y} part
- Add DEST_NAME property with the name of the first object
This requires the game server to parse all maps at startup.
Change is tested.
Reviewed-by: bjorn.
Diffstat (limited to 'src/game-server/mapmanager.cpp')
-rw-r--r-- | src/game-server/mapmanager.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/game-server/mapmanager.cpp b/src/game-server/mapmanager.cpp index 4d7b25b4..b3b2931d 100644 --- a/src/game-server/mapmanager.cpp +++ b/src/game-server/mapmanager.cpp @@ -80,6 +80,9 @@ int MapManager::initialize(const std::string &mapReferenceFile) if (mapFileExists) { maps[id] = new MapComposite(id, name); + if (!maps[id]->readMap()) + LOG_FATAL("Failed to load map \"" << name << "\"!"); + ++loadedMaps; } } |