summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 069172c3..b4f1e042 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -179,6 +179,7 @@ Being::Being():
aspd(350),
m_weapon(0),
m_id(0),
+ map(0),
hairStyle(1), hairColor(1),
speech_time(0),
damage_time(0),
@@ -192,6 +193,14 @@ Being::~Being()
clearPath();
}
+void Being::setDestination(int destX, int destY)
+{
+ if (!map)
+ return;
+
+ setPath(map->findPath(x, y, destX, destY));
+}
+
void Being::clearPath()
{
path.clear();
@@ -250,6 +259,11 @@ void Being::setDamage(const std::string &text, int time)
showDamage = true;
}
+void Being::setMap(Map *map)
+{
+ this->map = map;
+}
+
void Being::setName(char *text)
{
strcpy(name, text);