* Thanks goes also to Brian Paul for making it possible and inexpensive
* to use OpenGL at home.
*
- * My e-mail address is lassauge@sagem.fr
+ * My e-mail address is lassauge@users.sourceforge.net
*
* Eric Lassauge (May-13-1998)
*
void
SharkPilot(fishRec * fish, float sharkspeed)
{
- static int sign = 1;
float X, Y, Z, tpsi, ttheta, thetal;
fish->xt = 60000.0;
}
} else {
if (NRAND(100) > 98) {
- sign = 1 - sign;
+ fish->sign = (fish->sign < 0 ? 1 : -1);
}
- fish->psi += sign;
+ fish->psi += (fish->sign ? 1 : -1);
if (fish->psi > 180.0) {
fish->psi -= 360.0;
}