1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 09:35:28 +00:00

player state cleanup

This commit is contained in:
Marc Zinnschlag 2014-01-11 15:34:32 +01:00
parent fefaec5804
commit 5ea25dc269
3 changed files with 13 additions and 0 deletions

View File

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

View File

@ -86,6 +86,8 @@ namespace MWWorld
bool wasTeleported() const;
void setTeleported(bool teleported);
void clear();
};
}
#endif

View File

@ -267,6 +267,7 @@ namespace MWWorld
void World::clear()
{
mLocalScripts.clear();
mPlayer->clear();
// enable collision
if (!mPhysics->toggleCollisionMode())