From e69fb78e6bc582e3262b9a130e2f9770e527f248 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Tue, 19 Aug 2014 15:31:16 +0200 Subject: [PATCH] =?UTF-8?q?Monster=20attackieren=20keine=20Einheiten=20in?= =?UTF-8?q?=20Geb=C3=A4uden.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/monsters.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/monsters.c b/src/monsters.c index 9b8f680d5..0edc5cda2 100644 --- a/src/monsters.c +++ b/src/monsters.c @@ -175,7 +175,7 @@ static order *get_money_for_dragon(region * r, unit * u, int wanted) /* falls der drache launisch ist, oder das regionssilber knapp, greift er alle an */ n = 0; for (u2 = r->units; u2; u2 = u2->next) { - if (u2->faction != u->faction && cansee(u->faction, r, u2, 0)) { + if (inside_building(u2)!=u->building && u2->faction != u->faction && cansee(u->faction, r, u2, 0)) { int m = get_money(u2); if (m == 0 || is_guard(u2, GUARD_TAX)) continue; @@ -537,7 +537,7 @@ static void monster_attacks(unit * u) unit *u2; for (u2 = r->units; u2; u2 = u2->next) { - if (cansee(u->faction, r, u2, 0) && u2->faction != u->faction + if (cansee(u->faction, r, u2, 0) && u2->faction != u->faction && inside_building(u2)!=u->building && chance(0.75)) { order *ord = monster_attack(u, u2); if (ord)