(disarm): Give disarmed nuke to sector owner. This was forgotten in

rev. 1.15.
(gift): Extend to nukes.
This commit is contained in:
Markus Armbruster 2006-06-18 17:15:38 +00:00
parent fe5edc3ef0
commit f68ee899e1
2 changed files with 10 additions and 0 deletions

View file

@ -128,6 +128,8 @@ disarm(void)
struct plnstr pl;
struct nukstr nuke;
struct nstr_item ni;
struct sctstr sect;
char buf[128];
if (!snxtitem(&ni, EF_PLANE, player->argp[1]))
return RET_SYN;
@ -147,6 +149,11 @@ disarm(void)
CANT_REACH();
continue;
}
getsect(nuke.nuk_x, nuke.nuk_y, &sect);
snprintf(buf, sizeof(buf), "unloaded in your %s at %s",
dchr[sect.sct_type].d_name,
xyas(sect.sct_x, sect.sct_y, sect.sct_own));
gift(sect.sct_own, player->cnum, &nuke, EF_NUKE, buf);
nuke.nuk_plane = -1;
pl.pln_nuketype = -1;
pl.pln_flags &= ~PLN_AIRBURST;

View file

@ -335,6 +335,9 @@ gift(natid givee, natid giver, void *ptr, int type, char *mesg)
case EF_LAND:
p = prland(ptr);
break;
case EF_NUKE:
p = prnuke(ptr);
break;
default:
CANT_REACH();
p = "a red herring";