Merge pull request #53 from CTD1/Guard_and_Flying

Flieger und Bewache
This commit is contained in:
Enno Rehling 2014-11-11 17:38:58 +01:00
commit efe23698bc
1 changed files with 4 additions and 0 deletions

View File

@ -913,6 +913,8 @@ static unit *bewegung_blockiert_von(unit * reisender, region * r)
int sk = eff_skill(u, SK_PERCEPTION, r);
if (invisible(reisender, u) >= reisender->number)
continue;
if (!(u_race(u)->flags & RCF_FLY) && u_race(reisender)->flags & RCF_FLY)
continue;
if ((u->faction == reisender->faction) || (ucontact(u, reisender)) || (alliedunit(u, reisender->faction, HELP_GUARD)))
guard_count = guard_count - u->number;
else if (sk >= stealth) {
@ -962,6 +964,8 @@ static bool is_guardian_u(const unit * guard, unit * u, unsigned int mask)
return false;
if (!cansee(guard->faction, u->region, u, 0))
return false;
if (!(u_race(guard)->flags & RCF_FLY) && u_race(u)->flags & RCF_FLY)
return false;
return true;
}