Merge pull request #91 from teamfisk/Sound

Sound fix
This commit is contained in:
2016-02-10 19:16:45 +01:00
+3
View File
@@ -69,6 +69,9 @@ bool SoundSystem::OnInputCommand(const Events::InputCommand & e)
void SoundSystem::playerJumps() void SoundSystem::playerJumps()
{ {
if (!m_LocalPlayer.Valid()) {
return;
}
bool grounded = (bool)m_World->GetComponent(m_LocalPlayer.ID, "Physics")["IsOnGround"]; bool grounded = (bool)m_World->GetComponent(m_LocalPlayer.ID, "Physics")["IsOnGround"];
if (grounded) { if (grounded) {
Events::PlaySoundOnEntity e; Events::PlaySoundOnEntity e;