Avoid scaling attachment which isn't bubblegum shield

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14311 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
deveee
2013-10-26 13:07:34 +00:00
parent 6dd109dab0
commit 5824a2e942
2 changed files with 3 additions and 5 deletions

View File

@@ -54,8 +54,6 @@ Attachment::Attachment(AbstractKart* kart)
m_bubble_explode_sound = NULL;
m_node_scale = 1.0f;
m_wanted_node_scale = std::max(1.0f, kart->getHighestPoint()*1.1f);
// If we attach a NULL mesh, we get a NULL scene node back. So we
// have to attach some kind of mesh, but make it invisible.
m_node = irr_driver->addAnimatedMesh(
@@ -389,6 +387,9 @@ void Attachment::update(float dt)
if(m_type==ATTACH_NOTHING) return;
m_time_left -=dt;
float m_wanted_node_scale = m_type==ATTACH_BUBBLEGUM_SHIELD ?
std::max(1.0f, m_kart->getHighestPoint()*1.1f) : 1.0f;
if (m_node_scale < m_wanted_node_scale)
{
m_node_scale += dt*1.5f;

View File

@@ -80,9 +80,6 @@ private:
/** For zoom-in animation */
float m_node_scale;
/** Scale for bubblegum shield */
float m_wanted_node_scale;
/** Scene node of the attachment, which will be attached to the kart's
* scene node. */
scene::IAnimatedMeshSceneNode