diff --git a/include/Game/Systems/BackgroundMusicSystem.h b/include/Game/Systems/BackgroundMusicSystem.h deleted file mode 100644 index 243b0f61..00000000 --- a/include/Game/Systems/BackgroundMusicSystem.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef Systems_BackgroundMusicSystem_h__ -#define Systems_BackgroundMusicSystem_h__ - -#include "../Engine/Core/System.h" -#include "../Engine/Core/EventBroker.h" - -// Handles transitions between BGM's depending on the current state of the game. -class BackgroundMusicSystem : public PureSystem -{ -public: - BackgroundMusicSystem(SystemParams params); - ~BackgroundMusicSystem(); - void UpdateComponent(EntityWrapper& entity, ComponentWrapper& cEmitter, double dt) override; - -private: - void mainMenuLoop(); - - const std::string menu = "Audio/crosscounter.wav"; -}; - -#endif // ifndef diff --git a/src/Engine/Network/Server.cpp b/src/Engine/Network/Server.cpp index 1f94a137..39b9260e 100644 --- a/src/Engine/Network/Server.cpp +++ b/src/Engine/Network/Server.cpp @@ -592,7 +592,7 @@ void Server::parseOnInputCommand(Packet& packet) e.Player = EntityWrapper(m_World, m_ConnectedPlayers.at(player).EntityID); e.Value = packet.ReadPrimitive(); m_EventBroker->Publish(e); - if (e.Command == "PrimaryFire" || e.Command == "Reload") { + if (e.Command == "PrimaryFire" || e.Command == "Reload" || e.Command == "Jump") { m_InputCommandsToBroadcast.push_back(e); } //LOG_INFO("Server::parseOnInputCommand: Command is %s. Value is %f. PlayerID is %i.", e.Command.c_str(), e.Value, e.PlayerID); diff --git a/src/Engine/Sound/SoundManager.cpp b/src/Engine/Sound/SoundManager.cpp index bbab46cb..83619ea9 100644 --- a/src/Engine/Sound/SoundManager.cpp +++ b/src/Engine/Sound/SoundManager.cpp @@ -297,7 +297,7 @@ bool SoundManager::OnPlayAnnouncerVoice(const Events::PlayAnonuncerVoice& e) auto listenerComponents = m_World->GetComponents("Listener"); for (auto it = listenerComponents->begin(); it != listenerComponents->end(); it++) { if ((*it).EntityID != m_LocalPlayer.ID) { - break; + continue; } auto emitterChild = m_World->CreateEntity((*it).EntityID); auto emitter = m_World->AttachComponent(emitterChild, "SoundEmitter"); @@ -394,7 +394,7 @@ bool SoundManager::OnPlayQueueOnEntity(const Events::PlayQueueOnEntity &e) bool SoundManager::OnChangeBGM(const Events::ChangeBGM &e) { if (m_CurrentBGM != nullptr) { - stopSound(m_CurrentBGM); + stopSound(m_CurrentBGM); } m_CurrentBGM = createSource(e.FilePath); m_CurrentBGM->Type = SoundType::BGM; @@ -419,10 +419,18 @@ void SoundManager::setSoundProperties(Source* source, ComponentWrapper* soundCom { float gain; switch (source->Type) { - case SoundType::SFX: gain = m_SFXVolumeChannel; break; - case SoundType::BGM: gain = m_BGMVolumeChannel; break; - case SoundType::Announcer: gain = m_AnnouncerVolumeChannel; break; - default: gain = 1.f; break; + case SoundType::SFX: + gain = m_SFXVolumeChannel; + break; + case SoundType::BGM: + gain = m_BGMVolumeChannel; + break; + case SoundType::Announcer: + gain = m_AnnouncerVolumeChannel; + break; + default: + gain = 1.f; + break; } alSourcef(source->ALsource, AL_GAIN, (float)(double)(*soundComponent)["Gain"] * gain); alSourcef(source->ALsource, AL_PITCH, (float)(double)(*soundComponent)["Pitch"]); diff --git a/src/Game/Systems/BackgroundMusicSystem.cpp b/src/Game/Systems/BackgroundMusicSystem.cpp deleted file mode 100644 index d37427b9..00000000 --- a/src/Game/Systems/BackgroundMusicSystem.cpp +++ /dev/null @@ -1,23 +0,0 @@ -#include "../Game/Systems/BackgroundMusicSystem.h" - -BackgroundMusicSystem::BackgroundMusicSystem(SystemParams params) - : System(params) - , PureSystem("SoundEmitter") -{ - -} - -BackgroundMusicSystem::~BackgroundMusicSystem() -{ - -} - -void BackgroundMusicSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapper& cEmitter, double dt) -{ - -} - -void BackgroundMusicSystem::mainMenuLoop() -{ - -}