From e43b475adecdc6cc9cd74a8bb775119c64baaf85 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Mon, 26 Jul 2010 13:09:44 +0200 Subject: [PATCH] changed PlayerPos::getPlayer return type from CellRef to Ptr --- apps/openmw/mwrender/playerpos.hpp | 10 +++------- apps/openmw/mwworld/world.cpp | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) 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