1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 06:35:30 +00:00

changed PlayerPos::getPlayer return type from CellRef to Ptr

This commit is contained in:
Marc Zinnschlag 2010-07-26 13:09:44 +02:00
parent fa50bbc77b
commit e43b475ade
2 changed files with 4 additions and 8 deletions

View File

@ -76,15 +76,11 @@ namespace MWRender
setPos(relX, relY, relZ);
}
ESMS::LiveCellRef<ESM::NPC, MWWorld::RefData> *getPlayer()
MWWorld::Ptr getPlayer()
{
return &mPlayer;
MWWorld::Ptr ptr (&mPlayer, mCellStore);
return ptr;
}
const ESMS::LiveCellRef<ESM::NPC, MWWorld::RefData> *getPlayer() const
{
return &mPlayer;
}
};
}
#endif

View File

@ -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