diff --git a/source/sound/sound.cpp b/source/sound/sound.cpp index 35149f069..44ee956cd 100644 --- a/source/sound/sound.cpp +++ b/source/sound/sound.cpp @@ -334,6 +334,8 @@ static SFXDETAILS s_sfxDetails[CSoundMediator::NUM_SFXIDS]= { 1, 168, 0 }, // SFX_BEEP10 { 1, 169, 0 }, // SFX_BEEP11 { 1, 170, 0 }, // SFX_BEEP12 + { 3, 171, 0 }, // SFX_TELEPORT1* + { 3, 172, 0 }, // SFX_TELEPORT2* }; diff --git a/source/sound/sound.h b/source/sound/sound.h index b42e455b3..4c591e248 100644 --- a/source/sound/sound.h +++ b/source/sound/sound.h @@ -181,6 +181,7 @@ public: SFX_BEEP10, SFX_BEEP11, SFX_BEEP12, + SFX_TELEPORT1, SFX_TELEPORT2, NUM_SFXIDS }; diff --git a/source/triggers/tteleprt.cpp b/source/triggers/tteleprt.cpp index 125048c98..128bba619 100644 --- a/source/triggers/tteleprt.cpp +++ b/source/triggers/tteleprt.cpp @@ -19,7 +19,7 @@ #include "triggers\tteleprt.h" #ifndef __GAME_GAME_H__ -#include "game\game.h" +#include "game\game.h" #endif #ifndef __PLAYER_PLAYER_H__ @@ -34,6 +34,10 @@ #include "friend\fgary.h" #endif +#ifndef __SOUND_SOUND_H__ +#include "sound\sound.h" +#endif + /* Std Lib ------- */ @@ -106,8 +110,21 @@ void CTeleportTrigger::collidedWith(CThing *_thisThing) if(GameScene.triggerTeleportEffect()) { + CSoundMediator::SFXID sfx; + ((CPlayer*)_thisThing)->clearPlatform(); ((CPlayer*)_thisThing)->teleportTo(m_boxX1+8,m_boxY1+16); + + if(chapter==5&&level==4) + { + sfx=CSoundMediator::SFX_TELEPORT1; + } + else + { + sfx=CSoundMediator::SFX_TELEPORT2; + } + + CSoundMediator::playSfx(sfx); } } break;