From f0288dd6973cb6a236c8d31cfb39953ee315ec59 Mon Sep 17 00:00:00 2001 From: hansthefarmer Date: Sat, 18 Aug 2007 13:34:03 +0000 Subject: [PATCH] Detach attachment anvil now works correctly git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@1209 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/attachment.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/attachment.cpp b/src/attachment.cpp index 61a68aa3e..a6cd9b450 100644 --- a/src/attachment.cpp +++ b/src/attachment.cpp @@ -145,13 +145,14 @@ void Attachment::update(float dt, sgCoord *velocity) // Detach attachment if its time is up. if ( m_time_left <= 0.0f) { - clear(); if(m_type==ATTACH_ANVIL) { // Resets the weight, and multiplies the velocity by 1.0, // i.e. no change of velocity. + m_kart->getAttachment()->clear(); m_kart->adjustSpeedWeight(1.0f); } + clear(); } // if m_time_left<0 } // update //-----------------------------------------------------------------------------