diff --git a/src/common/gamecode/laws.c b/src/common/gamecode/laws.c index 2f00d986d..b73dc2fba 100644 --- a/src/common/gamecode/laws.c +++ b/src/common/gamecode/laws.c @@ -221,7 +221,7 @@ get_food(region *r) * jede Einheit genug Silber für ihren Unterhalt hat. */ for (u = r->units; u; u = u->next) { - int style = lifestyle(u); + int style = INCOME_FISHING; int need = style; /* Erstmal zurücksetzen */ @@ -230,22 +230,20 @@ get_food(region *r) if (u->ship && (u->ship->flags&SF_FISHING)) { unit * v; int c = 2; - for (v=r->units;c>0 && v;v=v->next) { + for (v=u;c>0 && v;v=v->next) { if (v->ship==u->ship) { - if (u==v) { - int get = 0; - if (u->number==c) { - get = need; - } else { - int x = MIN(c, u->number); - get = (style * x) / u->number; - } - if (get) { - change_money(u, get); - } + int get = 0; + if (v->number==c) { + get = need; + } else { + int x = MIN(c, v->number); + get = (style * x) / v->number; + } + if (get) { + change_money(v, get); } - c -= v->number; } + c -= v->number; } u->ship->flags -= SF_FISHING; } diff --git a/src/common/kernel/ship.h b/src/common/kernel/ship.h index d5f2c0d09..0e1ae3ceb 100644 --- a/src/common/kernel/ship.h +++ b/src/common/kernel/ship.h @@ -75,6 +75,8 @@ extern void st_register(const ship_type * type); #define SF_SELECT 1<<3 /* previously FL_DH */ #define SF_FISHING 1<<4 /* was on an ocean, can fish */ +#define INCOME_FISHING 10 + typedef struct ship { struct ship *next; struct ship *nexthash;