View Single Post
Re: POD-bot back into shape.
Old
  (#116)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: POD-bot back into shape. - 10-03-2004

Pisses me off. I've added this barbarian fix.
Code:
void UTIL_ClampAngle (float *fAngle)
{
   if (*fAngle >= 180)
	  *fAngle -= 360 * ((int) (*fAngle / 360) + 1);
   if (*fAngle < -180)
	  *fAngle += 360 * ((int) (-*fAngle / 360) + 1);
 
   // if we're still above the limit then something's REALLY fuckedup!!!
   if ((*fAngle >= 180) || (*fAngle < -180))
	  *fAngle = 0; // no mercy.
}
try this one now.
http://racc.bots-united.com/releases/podbot.zip
still uploading as I write this.

*edit* upload finished, go for it.



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."

Last edited by Pierre-Marie Baty; 10-03-2004 at 18:23..