Implemented voice event when attachment occurs.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3898 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
rforder 2009-08-20 21:22:34 +00:00
parent 1c6cb1115b
commit bbfb30d4c5
3 changed files with 6 additions and 2 deletions

View File

@ -238,7 +238,7 @@ const char *SFXManager::getCustomTagName(int id)
case CUSTOM_PASS: return "pass-sound"; // Played when passing another kart
case CUSTOM_ZIPPER: return "zipper-sound"; // Played when kart hits zipper
case CUSTOM_NAME: return "name-sound"; // Introduction "I'm Tux!"
case CUSTOM_BOMB: return "bomb-sound"; // Played when dynamite is attached to kart
case CUSTOM_ATTACH: return "attach-sound"; // Played when something is attached to kart
case CUSTOM_SHOOT: return "shoot-sound"; // Played when weapon is used
};
return "";

View File

@ -65,7 +65,7 @@ public:
CUSTOM_PASS, // Played when passing another kart
CUSTOM_ZIPPER, // Played when kart hits zipper
CUSTOM_NAME, // Introduction "I'm Tux!"
CUSTOM_BOMB, // Played when dynamite is attached to kart
CUSTOM_ATTACH, // Played when something is attached to kart (Uh-Oh)
CUSTOM_SHOOT, // Played when weapon is used
NUM_CUSTOMS
};

View File

@ -63,6 +63,10 @@ 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
}
// Play appropriate custom character sound
// m_kart->playCustomSFX(SFXManager::CUSTOM_ATTACH);
} // set
// -----------------------------------------------------------------------------