Merge more SERGEEV stuff.
authorEric S. Raymond <esr@thyrsus.com>
Thu, 20 Jan 2005 06:01:20 +0000 (06:01 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 20 Jan 2005 06:01:20 +0000 (06:01 +0000)
moving.c
planets.c

index 8aa48f07a87d9769871672836120b7e0d1af4c05..0690ac82f31d1b16434786c4a7e42f3a5836d62d 100644 (file)
--- a/moving.c
+++ b/moving.c
@@ -220,7 +220,8 @@ void dock(int l) {
                return;\r
        }\r
        condit = IHDOCKED;\r
-       prout("Docked.");\r
+        if (l) prout("Docked.");\r
+        ididit=1;\r
        if (energy < inenrg) energy = inenrg;\r
        shield = inshld;\r
        torps = intorps;\r
@@ -888,6 +889,9 @@ void help(void) {
        /* There's more than one way to move in this game! */\r
        double ddist, xdist, probf;\r
        int line = 0, l, ix, iy;\r
+#ifdef SERGEEV\r
+       int pox, posy;\r
+#endif /* SERGEEV */\r
 \r
        chew();\r
        /* Test for conditions which prevent calling for help */\r
@@ -935,6 +939,25 @@ void help(void) {
        proutn("");\r
        crmshp();\r
        prout(" dematerializes.");\r
+#ifdef SERGEEV\r
+        sectx=0;\r
+        for (l = 1; l <= 5; l++) {\r
+                ix = basex+3.0*Rand()-1;\r
+                iy = basey+3.0*Rand()-1;\r
+                if (ix>=1 && ix<=10 && iy>=1 && iy<=10 && game.quad[ix][iy]==IHDOT) {\r
+                        /* found one -- finish up */\r
+                        sectx=ix;\r
+                        secty=iy;\r
+                        game.quad[ix][iy]=IHMATER0;\r
+                        break;\r
+                }\r
+        }\r
+        if (sectx==0){\r
+           prout("You have been lost in space...");\r
+           finish(FMATERIALIZE);\r
+           return;\r
+        }\r
+#endif /* SERGEEV */\r
        /* Give starbase three chances to rematerialize starship */\r
        probf = pow((1.0 - pow(0.98,ddist)), 0.33333333);\r
        for (l = 1; l <= 3; l++) {\r
index 8551c8e9534847a94402c77a053ff68691e1867e..eed32104fea1cccc1cdbe509124fdc1e3a809730 100644 (file)
--- a/planets.c
+++ b/planets.c
@@ -320,7 +320,7 @@ void shuttle(void) {
                proutn("  a maneuver would require approximately 2d%% of our",\r
                      (int)(100*Time/game.state.remtime));\r
                prout("remaining time.");\r
-               prout("Are you sure this is wise?\" ");\r
+               proutn("Are you sure this is wise?\" ");\r
                if (ja()==0) {\r
                        Time = 0.0;\r
                        return;\r