From a0bd0378c32d83a0e080bd01c83c06bf61f12f2e Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Tue, 6 Aug 2019 20:04:47 +0200 Subject: [PATCH] rechenfehler unterhaltung --- src/economy.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/economy.c b/src/economy.c index 68c2fd0e1..52a56b9cd 100644 --- a/src/economy.c +++ b/src/economy.c @@ -2027,11 +2027,13 @@ int entertain_cmd(unit * u, struct order *ord, econ_request **io_req) wants = u->number * (entertainbase + effskill(u, SK_ENTERTAINMENT, NULL) * entertainperlevel); max_e = getuint(); - if (max_e != 0) { - if (wants > max_e) wants = max_e; + if (max_e != 0 && wants > max_e) { + wants = max_e; + } + if (max_e > 0) { + add_request(req++, ECON_ENTERTAIN, u, ord, max_e); + *io_req = req; } - add_request(req++, ECON_ENTERTAIN, u, ord, max_e); - *io_req = req; return max_e; }