summaryrefslogtreecommitdiff
path: root/src/being
diff options
context:
space:
mode:
Diffstat (limited to 'src/being')
-rw-r--r--src/being/being.cpp4
-rw-r--r--src/being/being.h4
-rw-r--r--src/being/localplayer.cpp2
3 files changed, 7 insertions, 3 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index 4745f516e..fdd706bbe 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -99,7 +99,8 @@ std::list<BeingCacheEntry*> beingInfoCache;
typedef std::map<int, Guild*>::const_iterator GuildsMapCIter;
typedef std::map<int, int>::const_iterator IntMapCIter;
-Being::Being(const int id, const Type type, const uint16_t subtype) :
+Being::Being(const int id, const Type type, const uint16_t subtype,
+ Map *const map) :
ActorSprite(id),
mNextSound(),
mInfo(BeingInfo::unknown),
@@ -189,6 +190,7 @@ Being::Being(const int id, const Type type, const uint16_t subtype) :
mSpriteHide[f] = 0;
}
+ setMap(map);
setSubtype(subtype, 0);
if (mType == PLAYER)
diff --git a/src/being/being.h b/src/being/being.h
index 90a351af0..313a92c2d 100644
--- a/src/being/being.h
+++ b/src/being/being.h
@@ -155,8 +155,10 @@ class Being : public ActorSprite, public ConfigListener
*
* @param id a unique being id
* @param subtype partly determines the type of the being
+ * @param map the map the being is on
*/
- Being(const int id, const Type type, const uint16_t subtype);
+ Being(const int id, const Type type, const uint16_t subtype,
+ Map *const map);
A_DELETE_COPY(Being)
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp
index 17424e6a8..6df48dec7 100644
--- a/src/being/localplayer.cpp
+++ b/src/being/localplayer.cpp
@@ -88,7 +88,7 @@ extern MiniStatusWindow *miniStatusWindow;
extern SkillDialog *skillDialog;
LocalPlayer::LocalPlayer(const int id, const int subtype) :
- Being(id, PLAYER, subtype),
+ Being(id, PLAYER, subtype, nullptr),
mGMLevel(0),
mInvertDirection(0),
mCrazyMoveType(config.getIntValue("crazyMoveType")),