From 6c639f1481d72c4e50c9582a0362573fe8ff7224 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Mon, 29 Mar 2010 17:39:07 +0200 Subject: [PATCH] Fix sabo not to kill the spy every time The hack to protect the spy from sabotage damage killed it outright. Broken in 861a6662, v4.3.17. --- src/lib/commands/sabo.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/lib/commands/sabo.c b/src/lib/commands/sabo.c index 98a12d75..5f568c42 100644 --- a/src/lib/commands/sabo.c +++ b/src/lib/commands/sabo.c @@ -41,7 +41,7 @@ int sabo(void) { struct nstr_item ni; - struct lndstr land; + struct lndstr land, tmp; struct sctstr sect; double odds; int dam; @@ -96,13 +96,14 @@ sabo(void) } /* hack: hide the spy so it don't gets blasted by sectdamage() */ - land.lnd_own = 0; - putland(land.lnd_uid, &land); + tmp = land; + tmp.lnd_own = 0; + putland(land.lnd_uid, &tmp); + land.lnd_seqno = tmp.lnd_seqno; sectdamage(§, dam); putsect(§); - land.lnd_own = player->cnum; if (chance(odds)) { pr("%s dies in explosion.\n", prland(&land)); land.lnd_effic = 0;