From 53a531446368260d0cce31682c7bb9d5a8ee6944 Mon Sep 17 00:00:00 2001 From: CTD Date: Fri, 8 Aug 2014 17:27:13 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20f=C3=BCr=20E2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Die Abfrage der Option war ohne Default, so das sie hier immer an war. In E2 führ das dann wegen cmp_taxes zur assertion. Das wars, jetzt sollte alles rund sein. --- src/economy.c | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/src/economy.c b/src/economy.c index fa1440eaf..87c30cb99 100644 --- a/src/economy.c +++ b/src/economy.c @@ -1017,26 +1017,25 @@ static bool maintain(building * b, bool first) bool paid = true, work = first; unit *u; - if (fval(b, BLD_MAINTAINED) || b->type == NULL || b->type->maintenance == NULL - || is_cursed(b->attribs, C_NOCOST, 0)) { - fset(b, BLD_MAINTAINED); - fset(b, BLD_WORKING); - return true; - } - if (fval(b, BLD_DONTPAY)) { - return false; - } - u = building_owner(b); - if (u == NULL) - return false; - /* If the owner is the region owner, check if biggest castle has the dontpay flag */ - if (get_param(global.parameters, "rules.region_owner_pay_building")) { - if (u == building_owner(largestbuilding(r, &cmp_taxes, false))) { - if (fval(u->building, BLD_DONTPAY)) { - return false; - } - } - } + if (fval(b, BLD_MAINTAINED) || b->type == NULL || b->type->maintenance == NULL || is_cursed(b->attribs, C_NOCOST, 0)) { + fset(b, BLD_MAINTAINED); + fset(b, BLD_WORKING); + return true; + } + if (fval(b, BLD_DONTPAY)) { + return false; + } + u = building_owner(b); + if (u == NULL) + return false; + /* If the owner is the region owner, check if biggest castle has the dontpay flag */ + if (check_param(global.parameters, "rules.region_owner_pay_building", b->type->_name)) { + if (u == building_owner(largestbuilding(r, &cmp_taxes, false))) { + if (fval(u->building, BLD_DONTPAY)) { + return false; + } + } + } for (c = 0; b->type->maintenance[c].number; ++c) { const maintenance *m = b->type->maintenance + c; int need = m->number;