forked from mirror/openmw-tes3mp
Remove redundant player cell variable
This commit is contained in:
parent
84657271c7
commit
bbafe1e456
2 changed files with 1 additions and 14 deletions
|
@ -1,14 +1,8 @@
|
||||||
#include "referenceinterface.hpp"
|
#include "referenceinterface.hpp"
|
||||||
|
|
||||||
#include "../mwbase/world.hpp"
|
|
||||||
#include "../mwbase/environment.hpp"
|
|
||||||
|
|
||||||
#include "../mwmechanics/actorutil.hpp"
|
|
||||||
|
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
ReferenceInterface::ReferenceInterface()
|
ReferenceInterface::ReferenceInterface()
|
||||||
: mCurrentPlayerCell(NULL)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,8 +12,6 @@ namespace MWGui
|
||||||
|
|
||||||
void ReferenceInterface::checkReferenceAvailable()
|
void ReferenceInterface::checkReferenceAvailable()
|
||||||
{
|
{
|
||||||
MWWorld::CellStore* playerCell = MWMechanics::getPlayer().getCell();
|
|
||||||
|
|
||||||
// check if count of the reference has become 0
|
// check if count of the reference has become 0
|
||||||
if (!mPtr.isEmpty() && mPtr.getRefData().getCount() == 0)
|
if (!mPtr.isEmpty() && mPtr.getRefData().getCount() == 0)
|
||||||
{
|
{
|
||||||
|
@ -29,7 +21,5 @@ namespace MWGui
|
||||||
onReferenceUnavailable();
|
onReferenceUnavailable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mCurrentPlayerCell = playerCell;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,15 +17,12 @@ namespace MWGui
|
||||||
|
|
||||||
void checkReferenceAvailable(); ///< closes the window, if the MW-reference has become unavailable
|
void checkReferenceAvailable(); ///< closes the window, if the MW-reference has become unavailable
|
||||||
|
|
||||||
virtual void resetReference() { mPtr = MWWorld::Ptr(); mCurrentPlayerCell = NULL; }
|
virtual void resetReference() { mPtr = MWWorld::Ptr(); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void onReferenceUnavailable() = 0; ///< called when reference has become unavailable
|
virtual void onReferenceUnavailable() = 0; ///< called when reference has become unavailable
|
||||||
|
|
||||||
MWWorld::Ptr mPtr;
|
MWWorld::Ptr mPtr;
|
||||||
|
|
||||||
private:
|
|
||||||
MWWorld::CellStore* mCurrentPlayerCell;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue