(disarm): Give disarmed nuke to sector owner. This was forgotten in
rev. 1.15. (gift): Extend to nukes.
This commit is contained in:
parent
fe5edc3ef0
commit
f68ee899e1
2 changed files with 10 additions and 0 deletions
|
@ -128,6 +128,8 @@ disarm(void)
|
||||||
struct plnstr pl;
|
struct plnstr pl;
|
||||||
struct nukstr nuke;
|
struct nukstr nuke;
|
||||||
struct nstr_item ni;
|
struct nstr_item ni;
|
||||||
|
struct sctstr sect;
|
||||||
|
char buf[128];
|
||||||
|
|
||||||
if (!snxtitem(&ni, EF_PLANE, player->argp[1]))
|
if (!snxtitem(&ni, EF_PLANE, player->argp[1]))
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
|
@ -147,6 +149,11 @@ disarm(void)
|
||||||
CANT_REACH();
|
CANT_REACH();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
getsect(nuke.nuk_x, nuke.nuk_y, §);
|
||||||
|
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;
|
nuke.nuk_plane = -1;
|
||||||
pl.pln_nuketype = -1;
|
pl.pln_nuketype = -1;
|
||||||
pl.pln_flags &= ~PLN_AIRBURST;
|
pl.pln_flags &= ~PLN_AIRBURST;
|
||||||
|
|
|
@ -335,6 +335,9 @@ gift(natid givee, natid giver, void *ptr, int type, char *mesg)
|
||||||
case EF_LAND:
|
case EF_LAND:
|
||||||
p = prland(ptr);
|
p = prland(ptr);
|
||||||
break;
|
break;
|
||||||
|
case EF_NUKE:
|
||||||
|
p = prnuke(ptr);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
CANT_REACH();
|
CANT_REACH();
|
||||||
p = "a red herring";
|
p = "a red herring";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue