Don't animate parachutes if animations are disabled

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7381 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2011-01-12 18:58:38 +00:00
parent fe9be88c1e
commit dfb8c25793

View File

@ -60,7 +60,16 @@ Attachment::~Attachment()
void Attachment::set(attachmentType type, float time, Kart *current_kart)
{
clear();
m_node->setMesh(attachment_manager->getMesh(type));
if (!UserConfigParams::m_graphical_effects)
{
m_node->setAnimationSpeed(0);
m_node->setCurrentFrame(0);
}
m_type = type;
m_time_left = time;
m_previous_owner = current_kart;
@ -71,7 +80,11 @@ void Attachment::set(attachmentType type, float time, Kart *current_kart)
{
m_initial_speed = m_kart->getSpeed();
if(m_initial_speed <= 1.5) m_initial_speed = 1.5; // if going very slowly or backwards, braking won't remove parachute
m_node->setAnimationSpeed(50); // .blend was created @25 (<10 real, slow computer), make it faster
if (UserConfigParams::m_graphical_effects)
{
m_node->setAnimationSpeed(50); // .blend was created @25 (<10 real, slow computer), make it faster
}
}
m_node->setVisible(true);
} // set