fixed drift problem
authorEdward Wang <edward@ucbvax.Berkeley.EDU>
Fri, 28 Oct 1983 04:57:43 +0000 (20:57 -0800)
committerEdward Wang <edward@ucbvax.Berkeley.EDU>
Fri, 28 Oct 1983 04:57:43 +0000 (20:57 -0800)
SCCS-vsn: games/sail/dr_2.c 1.6

usr/src/games/sail/dr_2.c

index 80e6c44..8dbd07a 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char *sccsid = "@(#)dr_2.c      1.5 83/10/14";
+static char *sccsid = "@(#)dr_2.c      1.6 83/10/27";
 #endif
 
 #include "driver.h"
 #endif
 
 #include "driver.h"
@@ -222,13 +222,13 @@ register char *drift;
        if (!moved) {
                if (++*drift > 2) {
                        if (ship->specs->class >= 3 && !snagged(ship)
        if (!moved) {
                if (++*drift > 2) {
                        if (ship->specs->class >= 3 && !snagged(ship)
-                           || turn % 2 == 0) {
+                           || (turn & 1) == 0) {
                                *row -= dr[winddir];
                                *col -= dc[winddir];
                        }
                }
        } else
                                *row -= dr[winddir];
                                *col -= dc[winddir];
                        }
                }
        } else
-               drift = 0;
+               *drift = 0;
 }
 
 try(command, temp, ma, ta, af, vma, dir, f, t, high, rakeme)
 }
 
 try(command, temp, ma, ta, af, vma, dir, f, t, high, rakeme)