Fix player Ptr in RenderingManager not being updated on cell changes

Noticed that 'setpos' wasn't working in the console with the player selected.
experimental
scrawl 7 years ago
parent fcb815f2c7
commit 00034192dc

@ -530,8 +530,10 @@ namespace MWRender
void RenderingManager::updatePlayerPtr(const MWWorld::Ptr &ptr) void RenderingManager::updatePlayerPtr(const MWWorld::Ptr &ptr)
{ {
if(mPlayerAnimation.get()) if(mPlayerAnimation.get())
{
setupPlayer(ptr);
mPlayerAnimation->updatePtr(ptr); mPlayerAnimation->updatePtr(ptr);
}
mCamera->attachTo(ptr); mCamera->attachTo(ptr);
} }
@ -834,6 +836,7 @@ namespace MWRender
player.getRefData().setBaseNode(mPlayerNode); player.getRefData().setBaseNode(mPlayerNode);
mWater->removeEmitter(player);
mWater->addEmitter(player); mWater->addEmitter(player);
} }

Loading…
Cancel
Save