]> git.pond.sub.org Git - empserver/blobdiff - src/lib/update/bp.c
Update copyright notice.
[empserver] / src / lib / update / bp.c
index ab3038d25cf8ecd0746a33267aff7364f2d8a579..7dfa6485467bae71a193578419cca40c08ea78e4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2000, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2004, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                           Ken Stevens, Steve McClure
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -44,8 +44,7 @@
 static int bud_key[I_MAX + 2] =
     { 0, 1, 2, 3, 4, 0, 0, 0, 0, 0, 0, 5, 6, 0, 0, 7 };
 
-int
-*
+int *
 get_wp(int *bp, struct sctstr *sp, int cm)
 {
     return (bp + (sp->sct_x + (sp->sct_y * WORLD_X)) +
@@ -57,11 +56,9 @@ gt_bg_nmbr(int *bp, struct sctstr *sp, int comm)
 {
     int *wp;
     int cm;
-    int svec[I_MAX + 1];
 
     if ((cm = bud_key[comm]) == 0) {
-       getvec(VT_ITEM, svec, (s_char *)sp, EF_SECTOR);
-       return svec[comm];
+       return sp->sct_item[comm];
     } else {
        wp = get_wp(bp, sp, cm);
        return *wp;
@@ -83,16 +80,13 @@ pt_bg_nmbr(int *bp, struct sctstr *sp, int comm, int amount)
 void
 fill_update_array(int *bp, struct sctstr *sp)
 {
-    int vec[I_MAX + 1];
     int i, k;
     int *wp;
 
-    if (getvec(VT_ITEM, vec, (s_char *)sp, EF_SECTOR) <= 0)
-       return;
     for (i = 1; i <= I_MAX; i++)
        if ((k = bud_key[i]) != 0) {
            wp = get_wp(bp, sp, k);
-           *wp = vec[i];
+           *wp = sp->sct_item[i];
        }
     wp = get_wp(bp, sp, bud_key[I_MAX + 1]);
     *wp = sp->sct_avail;