]> git.pond.sub.org Git - empserver/commitdiff
Make disabled recursive supply in s_commod() compile again
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 20 Jun 2010 16:34:58 +0000 (18:34 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 25 Jul 2010 15:48:53 +0000 (17:48 +0200)
Untested.  Broken in commit 98f24d5c, v4.3.20.

src/lib/subs/supply.c

index 73e9a6a2576d8d4d398342c96052a5cd70157dda..e7582aadca35f59f078a059111aa09dc7863e20f 100644 (file)
@@ -359,9 +359,11 @@ s_commod(struct empobj *sink, short *vec,
            putland(land.lnd_uid, &land);
            save.lnd_seqno = land.lnd_seqno;
 
-           land.lnd_item[type] =
-               save.lnd_item[type] + s_commod(own, land.lnd_x, land.lnd_y,
-                                              type, wanted, actually_doit);
+           s_commod((struct empobj *)&land, land.lnd_item, type, wanted,
+                    lchr[land.lnd_type].l_item[type] - wanted,
+                    actually_doit);
+           land.lnd_item[type] += save.lnd_item[type];
+
            if (actually_doit)
                putland(land.lnd_uid, &land);
            else