Monsters attacking units that they cannot see? Bad!
This commit is contained in:
Enno Rehling 2010-10-10 21:42:27 -07:00
parent 8000b9bb2b
commit 0837fe4176
1 changed files with 1 additions and 1 deletions

View File

@ -543,7 +543,7 @@ monster_attacks(unit * u)
unit * u2; unit * u2;
for (u2=r->units;u2;u2=u2->next) { for (u2=r->units;u2;u2=u2->next) {
if (u2->faction!=u->faction && chance(0.75)) { if (cansee(u->faction, r, u2, 0) && u2->faction!=u->faction && chance(0.75)) {
order * ord = monster_attack(u, u2); order * ord = monster_attack(u, u2);
if (ord) addlist(&u->orders, ord); if (ord) addlist(&u->orders, ord);
} }