Fixed end camera handling in reverse mode.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/reverse_mode@10844 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2012-02-14 21:15:37 +00:00
parent fcdf44c764
commit 8105b6ac0c

View File

@ -114,7 +114,12 @@ void Camera::readEndCamera(const XMLNode &root)
m_end_cameras.clear();
for(unsigned int i=0; i<root.getNumNodes(); i++)
{
const XMLNode *node = root.getNode(i);
unsigned int index = i;
// In reverse mode, reverse the order in which the
// end cameras are read.
if(QuadGraph::get()->isReverse())
index = root.getNumNodes() - 1 - i;
const XMLNode *node = root.getNode(index);
EndCameraInformation eci;
if(!eci.readXML(*node)) continue;
m_end_cameras.push_back(eci);