Merge pull request #37 from CTD1/Hafen2

Häfen nur anlaufen mit Helfe Bewache
This commit is contained in:
Enno Rehling 2014-10-03 19:27:08 +02:00
commit 60cc3cc3d3
1 changed files with 4 additions and 1 deletions

View File

@ -696,6 +696,9 @@ int check_ship_allowed(struct ship *sh, const region * r)
} }
if (bt_harbour && buildingtype_exists(r, bt_harbour, true)) { if (bt_harbour && buildingtype_exists(r, bt_harbour, true)) {
unit* hafenmeister = NULL;
hafenmeister = owner_buildingtyp(r, bt_harbour);
if ((sh->_owner->faction == hafenmeister->faction) || (ucontact(sh->_owner, hafenmeister)) || (alliedunit(sh->_owner, hafenmeister->faction, HELP_GUARD)))
return SA_HARBOUR; return SA_HARBOUR;
} }
if (fval(r->terrain, SEA_REGION)) { if (fval(r->terrain, SEA_REGION)) {