mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 05:53:50 +00:00
Work around a problem with MWRender::Player::renderPlayer
NpcAnimation::setViewMode makes a call to the character controller, in the mechanics manager, to forcefully update the character's state. This in turn makes a call to the player's old NpcAniamtion object that was just deleted. The mechanics manager will eventually remove and reinsert the player, so the old character controller will be removed and a new one will get the right Animation object again, but not in time for the setViewMode call. There's many factors that all contribute to this run-around, which needs discussion on how to best fix.
This commit is contained in:
parent
55ee4e65a9
commit
b666f1d551
1 changed files with 3 additions and 3 deletions
|
@ -307,11 +307,11 @@ namespace MWRender
|
|||
|
||||
void Player::setAnimation(NpcAnimation *anim)
|
||||
{
|
||||
anim->setViewMode((mVanity.enabled || mPreviewMode || !mFirstPersonView) ?
|
||||
NpcAnimation::VM_Normal : NpcAnimation::VM_FirstPerson);
|
||||
|
||||
delete mAnimation;
|
||||
mAnimation = anim;
|
||||
|
||||
mAnimation->setViewMode((mVanity.enabled || mPreviewMode || !mFirstPersonView) ?
|
||||
NpcAnimation::VM_Normal : NpcAnimation::VM_FirstPerson);
|
||||
}
|
||||
|
||||
void Player::setHeight(float height)
|
||||
|
|
Loading…
Reference in a new issue