From 6ce608e874cf60dffe59fdbdedfb74e13f78382c Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 20 Jan 2005 06:01:20 +0000 Subject: [PATCH] Merge more SERGEEV stuff. --- moving.c | 25 ++++++++++++++++++++++++- planets.c | 2 +- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/moving.c b/moving.c index 8aa48f0..0690ac8 100644 --- a/moving.c +++ b/moving.c @@ -220,7 +220,8 @@ void dock(int l) { return; } condit = IHDOCKED; - prout("Docked."); + if (l) prout("Docked."); + ididit=1; if (energy < inenrg) energy = inenrg; shield = inshld; torps = intorps; @@ -888,6 +889,9 @@ void help(void) { /* There's more than one way to move in this game! */ double ddist, xdist, probf; int line = 0, l, ix, iy; +#ifdef SERGEEV + int pox, posy; +#endif /* SERGEEV */ chew(); /* Test for conditions which prevent calling for help */ @@ -935,6 +939,25 @@ void help(void) { proutn(""); crmshp(); prout(" dematerializes."); +#ifdef SERGEEV + sectx=0; + for (l = 1; l <= 5; l++) { + ix = basex+3.0*Rand()-1; + iy = basey+3.0*Rand()-1; + if (ix>=1 && ix<=10 && iy>=1 && iy<=10 && game.quad[ix][iy]==IHDOT) { + /* found one -- finish up */ + sectx=ix; + secty=iy; + game.quad[ix][iy]=IHMATER0; + break; + } + } + if (sectx==0){ + prout("You have been lost in space..."); + finish(FMATERIALIZE); + return; + } +#endif /* SERGEEV */ /* Give starbase three chances to rematerialize starship */ probf = pow((1.0 - pow(0.98,ddist)), 0.33333333); for (l = 1; l <= 3; l++) { diff --git a/planets.c b/planets.c index 8551c8e..eed3210 100644 --- a/planets.c +++ b/planets.c @@ -320,7 +320,7 @@ void shuttle(void) { proutn(" a maneuver would require approximately 2d%% of our", (int)(100*Time/game.state.remtime)); prout("remaining time."); - prout("Are you sure this is wise?\" "); + proutn("Are you sure this is wise?\" "); if (ja()==0) { Time = 0.0; return; -- 2.31.1