/* sail.c */
extern void sail_ship(natid);
/* sect.c */
-extern int dodeliver(struct sctstr *, int *);
+extern void dodeliver(struct sctstr *);
extern void do_fallout(register struct sctstr *, register int);
extern void spread_fallout(struct sctstr *, int);
extern void decay_fallout(struct sctstr *, int);
register struct sctstr *sp;
struct natstr *np;
int n;
- int vec[I_MAX + 1];
- int changed;
struct distinfo *infptr;
if (g_distptrs == (struct distinfo *)0) {
np = getnatp(sp->sct_own);
if (np->nat_money < 0)
continue;
- changed = 0;
- if (getvec(VT_ITEM, vec, (s_char *)sp, EF_SECTOR) > 0)
- changed += dodeliver(sp, vec);
- if (changed)
- putvec(VT_ITEM, vec, (s_char *)sp, EF_SECTOR);
+ dodeliver(sp);
}
logerror("done delivering\n");
#include "lost.h"
#include "gen.h"
-int
-dodeliver(struct sctstr *sp, int *vec)
+void
+dodeliver(struct sctstr *sp)
{
register int i;
int thresh;
int dir;
int plague;
int n;
- int changed;
if (sp->sct_mobil <= 0)
- return 0;
- changed = 0;
+ return;
plague = sp->sct_pstage;
for (i = 1; i <= I_MAX; i++) {
if (sp->sct_del[i] == 0)
continue;
thresh = sp->sct_del[i] & ~0x7;
dir = sp->sct_del[i] & 0x7;
- n = deliver(sp, &ichr[i], dir, thresh, vec[i], plague);
+ n = deliver(sp, &ichr[i], dir, thresh, sp->sct_item[i], plague);
if (n > 0) {
- vec[i] -= n;
- changed++;
+ sp->sct_item[i] -= n;
if (sp->sct_mobil <= 0)
break;
}
}
- return changed;
}
/*