mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-30 07:15:34 +00:00
Fully reset the player's cell reference when the player is reset (#8021)
This commit is contained in:
parent
218e19d8f7
commit
39a231233c
3 changed files with 6 additions and 2 deletions
|
@ -181,6 +181,7 @@
|
|||
Bug #7997: Can toggle perspective when paralyzed
|
||||
Bug #8002: Portable light sources held by creatures do not emit lighting
|
||||
Bug #8018: Potion effects should never explode and always apply on self
|
||||
Bug #8021: Player's scale doesn't reset when starting a new game
|
||||
Feature #1415: Infinite fall failsafe
|
||||
Feature #2566: Handle NAM9 records for manual cell references
|
||||
Feature #3537: Shader-based water ripples
|
||||
|
|
|
@ -242,6 +242,11 @@ namespace MWWorld
|
|||
|
||||
void Player::clear()
|
||||
{
|
||||
ESM::CellRef cellRef;
|
||||
cellRef.blank();
|
||||
cellRef.mRefID = ESM::RefId::stringRefId("Player");
|
||||
cellRef.mRefNum = mPlayer.mRef.getRefNum();
|
||||
mPlayer = LiveCellRef<ESM::NPC>(cellRef, mPlayer.mBase);
|
||||
mCellStore = nullptr;
|
||||
mSign = ESM::RefId();
|
||||
mMarkedCell = nullptr;
|
||||
|
|
|
@ -426,8 +426,6 @@ namespace MWWorld
|
|||
if (mPlayer)
|
||||
{
|
||||
mPlayer->clear();
|
||||
mPlayer->setCell(nullptr);
|
||||
mPlayer->getPlayer().getRefData() = RefData();
|
||||
mPlayer->set(mStore.get<ESM::NPC>().find(ESM::RefId::stringRefId("Player")));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue