BSD 4_2 release
[unix-history] / usr / src / games / trek / destruct.c
index fad5711..7640caf 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)destruct.c 4.1     (Berkeley)      %G%";
+static char sccsid[] = "@(#)destruct.c 4.3     (Berkeley)      5/27/83";
 #endif not lint
 
 # include      "trek.h"
 #endif not lint
 
 # include      "trek.h"
@@ -28,7 +28,7 @@ destruct()
 {
        char            checkpass[15];
        register int    i, j;
 {
        char            checkpass[15];
        register int    i, j;
-       float           zap;
+       double          zap;
 
        if (damaged(COMPUTER))
                return (out(COMPUTER));
 
        if (damaged(COMPUTER))
                return (out(COMPUTER));
@@ -63,13 +63,13 @@ destruct()
        Game.killed = 1;
        /* let's see what we can blow up!!!! */
        zap = 20.0 * Ship.energy;
        Game.killed = 1;
        /* let's see what we can blow up!!!! */
        zap = 20.0 * Ship.energy;
-       Game.deaths =+ Ship.crew;
+       Game.deaths += Ship.crew;
        for (i = 0; i < Etc.nkling; )
        {
                if (Etc.klingon[i].power * Etc.klingon[i].dist <= zap)
                        killk(Etc.klingon[i].x, Etc.klingon[i].y);
                else
        for (i = 0; i < Etc.nkling; )
        {
                if (Etc.klingon[i].power * Etc.klingon[i].dist <= zap)
                        killk(Etc.klingon[i].x, Etc.klingon[i].y);
                else
-                       i =+ 1;
+                       i++;
        }
        /* if we didn't kill the last Klingon (detected by killk), */
        /* then we lose.... */
        }
        /* if we didn't kill the last Klingon (detected by killk), */
        /* then we lose.... */