Merge remote-tracking branch 'origin/master' into Sound

# Conflicts:
#	src/Game/Game.cpp
This commit is contained in:
stiffly
2016-01-15 09:52:31 +01:00
47 changed files with 837 additions and 797 deletions
+3 -3
View File
@@ -108,7 +108,7 @@ void SoundSystem::updateEmitters()
glm::vec3 previousPos;
alGetSource3f(it->second->ALsource, AL_POSITION, &previousPos.x, &previousPos.y, &previousPos.z);
// Get next pos
glm::vec3 nextPos = RenderQueueFactory::AbsolutePosition(m_World, it->first);
glm::vec3 nextPos = Transform::AbsolutePosition(m_World, it->first);
// Calculate velocity
glm::vec3 velocity = nextPos - previousPos;
setSourcePos(it->second->ALsource, nextPos);
@@ -142,11 +142,11 @@ void SoundSystem::updateListener()
EntityID listener = (*it).EntityID;
glm::vec3 previousPos;
alGetListener3f(AL_POSITION, &previousPos.x, &previousPos.y, &previousPos.z); // Get previous pos
glm::vec3 nextPos = RenderQueueFactory::AbsolutePosition(m_World, listener); // Get next (current) pos
glm::vec3 nextPos = Transform::AbsolutePosition(m_World, listener); // Get next (current) pos
glm::vec3 velocity = nextPos - previousPos; // Calculate velocity
setListenerPos(nextPos);
setListenerVel(velocity);
setListenerOri(glm::eulerAngles(RenderQueueFactory::AbsoluteOrientation(m_World, listener)));
setListenerOri(glm::eulerAngles(Transform::AbsoluteOrientation(m_World, listener)));
}
}