From: <au...@us...> - 2013-06-01 00:25:19
|
Revision: 12831 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=12831&view=rev Author: auria Date: 2013-06-01 00:25:12 +0000 (Sat, 01 Jun 2013) Log Message: ----------- Add asserts to try catching bug #923 Modified Paths: -------------- main/trunk/src/items/rubber_ball.cpp Modified: main/trunk/src/items/rubber_ball.cpp =================================================================== --- main/trunk/src/items/rubber_ball.cpp 2013-05-31 23:48:51 UTC (rev 12830) +++ main/trunk/src/items/rubber_ball.cpp 2013-06-01 00:25:12 UTC (rev 12831) @@ -444,6 +444,9 @@ next_xyz->setZ(getXYZ().getZ() + old_2d.Y*dt*m_speed); } // if fabsf(angle) > m_st_target_angle_max*dt + assert(!isnan((*next_xyz)[0])); + assert(!isnan((*next_xyz)[1])); + assert(!isnan((*next_xyz)[2])); } // moveTowardsTarget // ---------------------------------------------------------------------------- @@ -479,6 +482,10 @@ +4*m_control_points[2] - m_control_points[3])*m_t*m_t + (- m_control_points[0] + m_control_points[2])*m_t + 2*m_control_points[1] ); + + assert(!isnan((*next_xyz)[0])); + assert(!isnan((*next_xyz)[1])); + assert(!isnan((*next_xyz)[2])); } // interpolate // ---------------------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |