Fixed camera in case of an explosion (or rescue).

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7749 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2011-02-22 21:38:49 +00:00
parent 78cd11f881
commit 6df020f13b

View File

@ -332,6 +332,14 @@ void Camera::update(float dt)
return;
}
// If an explosion or rescue is happening, stop moving the camera,
// but keep it target on the kart.
if(m_kart->playingEmergencyAnimation())
{
m_camera->setTarget(m_kart->getXYZ().toIrrVector());
return;
}
Vec3 wanted_position;
Vec3 wanted_target = m_kart->getXYZ();