Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Right-click on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: <auria@us...> - 2012-03-04 23:17:32
|
Revision: 10920 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=10920&view=rev Author: auria Date: 2012-03-04 23:17:26 +0000 (Sun, 04 Mar 2012) Log Message: ----------- Fix some code I can't make sense of anymore and would result in accessing index -1 Modified Paths: -------------- main/trunk/src/tracks/track.cpp Modified: main/trunk/src/tracks/track.cpp =================================================================== --- main/trunk/src/tracks/track.cpp 2012-03-04 20:07:44 UTC (rev 10919) +++ main/trunk/src/tracks/track.cpp 2012-03-04 23:17:26 UTC (rev 10920) @@ -753,7 +753,6 @@ // Associate force fields and challenges // FIXME: this assumes that challenges will appear before force fields in scene.xml // (which however seems to be the case atm) - int f = m_force_fields.size() - 1; int closest_challenge_id = -1; float closest_distance = 99999.0f; for (unsigned int c=0; c<m_challenges.size(); c++) @@ -782,7 +781,7 @@ bool shown = (unlock_manager->getCurrentSlot()->getPoints() < val); m_force_fields.push_back(OverworldForceField(xyz, shown, val)); - m_challenges[closest_challenge_id].setForceField(m_force_fields[f]); + m_challenges[closest_challenge_id].setForceField(m_force_fields[m_force_fields.size() - 1]); core::stringw msg = StringUtils::toWString(val); core::dimension2d<u32> textsize = GUIEngine::getHighresDigitFont()->getDimension(msg.c_str()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |