]> git.pond.sub.org Git - empserver/commitdiff
(nxtitemp): Remove last parameter. Non-zero argument doesn't make
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 28 May 2005 08:22:42 +0000 (08:22 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 28 May 2005 08:22:42 +0000 (08:22 +0000)
sense and is never passed.  Callers changed.

include/prototypes.h
src/lib/update/nxtitemp.c
src/lib/update/revolt.c
src/lib/update/ship.c

index 74ae8c5e3918b779c4644949c0004a0725b7012c..b988d7f2489eb0c93f7e6d883d193c858c89a1a5 100644 (file)
@@ -771,7 +771,7 @@ extern int load_it(struct shpstr *, struct sctstr *,
 extern void unload_it(struct shpstr *);
 extern void auto_fuel_ship(struct shpstr *);
 /* nxtitemp.c */
-extern s_char *nxtitemp(struct nstr_item *, int);
+extern s_char *nxtitemp(struct nstr_item *);
 /* nxtsctp.c */
 extern struct sctstr *nxtsctp(register struct nstr_sect *);
 /* plague.c */
index ba8379f5590a1bdb5704f17e27f66f965d009432..a9088c594b28daff1897230cd7fcc85a1c638440 100644 (file)
@@ -44,7 +44,7 @@
 #include "common.h"
 
 s_char *
-nxtitemp(struct nstr_item *np, int owner)
+nxtitemp(struct nstr_item *np)
 {
     struct genitem *gp;
     int selected;
@@ -66,13 +66,7 @@ nxtitemp(struct nstr_item *np, int owner)
 
        selected = 1;
        switch (np->sel) {
-           /*
-            * This one won't work unless you're running in emp_player
-            *
-            */
        case NS_LIST:
-           if ((np->flags & EFF_OWNER) && !owner)
-               selected = 0;
            break;
        case NS_ALL:
            /* XXX maybe combine NS_LIST and NS_ALL later */
index fa7e985b84a55dd07a9b0bbcaca0f86a428ca539..1c489603767f9361eb67f4e6d29cb75b2fdca9e2 100644 (file)
@@ -168,7 +168,7 @@ guerrilla(struct sctstr *sp)
 
     snxtitem_xy(&ni, EF_LAND, sp->sct_x, sp->sct_y);
 
-    while (NULL != (lp = (struct lndstr *)nxtitemp(&ni, 0))) {
+    while (NULL != (lp = (struct lndstr *)nxtitemp(&ni))) {
        if (lp->lnd_own != sp->sct_own)
            continue;
 
@@ -463,7 +463,7 @@ take_casualties(struct sctstr *sp, int mc)
      * Try not to kill any unit.
      */
     snxtitem_xy(&ni, EF_LAND, sp->sct_x, sp->sct_y);
-    while (NULL != (lp = (struct lndstr *)nxtitemp(&ni, 0))) {
+    while (NULL != (lp = (struct lndstr *)nxtitemp(&ni))) {
        nunits++;
        if (lchr[(int)lp->lnd_type].l_flags & L_SECURITY)
            nunits++;
@@ -476,7 +476,7 @@ take_casualties(struct sctstr *sp, int mc)
 
     /* kill some security troops */
     snxtitem_xy(&ni, EF_LAND, sp->sct_x, sp->sct_y);
-    while (NULL != (lp = (struct lndstr *)nxtitemp(&ni, 0))) {
+    while (NULL != (lp = (struct lndstr *)nxtitemp(&ni))) {
        if (!(lchr[(int)lp->lnd_type].l_flags & L_SECURITY))
            continue;
 
@@ -507,7 +507,7 @@ take_casualties(struct sctstr *sp, int mc)
 
     /* kill some normal troops */
     snxtitem_xy(&ni, EF_LAND, sp->sct_x, sp->sct_y);
-    while (NULL != (lp = (struct lndstr *)nxtitemp(&ni, 0))) {
+    while (NULL != (lp = (struct lndstr *)nxtitemp(&ni))) {
        if (lchr[(int)lp->lnd_type].l_flags & L_SECURITY)
            continue;
 
@@ -535,7 +535,7 @@ take_casualties(struct sctstr *sp, int mc)
     /* Hmm.. still some left.. kill off units now */
     /* kill some normal troops */
     snxtitem_xy(&ni, EF_LAND, sp->sct_x, sp->sct_y);
-    while (NULL != (lp = (struct lndstr *)nxtitemp(&ni, 0))) {
+    while (NULL != (lp = (struct lndstr *)nxtitemp(&ni))) {
        if (lchr[(int)lp->lnd_type].l_flags & L_SECURITY)
            continue;
 
@@ -553,7 +553,7 @@ take_casualties(struct sctstr *sp, int mc)
     /* Hmm.. still some left.. kill off units now */
     /* kill some security troops */
     snxtitem_xy(&ni, EF_LAND, sp->sct_x, sp->sct_y);
-    while (NULL != (lp = (struct lndstr *)nxtitemp(&ni, 0))) {
+    while (NULL != (lp = (struct lndstr *)nxtitemp(&ni))) {
        if (!(lchr[(int)lp->lnd_type].l_flags & L_SECURITY))
            continue;
 
index 5e8e5652b5dea3ff70a619f3c45257c226204066..8b46266710c1e52bfa5a28ff00f81ad9ff3518f0 100644 (file)
@@ -393,7 +393,7 @@ shiprepair(struct shpstr *ship, struct natstr *np,
 
     np->nat_money -= mult * mp->m_cost * build / 100.0;
     if (!player->simulation)
-       ship->shp_effic += (s_char)build;
+       ship->shp_effic += build;
     return 1;
 }
 
@@ -431,7 +431,7 @@ feed_ship(struct shpstr *sp, int etus, int *needed, int doit)
 /* doit - only steal food from land units during the update */
     if (ifood_eaten > sp->shp_item[I_FOOD] && sp->shp_nland > 0 && doit) {
        snxtitem_all(&ni, EF_LAND);
-       while ((lp = (struct lndstr *)nxtitemp(&ni, 0)) &&
+       while ((lp = (struct lndstr *)nxtitemp(&ni)) &&
               ifood_eaten > sp->shp_item[I_FOOD]) {
            if (lp->lnd_ship != sp->shp_uid)
                continue;