forked from mirror/openmw-tes3mp
Merge remote-tracking branch 'scrawl/master'
This commit is contained in:
commit
3fa35af796
1 changed files with 6 additions and 6 deletions
|
@ -18,17 +18,17 @@ namespace MWGui
|
|||
|
||||
void ReferenceInterface::checkReferenceAvailable()
|
||||
{
|
||||
if (mPtr.isEmpty())
|
||||
return;
|
||||
|
||||
MWWorld::Ptr::CellStore* playerCell = MWBase::Environment::get().getWorld()->getPlayer().getPlayer().getCell();
|
||||
|
||||
// check if player has changed cell, or count of the reference has become 0
|
||||
if ((playerCell != mCurrentPlayerCell && mCurrentPlayerCell != NULL)
|
||||
|| mPtr.getRefData().getCount() == 0)
|
||||
|| (!mPtr.isEmpty() && mPtr.getRefData().getCount() == 0))
|
||||
{
|
||||
mPtr = MWWorld::Ptr();
|
||||
onReferenceUnavailable();
|
||||
if (!mPtr.isEmpty())
|
||||
{
|
||||
mPtr = MWWorld::Ptr();
|
||||
onReferenceUnavailable();
|
||||
}
|
||||
}
|
||||
|
||||
mCurrentPlayerCell = playerCell;
|
||||
|
|
Loading…
Reference in a new issue