diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-03-21 19:44:11 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2013-03-25 20:32:37 +0100 |
commit | 4e9e0ac87b4dc16f19ac4f930d52c4cc0a2c6f64 (patch) | |
tree | 1b77436b4623c8c1fc4419758e623753899fd818 /src/game-server/actor.h | |
parent | 7aeb3b4a6c34a8f679719c207e51394d7e48828b (diff) | |
download | manaserv-4e9e0ac87b4dc16f19ac4f930d52c4cc0a2c6f64.tar.gz manaserv-4e9e0ac87b4dc16f19ac4f930d52c4cc0a2c6f64.tar.bz2 manaserv-4e9e0ac87b4dc16f19ac4f930d52c4cc0a2c6f64.tar.xz manaserv-4e9e0ac87b4dc16f19ac4f930d52c4cc0a2c6f64.zip |
Changed NPC to an NpcComponent added to a Being
Diffstat (limited to 'src/game-server/actor.h')
-rw-r--r-- | src/game-server/actor.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/game-server/actor.h b/src/game-server/actor.h index 13d4af55..83b2c0fe 100644 --- a/src/game-server/actor.h +++ b/src/game-server/actor.h @@ -54,7 +54,8 @@ class Actor : public Entity mUpdateFlags(0), mPublicID(65535), mSize(0), - mWalkMask(0) + mWalkMask(0), + mBlockType(BLOCKTYPE_NONE) {} ~Actor(); @@ -126,16 +127,20 @@ class Actor : public Entity { return mWalkMask; } /** + * Gets the way the actor blocks pathfinding for other actors. + */ + BlockType getBlockType() const + { return mBlockType; } + + void setBlockType(BlockType blockType) + { mBlockType = blockType; } + + /** * Overridden in order to update the walkmap. */ virtual void setMap(MapComposite *map); protected: - /** - * Gets the way the actor blocks pathfinding for other actors. - */ - virtual BlockType getBlockType() const - { return BLOCKTYPE_NONE; } /** Delay until move to next tile in miliseconds. */ unsigned short mMoveTime; @@ -150,6 +155,7 @@ class Actor : public Entity unsigned char mSize; /**< Radius of bounding circle. */ unsigned char mWalkMask; + BlockType mBlockType; }; #endif // ACTOR_H |