Skip to content

Commit

Permalink
Use ARX_SOUND_PlaySFX directly
Browse files Browse the repository at this point in the history
  • Loading branch information
Eli2 committed Jun 10, 2014
1 parent cb70e08 commit 62e3f61
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
13 changes: 5 additions & 8 deletions src/game/Spells.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -670,14 +670,11 @@ void SPELLEND_Notify(SpellBase & spell) {

//! Plays the sound of Fizzling spell
void ARX_SPELLS_Fizzle(SpellHandle num) {
if(num < 0) {
ARX_SOUND_PlaySFX(SND_MAGIC_FIZZLE); // player fizzle
} else {
spells[num]->m_tolive = 0;

if(spells[num]->m_caster >= PlayerEntityHandle) {
ARX_SOUND_PlaySFX(SND_MAGIC_FIZZLE, &spells[num]->m_caster_pos);
}

spells[num]->m_tolive = 0;

if(spells[num]->m_caster >= PlayerEntityHandle) {
ARX_SOUND_PlaySFX(SND_MAGIC_FIZZLE, &spells[num]->m_caster_pos);
}
}

Expand Down
5 changes: 1 addition & 4 deletions src/game/magic/SpellRecognition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -956,8 +956,6 @@ void ARX_SPELLS_AnalyseSYMBOL() {
}
}

extern void ARX_SPELLS_Fizzle(SpellHandle num);

bool ARX_SPELLS_AnalyseSPELL() {

SpellcastFlags flags = 0;
Expand All @@ -980,8 +978,7 @@ bool ARX_SPELLS_AnalyseSPELL() {
}

if(spell == SPELL_NONE) {

ARX_SPELLS_Fizzle(InvalidSpellHandle);
ARX_SOUND_PlaySFX(SND_MAGIC_FIZZLE);

if(player.SpellToMemorize.bSpell) {
CurrSpellSymbol = 0;
Expand Down

0 comments on commit 62e3f61

Please sign in to comment.