mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-29 08:15:35 +00:00
player state cleanup
This commit is contained in:
parent
fefaec5804
commit
5ea25dc269
3 changed files with 13 additions and 0 deletions
|
@ -171,4 +171,14 @@ namespace MWWorld
|
|||
if (mMarkedCell)
|
||||
markedPosition = mMarkedPosition;
|
||||
}
|
||||
|
||||
void Player::clear()
|
||||
{
|
||||
mCellStore = 0;
|
||||
mSign.clear();
|
||||
mMarkedCell = 0;
|
||||
mAutoMove = false;
|
||||
mForwardBackward = 0;
|
||||
mTeleported = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -86,6 +86,8 @@ namespace MWWorld
|
|||
|
||||
bool wasTeleported() const;
|
||||
void setTeleported(bool teleported);
|
||||
|
||||
void clear();
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -267,6 +267,7 @@ namespace MWWorld
|
|||
void World::clear()
|
||||
{
|
||||
mLocalScripts.clear();
|
||||
mPlayer->clear();
|
||||
|
||||
// enable collision
|
||||
if (!mPhysics->toggleCollisionMode())
|
||||
|
|
Loading…
Reference in a new issue