1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-21 07:53:53 +00:00

Fix player Ptr in RenderingManager not being updated on cell changes

Noticed that 'setpos' wasn't working in the console with the player selected.
This commit is contained in:
scrawl 2017-09-17 23:07:17 +00:00
parent fcb815f2c7
commit 00034192dc

View file

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