From a576e9e430b0feaf5c27bce36a3c3313b831a11a Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 25 Feb 2013 16:40:08 -0800 Subject: [PATCH] Set the race selection character preview in a valid (idle) pose. --- apps/openmw/mwrender/characterpreview.cpp | 6 ++++++ apps/openmw/mwrender/characterpreview.hpp | 2 ++ 2 files changed, 8 insertions(+) diff --git a/apps/openmw/mwrender/characterpreview.cpp b/apps/openmw/mwrender/characterpreview.cpp index 36cac2155d..c32e9d1d68 100644 --- a/apps/openmw/mwrender/characterpreview.cpp +++ b/apps/openmw/mwrender/characterpreview.cpp @@ -161,6 +161,7 @@ namespace MWRender void RaceSelectionPreview::update(float angle) { + mAnimation->runAnimation(0.0f); mNode->roll(Ogre::Radian(angle), Ogre::SceneNode::TS_LOCAL); mNode->setVisible (true); @@ -175,4 +176,9 @@ namespace MWRender rebuild(); update(0); } + + void RaceSelectionPreview::onSetup () + { + mAnimation->play("idle", "start", "stop", false); + } } diff --git a/apps/openmw/mwrender/characterpreview.hpp b/apps/openmw/mwrender/characterpreview.hpp index d07a03be7d..cf1e250692 100644 --- a/apps/openmw/mwrender/characterpreview.hpp +++ b/apps/openmw/mwrender/characterpreview.hpp @@ -85,6 +85,8 @@ namespace MWRender public: RaceSelectionPreview(); + virtual void onSetup(); + void update(float angle); const ESM::NPC &getPrototype() const {