Start work to make some animations played even when GFX is off

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11305 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria
2012-06-16 19:23:38 +00:00
parent 494e3d9a6c
commit c6c4544f2a
2 changed files with 11 additions and 1 deletions

View File

@@ -39,6 +39,10 @@ ThreeDAnimation::ThreeDAnimation(const XMLNode &node)
{
m_crash_reset = false;
node.get("reset", &m_crash_reset);
m_important_animation = false;
node.get("important", &m_important_animation);
m_triangle_mesh = NULL;
if (AnimationBase::m_node)
@@ -286,10 +290,11 @@ ThreeDAnimation::~ThreeDAnimation()
*/
void ThreeDAnimation::update(float dt)
{
if ( UserConfigParams::m_graphical_effects )
if ( UserConfigParams::m_graphical_effects || m_important_animation )
{
Vec3 xyz = m_node->getPosition();
Vec3 scale = m_node->getScale();
AnimationBase::update(dt, &xyz, &m_hpr, &scale); //updates all IPOs
m_node->setPosition(xyz.toIrrVector());
m_node->setScale(scale.toIrrVector());

View File

@@ -62,6 +62,11 @@ private:
* can not use the value returned by getRotation from a scene node. */
Vec3 m_hpr;
/**
* If true, play animation even when GFX are disabled
*/
bool m_important_animation;
void createPhysicsBody(const std::string &shape);
public: