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.
This commit is contained in:
Markus Armbruster 2010-03-29 17:39:07 +02:00
parent 6e9dd173dd
commit 6c639f1481

View file

@ -41,7 +41,7 @@ int
sabo(void) sabo(void)
{ {
struct nstr_item ni; struct nstr_item ni;
struct lndstr land; struct lndstr land, tmp;
struct sctstr sect; struct sctstr sect;
double odds; double odds;
int dam; int dam;
@ -96,13 +96,14 @@ sabo(void)
} }
/* hack: hide the spy so it don't gets blasted by sectdamage() */ /* hack: hide the spy so it don't gets blasted by sectdamage() */
land.lnd_own = 0; tmp = land;
putland(land.lnd_uid, &land); tmp.lnd_own = 0;
putland(land.lnd_uid, &tmp);
land.lnd_seqno = tmp.lnd_seqno;
sectdamage(&sect, dam); sectdamage(&sect, dam);
putsect(&sect); putsect(&sect);
land.lnd_own = player->cnum;
if (chance(odds)) { if (chance(odds)) {
pr("%s dies in explosion.\n", prland(&land)); pr("%s dies in explosion.\n", prland(&land));
land.lnd_effic = 0; land.lnd_effic = 0;