by getvec(). This is safe, because the new code changes the item
array precisely when the old code writes back a changed copy.
{
int i;
int still_left;
- int svec[I_MAX + 1];
- getvec(VT_ITEM, svec, (s_char *)sp, EF_SECTOR);
for (i = 1; i <= I_MAX; i++) {
if (mvec[i] == 0)
continue;
else
still_left -= mvec[i];
pt_bg_nmbr(bp, sp, i, still_left);
- svec[i] = still_left;
if (!player->simulation)
- putvec(VT_ITEM, svec, (s_char *)sp, EF_SECTOR);
+ sp->sct_item[i] = still_left;
} else {
still_left = gt_bg_nmbr(bp, sp, i);