From 854135b934f246800b7f4f15c45227a326519533 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Thu, 28 Aug 2008 11:45:49 +0000 Subject: [PATCH] - K_GM can be disabled http://bugs.eressea.de/view.php?id=1470 "mit Katapulten kann man nicht bewachen" fixed siege_weapons parameter Issue: 1470 --- src/common/gamecode/laws.c | 10 +++++++--- src/common/kernel/battle.c | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/common/gamecode/laws.c b/src/common/gamecode/laws.c index e5015642c..32eddde35 100644 --- a/src/common/gamecode/laws.c +++ b/src/common/gamecode/laws.c @@ -3803,11 +3803,15 @@ init_processor(void) } #if INFOCMD_MODULE - add_proc_global(p, &infocommands, NULL); + if (!global.disabled[K_INFO]) { + add_proc_global(p, &infocommands, NULL); + } #endif - add_proc_global(p, &gmcommands, "GM Kommandos"); + if (!global.disabled[K_GM]) { + add_proc_global(p, &gmcommands, "GM Kommandos"); + } - p += 10; /* in case it has any effects on allincevictories */ + p += 10; /* in case it has any effects on alliance victories */ add_proc_order(p, K_LEAVE, &leave_cmd, 0, "Verlassen"); if (!nobattle) { diff --git a/src/common/kernel/battle.c b/src/common/kernel/battle.c index cff83f46e..accab2ce7 100644 --- a/src/common/kernel/battle.c +++ b/src/common/kernel/battle.c @@ -211,7 +211,7 @@ armedmen(const unit * u, boolean siege_weapons) * Personen minimiert */ for (itm=u->items;itm;itm=itm->next) { const weapon_type * wtype = resource2weapon(itm->type->rtype); - if (wtype==NULL || (wtype->flags & WTF_SIEGE)) continue; + if (wtype==NULL || (!siege_weapons && (wtype->flags & WTF_SIEGE))) continue; if (effskill(u, wtype->skill) >= 1) n += itm->number; /* if (effskill(u, wtype->skill) >= wtype->minskill) n += itm->number; */ if (n>u->number) break;