diff options
author | Philipp Sehmisch <tmw@crushnet.org> | 2007-06-30 15:01:50 +0000 |
---|---|---|
committer | Philipp Sehmisch <tmw@crushnet.org> | 2007-06-30 15:01:50 +0000 |
commit | d7e84be1d3dc935f47cefc0f600ced74f37e46fb (patch) | |
tree | f535b6b4130994a9162c48f8c556b0dd5ddc9a5f /src/game-server/thing.hpp | |
parent | fd392c16c0a1236ca4ea124b5ebbd309df1c5064 (diff) | |
download | manaserv-d7e84be1d3dc935f47cefc0f600ced74f37e46fb.tar.gz manaserv-d7e84be1d3dc935f47cefc0f600ced74f37e46fb.tar.bz2 manaserv-d7e84be1d3dc935f47cefc0f600ced74f37e46fb.tar.xz manaserv-d7e84be1d3dc935f47cefc0f600ced74f37e46fb.zip |
Implemented basic monster AI and fixed a stability problem caused by the spawn areas.
Diffstat (limited to 'src/game-server/thing.hpp')
-rw-r--r-- | src/game-server/thing.hpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/game-server/thing.hpp b/src/game-server/thing.hpp index 547885c4..1d95c23f 100644 --- a/src/game-server/thing.hpp +++ b/src/game-server/thing.hpp @@ -23,6 +23,8 @@ #ifndef _TMWSERV_THING_H_ #define _TMWSERV_THING_H_ +class MapComposite; + /** * Object type enumeration. */ @@ -50,7 +52,8 @@ class Thing * Constructor. */ Thing(int type) - : mType(type) + : mMap(NULL), + mType(type) {} /** @@ -100,11 +103,20 @@ class Thing { return mMapId; } /** - * Sets the map this thing is located on. + * Sets the map ID this thing is located on. */ void setMapId(int mapId) { mMapId = mapId; } + /** + * Sets the map this thing is located on. + */ + void setMap(MapComposite *map) + { mMap = map; } + + protected: + MapComposite *mMap; /**< Map the thing is on */ + private: unsigned short mMapId; /**< ID of the map this thing is on. */ char mType; /**< Type of this thing. */ |