diff --git a/apps/openmw/mwrender/playerpos.hpp b/apps/openmw/mwrender/playerpos.hpp index 3501850b63..48a4fd8d5e 100644 --- a/apps/openmw/mwrender/playerpos.hpp +++ b/apps/openmw/mwrender/playerpos.hpp @@ -76,15 +76,11 @@ namespace MWRender setPos(relX, relY, relZ); } - ESMS::LiveCellRef *getPlayer() + MWWorld::Ptr getPlayer() { - return &mPlayer; + MWWorld::Ptr ptr (&mPlayer, mCellStore); + return ptr; } - - const ESMS::LiveCellRef *getPlayer() const - { - return &mPlayer; - } }; } #endif diff --git a/apps/openmw/mwworld/world.cpp b/apps/openmw/mwworld/world.cpp index f2b8aa7e9c..d71276fe9f 100644 --- a/apps/openmw/mwworld/world.cpp +++ b/apps/openmw/mwworld/world.cpp @@ -259,7 +259,7 @@ namespace MWWorld // the player is always in an active cell. if (name=="player") { - return Ptr (mPlayerPos->getPlayer(), mCurrentCell); + return mPlayerPos->getPlayer(); } // active cells