diff --git a/src/common/kernel/eressea.c b/src/common/kernel/eressea.c index ffc34afb1..3d0e3e936 100644 --- a/src/common/kernel/eressea.c +++ b/src/common/kernel/eressea.c @@ -1787,6 +1787,7 @@ lastregion (faction * f) region *r = f->last; if (!r && f->units) { for (r = firstregion(f); r; r = r->next) { + plane * p = rplane(r); unit *u; attrib *ru; for (u = r->units; u; u = u->next) { @@ -1808,6 +1809,10 @@ lastregion (faction * f) continue; if (check_leuchtturm(r, f)) f->last = r->next; + if (p && is_watcher(p, f)) { + f->first = r; + return r; + } } } return f->last; @@ -1823,6 +1828,7 @@ firstregion (faction * f) for (r = regions; r; r = r->next) { attrib *ru; unit *u; + plane * p = rplane(r); for (u = r->units; u; u = u->next) { if (u->faction == f) { f->first = r; @@ -1842,6 +1848,10 @@ firstregion (faction * f) f->first = r; return r; } + if (p && is_watcher(p, f)) { + f->first = r; + return r; + } } f->first = regions; return regions; diff --git a/src/common/kernel/plane.c b/src/common/kernel/plane.c index 2d8702e79..5de014ca6 100644 --- a/src/common/kernel/plane.c +++ b/src/common/kernel/plane.c @@ -255,3 +255,13 @@ read_plane_reference(plane ** pp, FILE * F) if (*pp==NULL) ur_add((void*)i, (void**)pp, resolve_plane); return AT_READ_OK; } + +boolean +is_watcher(const struct plane * p, const struct faction * f) +{ + struct watcher * w; + if (!p) return false; + w = p->watchers; + while (w && w->faction!=f) w=w->next; + return (w!=NULL); +} \ No newline at end of file diff --git a/src/common/kernel/plane.h b/src/common/kernel/plane.h index ab8c18f97..b9fe8858d 100644 --- a/src/common/kernel/plane.h +++ b/src/common/kernel/plane.h @@ -71,7 +71,7 @@ void set_ursprung(struct faction *f, int id, int x, int y); plane * create_new_plane(int id, const char *name, int minx, int maxx, int miny, int maxy, int flags); plane * getplanebyname(const char *); extern int rel_to_abs(const struct plane *pl, const struct faction * f, int rel, unsigned char index); - +extern boolean is_watcher(const struct plane * p, const struct faction * f); extern void * resolve_plane(void * data); extern void write_plane_reference(const plane * p, FILE * F); extern int read_plane_reference(plane ** pp, FILE * F); diff --git a/src/eressea/korrektur.c b/src/eressea/korrektur.c index 3fac437cd..8d864c81b 100644 --- a/src/eressea/korrektur.c +++ b/src/eressea/korrektur.c @@ -1917,12 +1917,13 @@ regatta_quest(void) { plane * p = getplanebyname("Regatta"); if (p) { + fset(p, PFL_NOMONSTERS); fset(p, PFL_SEESPECIAL); return resize_plane(p, 40); #ifdef REGATTA_QUESTMASTER /* "gregorjochmann@gmx.de" */ } else { region * center; - p = gm_addplane(40, PFL_NORECRUITS, "Regatta"); + p = gm_addplane(40, PFL_NORECRUITS|PFL_NOMONSTERS|PFL_SEESPECIAL, "Regatta"); center = findregion(p->minx+(p->maxx-p->minx)/2, p->miny+(p->maxy-p->miny)/2); gm_addfaction(REGATTA_QUESTMASTER, p, center); #endif