changed PlayerPos::getPlayer return type from CellRef to Ptr

pull/7/head
Marc Zinnschlag 15 years ago
parent fa50bbc77b
commit e43b475ade

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

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

Loading…
Cancel
Save