summaryrefslogtreecommitdiff
path: root/src/player.h
diff options
context:
space:
mode:
authorPhilipp Sehmisch <tmw@crushnet.org>2008-03-13 07:29:30 +0000
committerPhilipp Sehmisch <tmw@crushnet.org>2008-03-13 07:29:30 +0000
commitfe474eb4fae9d89e3797d0ceaae6613798ce491f (patch)
tree2a91b2f17636ae7b20eea06a28a89942f6f36d39 /src/player.h
parent3a275cc81fe9aa1cb6736cdf12211e13e93cf2cf (diff)
downloadmana-fe474eb4fae9d89e3797d0ceaae6613798ce491f.tar.gz
mana-fe474eb4fae9d89e3797d0ceaae6613798ce491f.tar.bz2
mana-fe474eb4fae9d89e3797d0ceaae6613798ce491f.tar.xz
mana-fe474eb4fae9d89e3797d0ceaae6613798ce491f.zip
Synchronized pathfinding algorithmns with those used by the server to avoid asynchronisation.
Diffstat (limited to 'src/player.h')
-rw-r--r--src/player.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/player.h b/src/player.h
index aff75221..76d6b460 100644
--- a/src/player.h
+++ b/src/player.h
@@ -49,6 +49,8 @@ class Player : public Being
*/
Player(int id, int job, Map *map);
+ virtual ~Player();
+
virtual Type
getType() const;
@@ -113,10 +115,20 @@ class Player : public Being
*/
short getNumberOfGuilds();
+ /**
+ * Gets the way the character is blocked by other objects
+ */
+ virtual unsigned char getWalkMask() const
+ { return 0x82; } // blocked by walls and monsters ( bin 1000 0010)
+
protected:
// Character guild information
std::map<int, Guild*> mGuilds;
-
+ /**
+ * Gets the way the monster blocks pathfinding for other objects
+ */
+ virtual Map::BlockType getBlockType() const
+ { return Map::BLOCKTYPE_CHARACTER; }
private:
Gender mGender;
Uint8 mHairStyle;