From: <rf...@us...> - 2009-08-22 16:45:32
|
Revision: 3906 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=3906&view=rev Author: rforder Date: 2009-08-22 16:45:24 +0000 (Sat, 22 Aug 2009) Log Message: ----------- Improved location of custom SFX calls to avoid multiple calls being made simultaneously Modified Paths: -------------- main/branches/irrlicht/src/items/attachment.cpp main/branches/irrlicht/src/karts/kart.cpp main/branches/irrlicht/src/physics/physics.cpp Modified: main/branches/irrlicht/src/items/attachment.cpp =================================================================== --- main/branches/irrlicht/src/items/attachment.cpp 2009-08-22 02:29:27 UTC (rev 3905) +++ main/branches/irrlicht/src/items/attachment.cpp 2009-08-22 16:45:24 UTC (rev 3906) @@ -160,7 +160,6 @@ from->getAttachment()->getTimeLeft()+ stk_config->m_bomb_time_increase, from); - to->playCustomSFX(SFXManager::CUSTOM_ATTACH); from->getAttachment()->clear(); } // moveBombFromTo Modified: main/branches/irrlicht/src/karts/kart.cpp =================================================================== --- main/branches/irrlicht/src/karts/kart.cpp 2009-08-22 02:29:27 UTC (rev 3905) +++ main/branches/irrlicht/src/karts/kart.cpp 2009-08-22 16:45:24 UTC (rev 3906) @@ -862,9 +862,6 @@ if(m_crash_sound->getStatus() != SFXManager::SFX_PLAYING) m_crash_sound->play(); - // If we hit another kart, yell at it! (play custom kart sound) - if (k != NULL) playCustomSFX(SFXManager::CUSTOM_CRASH); - m_bounce_back_time = 0.1f; } } // crashed Modified: main/branches/irrlicht/src/physics/physics.cpp =================================================================== --- main/branches/irrlicht/src/physics/physics.cpp 2009-08-22 02:29:27 UTC (rev 3905) +++ main/branches/irrlicht/src/physics/physics.cpp 2009-08-22 16:45:24 UTC (rev 3906) @@ -192,6 +192,8 @@ if(attachmentA->getPreviousOwner()!=kartB) { attachmentA->moveBombFromTo(kartA, kartB); + // Play appropriate SFX + kartB->playCustomSFX(SFXManager::CUSTOM_ATTACH); } } } @@ -199,7 +201,14 @@ attachmentB->getPreviousOwner()!=kartA) { attachmentB->moveBombFromTo(kartB, kartA); + kartA->playCustomSFX(SFXManager::CUSTOM_ATTACH); } + else + { + // No bombs exchanged, no explosions, tell the other driver to move it! + kartA->playCustomSFX(SFXManager::CUSTOM_CRASH); + kartB->playCustomSFX(SFXManager::CUSTOM_CRASH); + } } // KartKartCollision //----------------------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |