From 693c1a64c3bc72e8bc071ecd079ed12ae0d13b74 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sat, 13 Sep 2008 17:07:15 -0400 Subject: [PATCH] Fix when scuttle_tradeship() asks for confirmation Fix scuttle to ask for confirmation when scuttling a tradeship in an unsuitable sector even when the tradeship is pirated. Broken when commit a99bc3be (v4.2.13) suppressed that for pirated tradeships wholesale because it let pirates ferret out where the ship was built. --- src/lib/commands/scut.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/commands/scut.c b/src/lib/commands/scut.c index deb04d5e..0446ed7f 100644 --- a/src/lib/commands/scut.c +++ b/src/lib/commands/scut.c @@ -156,7 +156,7 @@ scuttle_tradeship(struct shpstr *sp, int interactive) { float cash = 0; float ally_cash = 0; - int dist; + int dist = -1; struct sctstr sect; struct mchrstr *mp; struct natstr *np; @@ -202,7 +202,7 @@ scuttle_tradeship(struct shpstr *sp, int interactive) wu(0, sp->shp_own, "Unfortunately, you make $0 on this trade.\n"); } else if (cash && interactive) { player->dolcost -= cash; - } else if (interactive && sp->shp_own == sp->shp_orig_own) { + } else if (interactive && (dist < 0 || sp->shp_own == sp->shp_orig_own)) { pr("You won't get any money if you scuttle in %s!", xyas(sp->shp_x, sp->shp_y, player->cnum)); sprintf(buf, "Are you sure you want to scuttle %s? ", prship(sp));