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()
|
void ReferenceInterface::checkReferenceAvailable()
|
||||||
{
|
{
|
||||||
if (mPtr.isEmpty())
|
|
||||||
return;
|
|
||||||
|
|
||||||
MWWorld::Ptr::CellStore* playerCell = MWBase::Environment::get().getWorld()->getPlayer().getPlayer().getCell();
|
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
|
// check if player has changed cell, or count of the reference has become 0
|
||||||
if ((playerCell != mCurrentPlayerCell && mCurrentPlayerCell != NULL)
|
if ((playerCell != mCurrentPlayerCell && mCurrentPlayerCell != NULL)
|
||||||
|| mPtr.getRefData().getCount() == 0)
|
|| (!mPtr.isEmpty() && mPtr.getRefData().getCount() == 0))
|
||||||
{
|
{
|
||||||
mPtr = MWWorld::Ptr();
|
if (!mPtr.isEmpty())
|
||||||
onReferenceUnavailable();
|
{
|
||||||
|
mPtr = MWWorld::Ptr();
|
||||||
|
onReferenceUnavailable();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mCurrentPlayerCell = playerCell;
|
mCurrentPlayerCell = playerCell;
|
||||||
|
|
Loading…
Reference in a new issue