From: <hik...@us...> - 2012-10-22 04:01:57
|
Revision: 11735 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=11735&view=rev Author: hikerstk Date: 2012-10-22 04:01:51 +0000 (Mon, 22 Oct 2012) Log Message: ----------- Committed Steel's patch for #708 (endless loop). Thanks! Modified Paths: -------------- main/trunk/src/tracks/quad_graph.cpp Modified: main/trunk/src/tracks/quad_graph.cpp =================================================================== --- main/trunk/src/tracks/quad_graph.cpp 2012-10-21 23:58:43 UTC (rev 11734) +++ main/trunk/src/tracks/quad_graph.cpp 2012-10-22 04:01:51 UTC (rev 11735) @@ -731,7 +731,11 @@ int prev = next; // is now n+1 next = getNode(next).getSuccessor(0); // next is now n+2 - while(1) + // If the direction is still the same during a lap the last node + // in the same direction is the previous node; + int max_step = m_all_nodes.size()-1; + + while(max_step-- != 0) { // Now compute the angle from n+1 (new current) to n+2 (new next) angle_current = angle_next; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |