forked from github/server
Suchfunktion, die das richtige Intervall der auszugebenden Regionen bestimmt (evtl. versaut das die Beschleunigungen wieder, aber das ist sekundär. Hauptsache richtig).
This commit is contained in:
parent
ea9e58b018
commit
b5721e9a13
|
@ -1004,6 +1004,23 @@ cr_borders(const region * r, const faction * f, int seemode, FILE * F)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
get_seen_interval(region ** first, region ** last)
|
||||
{
|
||||
region * r = regions;
|
||||
while (r!=NULL) {
|
||||
if (find_seen(r)!=NULL) {
|
||||
first = r;
|
||||
break;
|
||||
}
|
||||
}
|
||||
while (r!=NULL) {
|
||||
if (find_seen(r)!=NULL) {
|
||||
last = r;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* main function of the creport. creates the header and traverses all regions */
|
||||
void
|
||||
report_computer(FILE * F, faction * f, const faction_list * addresses,
|
||||
|
@ -1015,9 +1032,11 @@ report_computer(FILE * F, faction * f, const faction_list * addresses,
|
|||
ship *sh;
|
||||
unit *u;
|
||||
const char * mailto = locale_string(f->locale, "mailto");
|
||||
const region * last = lastregion(f);
|
||||
region * first, * last;
|
||||
const attrib * a;
|
||||
|
||||
get_seen_interval(&first, &last);
|
||||
|
||||
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
|
||||
/* initialisations, header and lists */
|
||||
|
||||
|
@ -1132,7 +1151,7 @@ report_computer(FILE * F, faction * f, const faction_list * addresses,
|
|||
}
|
||||
|
||||
/* traverse all regions */
|
||||
for (r=firstregion(f);r!=last;r=r->next) {
|
||||
for (r=first;r!=last;r=r->next) {
|
||||
int modifier = 0;
|
||||
const char * tname;
|
||||
const seen_region * sd = find_seen(r);
|
||||
|
|
Loading…
Reference in New Issue