mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-15 17:09:46 +00:00
Override bow animations to give all races consistent aim
This commit is contained in:
parent
9bd676f5be
commit
7f3930c312
3 changed files with 16 additions and 8 deletions
|
@ -1969,7 +1969,6 @@ namespace MWGui
|
|||
|
||||
void WindowManager::playVideo(const std::string &name, bool allowSkipping)
|
||||
{
|
||||
auto* vrGuiManager = MWVR::Environment::get().getGUIManager();
|
||||
mVideoEnabled = true;
|
||||
mVideoWidget->playVideo("video\\" + name);
|
||||
|
||||
|
@ -1991,8 +1990,11 @@ namespace MWGui
|
|||
|
||||
mVideoBackground->setVisible(true);
|
||||
|
||||
#ifdef USE_OPENXR
|
||||
auto* vrGuiManager = MWVR::Environment::get().getGUIManager();
|
||||
vrGuiManager->updateTracking(mViewer->getCamera());
|
||||
vrGuiManager->insertLayer(mVideoBackground->getLayer()->getName());
|
||||
#endif
|
||||
|
||||
bool cursorWasVisible = mCursorVisible;
|
||||
setCursorVisible(false);
|
||||
|
@ -2023,7 +2025,6 @@ namespace MWGui
|
|||
|
||||
mViewer->eventTraversal();
|
||||
mViewer->updateTraversal();
|
||||
//vrGuiManager->updateTracking(mViewer->getCamera());
|
||||
mViewer->renderingTraversals();
|
||||
}
|
||||
// at the time this function is called we are in the middle of a frame,
|
||||
|
@ -2044,7 +2045,9 @@ namespace MWGui
|
|||
// Restore normal rendering
|
||||
updateVisible();
|
||||
|
||||
#ifdef USE_OPENXR
|
||||
vrGuiManager->removeLayer(mVideoBackground->getLayer()->getName());
|
||||
#endif
|
||||
mVideoBackground->setVisible(false);
|
||||
mVideoEnabled = false;
|
||||
}
|
||||
|
|
|
@ -909,7 +909,7 @@ namespace MWRender
|
|||
|
||||
if (isPlayer)
|
||||
{
|
||||
Log(Debug::Debug) << "groupname=" << groupname << ", start=" << start << ", stop=" << stop << ", accumRoot=" << mAccumRoot->getName();
|
||||
Log(Debug::Verbose) << "groupname=" << groupname << ", start=" << start << ", stop=" << stop << ", accumRoot=" << mAccumRoot->getName();
|
||||
}
|
||||
|
||||
AnimStateMap::iterator stateiter = mStates.begin();
|
||||
|
@ -1074,12 +1074,11 @@ namespace MWRender
|
|||
{
|
||||
#ifdef USE_OPENXR
|
||||
// TODO: It's difficult to design a good override system when
|
||||
// I don't have a good understanding of the animation code. So for
|
||||
// now i just block adding updates for nodes that should not be animated in VR.
|
||||
// I don't have a good understanding of the animation code. So for
|
||||
// now i just hardcode blocking of updaters for nodes that should not be animated in VR.
|
||||
|
||||
// TODO: Some overrides cause NaN during cull.
|
||||
// I believe this happens if an override causes a bone to never receive
|
||||
// a valid matrix, but i'm not totally sure.
|
||||
// I aassume this happens if an override causes a bone to never receive a valid matrix
|
||||
|
||||
// Add any bone+groupname pair that is messing with Vr comfort here.
|
||||
using Overrides = std::set<std::string>;
|
||||
|
@ -1098,6 +1097,12 @@ namespace MWRender
|
|||
"weapon bone"
|
||||
}
|
||||
},
|
||||
{
|
||||
"bowandarrow",
|
||||
{
|
||||
"weapon bone"
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
bool override = false;
|
||||
|
|
|
@ -105,7 +105,7 @@ void VRSession::swapBuffers(osg::GraphicsContext* gc, VRViewer& viewer)
|
|||
|
||||
beginPhase(FramePhase::Swap);
|
||||
|
||||
if (getFrame(FramePhase::Swap)->mShouldRender)
|
||||
if (getFrame(FramePhase::Swap)->mShouldRender && isRunning())
|
||||
{
|
||||
auto leftView = viewer.mViews["LeftEye"];
|
||||
auto rightView = viewer.mViews["RightEye"];
|
||||
|
|
Loading…
Reference in a new issue