summaryrefslogtreecommitdiff
path: root/src/game-server/mapcomposite.h
diff options
context:
space:
mode:
authorErik Schilling <ablu.erikschilling@googlemail.com>2012-08-31 23:41:56 +0200
committerErik Schilling <ablu.erikschilling@googlemail.com>2012-09-02 13:32:29 +0200
commit6a584f49867811e2c122a3eb01111b325d1ed6a8 (patch)
treec7317fcda140f0692704bf50fff0aaa49150d21c /src/game-server/mapcomposite.h
parente6b683cf3b9b938c38c19c75487d3afc7472d78e (diff)
downloadmanaserv-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/mapcomposite.h')
-rw-r--r--src/game-server/mapcomposite.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/game-server/mapcomposite.h b/src/game-server/mapcomposite.h
index 079e5e48..d61f8ce6 100644
--- a/src/game-server/mapcomposite.h
+++ b/src/game-server/mapcomposite.h
@@ -234,6 +234,8 @@ class MapComposite
MapComposite(int id, const std::string &name);
~MapComposite();
+ bool readMap();
+
/**
* Loads the map and initializes the map content. Should only be called
* once!
@@ -253,7 +255,7 @@ class MapComposite
* Returns whether the map is active on this server or not.
*/
bool isActive() const
- { return mMap; }
+ { return mActive; }
/**
* Gets the game ID of this map.
@@ -366,6 +368,7 @@ class MapComposite
void callMapVariableCallback(const std::string &key,
const std::string &value);
+ bool mActive; /**< Status of map. */
Map *mMap; /**< Actual map. */
MapContent *mContent; /**< Entities on the map. */
std::string mName; /**< Name of the map. */