1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-21 18:39:40 +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) if (mMarkedCell)
markedPosition = mMarkedPosition; 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; bool wasTeleported() const;
void setTeleported(bool teleported); void setTeleported(bool teleported);
void clear();
}; };
} }
#endif #endif

View file

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