No, everyone has them, you need to be patient. Cheer up :)
Just always know that this is c language, there is no magic, if something does not work then you can find out why always. Add as much printf as you can to do that..
Like that
void checkcollision()
{
float x1 = tanks[0].x;
float y1 = tanks[0].y;
float x2 = tanks[1].x;
float y2 = tanks[1].y;
float dist = sqrt((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2));
float dr = tanks[0].rad+tanks[1].rad;
printf("dist: %f, radius+radius: %f\n",dist, dr);
if(1 < 2)
{
puts("yes");
}
else
{
puts("wtf");
}
if(dist < dr) ;
{
printf("checkcollision read true\n");
printf("dist: %f, radius+radius: %f\n",dist,dr);
goback(0); goback(1);
}
}
thank you. Am I the only one who has trouble seeing small problems in walls of text that comprise code? This is depressing.