Fix listener position not updated when looking back

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@8321 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2011-04-13 00:55:30 +00:00
parent 8228a5e782
commit 717213a303

View File

@ -464,13 +464,20 @@ void Camera::positionCamera(float dt, float above_kart, float cam_angle,
distance);
const btTransform &trans=m_kart->getTrans();
wanted_position = trans(relative_position);
if(smoothing)
if (smoothing)
{
smoothMoveCamera(dt, wanted_position, wanted_target);
}
else
{
if(m_mode!=CM_FALLING)
if (m_mode!=CM_FALLING)
m_camera->setPosition(wanted_position.toIrrVector());
m_camera->setTarget(wanted_target.toIrrVector());
if (race_manager->getNumLocalPlayers() < 2)
{
sfx_manager->positionListener(m_camera->getPosition(), wanted_target - m_camera->getPosition());
}
}
} // positionCamera