Fix #3596
This commit is contained in:
parent
349fe30747
commit
a3a7b5f8fd
@ -33,7 +33,7 @@ class Vec3;
|
||||
/**
|
||||
* \brief The base class for sound effects.
|
||||
* It gets a sound buffer from the sound
|
||||
* manager, which is shared between all instances. Do create a new sound
|
||||
* manager, which is shared between all instances. To create a new sound
|
||||
* effect object, use sfx_manager->getSFX(...); do not create an instance
|
||||
* with new, since SFXManager makes sure to stop/restart all SFX (esp.
|
||||
* looping sfx like engine sounds) when necessary.
|
||||
|
@ -392,8 +392,6 @@ void LocalPlayerController::collectedItem(const ItemState &item_state,
|
||||
switch(item_state.getType())
|
||||
{
|
||||
case Item::ITEM_BANANA:
|
||||
m_kart->playSound(m_ugh_sound);
|
||||
break;
|
||||
case Item::ITEM_BUBBLEGUM:
|
||||
//More sounds are played by the kart class
|
||||
//See Kart::collectedItem()
|
||||
|
@ -3080,7 +3080,12 @@ void Kart::kartIsInRestNow()
|
||||
|
||||
SFXBase* Kart::getNextEmitter()
|
||||
{
|
||||
m_emitter_id = (m_emitter_id + 1) % 3;
|
||||
m_emitter_id = (m_emitter_id + 1) % EMITTER_COUNT;
|
||||
|
||||
// The emitter is requested when a new sound is to be played.
|
||||
// Always reset the volume to 1.0f (full), see #3596
|
||||
m_emitters[m_emitter_id]->setVolume(1.0f);
|
||||
|
||||
return m_emitters[m_emitter_id];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user