multifire() failed to take into account that the firing firing sector,
ship or land unit can change while it is getting the target argument.
It thus clobbered any updates made to the firing object while it was
sleeping for the target argument. Abusable. Broken when Chainsaw
introduced MULTIFIRE.
y = vsect.sct_y;
}
if (type == EF_SHIP) {
+ if (!check_ship_ok(&fship))
+ return RET_FAIL;
if (fship.shp_own != player->cnum) {
pr("Not your ship!\n");
continue;
putship(fship.shp_uid, &fship);
}
} else if (type == EF_LAND) {
+ if (!check_land_ok(&fland))
+ return RET_FAIL;
if (fland.lnd_own != player->cnum) {
pr("Not your unit!\n");
continue;
dam = ldround(dam / 2.0, 1);
}
} else {
+ if (!check_sect_ok(&fsect))
+ return RET_FAIL;
fx = fsect.sct_x;
fy = fsect.sct_y;
if (fsect.sct_own != player->cnum ||