summaryrefslogtreecommitdiff
path: root/src/game-server/thing.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game-server/thing.hpp')
-rw-r--r--src/game-server/thing.hpp16
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. */