Camera::setMode():

- use 1.5 times the distance from the kart properties in 2 and 3
    player (split screen) mode to fix kart not being visible


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@2197 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
thebohemian
2008-08-03 13:41:56 +00:00
parent 0b87ece335
commit c3fc916588

View File

@@ -110,7 +110,15 @@ void Camera::setMode(Mode mode)
if(m_mode==CM_CLOSEUP)
m_distance = 2.5f;
else
m_distance = m_kart->getKartProperties()->getCameraDistance();
{
m_distance = m_kart->getKartProperties()->getCameraDistance();
// In 2 and 3 player mode we have a different FOV and would not see our
// kart at the default distance. We use 1.5 times the distance to fix that.
const int num_players = race_manager->getNumPlayers();
if (num_players == 2 || num_players == 3)
m_distance += m_distance / 2;
}
} // setMode
Camera::Mode Camera::getMode()
{