X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fglx%2Fswim.c;h=e20655a2935b1e3b7a536d4ae82c6516a31f5264;hb=488f2fa8fbdbc77e91a70da2962d73af49e6cace;hp=0848d46db259f49af1bbc477f034bee971106c63;hpb=ce3185de9d9705e259f2b60dd4b5509007fa17d4;p=xscreensaver diff --git a/hacks/glx/swim.c b/hacks/glx/swim.c index 0848d46d..e20655a2 100644 --- a/hacks/glx/swim.c +++ b/hacks/glx/swim.c @@ -1,8 +1,7 @@ /* atlantis --- Shows moving 3D sea animals */ -#if !defined( lint ) && !defined( SABER ) +#if 0 static const char sccsid[] = "@(#)swim.c 1.3 98/06/18 xlockmore"; - #endif /* Copyright (c) E. Lassauge, 1998. */ @@ -30,7 +29,7 @@ static const char sccsid[] = "@(#)swim.c 1.3 98/06/18 xlockmore"; * 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) * @@ -110,7 +109,6 @@ WhalePilot(fishRec * fish, float whalespeed, Bool whaledir) void SharkPilot(fishRec * fish, float sharkspeed) { - static int sign = 1; float X, Y, Z, tpsi, ttheta, thetal; fish->xt = 60000.0; @@ -158,9 +156,9 @@ SharkPilot(fishRec * fish, float sharkspeed) } } 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; }