From 0faffa9f2fbaeca708687e5d092f05454d7302d3 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Tue, 4 Aug 2009 15:29:46 +0000 Subject: [PATCH] ... only if not a new building --- src/common/kernel/build.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/common/kernel/build.c b/src/common/kernel/build.c index 67087897b..4dce24d32 100644 --- a/src/common/kernel/build.c +++ b/src/common/kernel/build.c @@ -882,14 +882,16 @@ build_building(unit * u, const building_type * btype, int want, order * ord) } n = 1; } - if (rule_other<0) { - rule_other = get_param_int(global.parameters, "rules.build.other_buildings", 1); - } - if (!rule_other) { - unit * owner = buildingowner(r, b); - if (!owner || owner->faction!=u->faction) { - cmistake(u, ord, 1222, MSG_PRODUCE); - return; + if (b) { + if (rule_other<0) { + rule_other = get_param_int(global.parameters, "rules.build.other_buildings", 1); + } + if (!rule_other) { + unit * owner = buildingowner(r, b); + if (!owner || owner->faction!=u->faction) { + cmistake(u, ord, 1222, MSG_PRODUCE); + return; + } } }