]> git.pond.sub.org Git - empserver/commit
Don't let automatic supply starve the sector containing the sink
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 15 Feb 2009 13:38:09 +0000 (14:38 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Tue, 17 Feb 2009 18:30:35 +0000 (19:30 +0100)
commit6ac9ad66e104b1b5d2c20c3ab52e22efc1dfe168
tree040674facf4f8dc8dcf75c21788e494fa8c068c4
parentc4a0f995738aae75e9bdf340f56eabed7f6494e1
Don't let automatic supply starve the sector containing the sink

Automatic supply always leaves enough food to avoid starvation in
supply sources, except for one case: when drawing supplies from the
sector containing the sink.

This behavior contradicted info supply.  However, do_feed() used to
rely on it (it would have wiped out food without it).  Supply use
there was removed in commit 7da69c92, so we can now fix this.

Affected by this is the automatic food supply of land units in combat,
and the food supply in commands supply, load and lload.  Except supply
is disabled due to bugs in the last two.
src/lib/subs/supply.c