forked from github/server
Man muss die neue Funktion natürlich aufrufen, sonst hilft's nicht
This commit is contained in:
parent
1f5432c875
commit
0486234db9
|
@ -2913,6 +2913,8 @@ reports(void)
|
||||||
|
|
||||||
report_donations();
|
report_donations();
|
||||||
remove_empty_units();
|
remove_empty_units();
|
||||||
|
log_printf("Updating region intervals\n");
|
||||||
|
update_intervals();
|
||||||
log_printf("Report timestamp - %s\n", pzTime);
|
log_printf("Report timestamp - %s\n", pzTime);
|
||||||
for (f = factions; f; f = f->next) {
|
for (f = factions; f; f = f->next) {
|
||||||
faction_list * addresses;
|
faction_list * addresses;
|
||||||
|
|
|
@ -1947,20 +1947,24 @@ update_intervals(void)
|
||||||
for (u = r->units; u; u = u->next) {
|
for (u = r->units; u; u = u->next) {
|
||||||
faction * f = u->faction;
|
faction * f = u->faction;
|
||||||
if (f->first==NULL) f->first = r;
|
if (f->first==NULL) f->first = r;
|
||||||
|
f->last = r->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (ru = a_find(r->attribs, &at_travelunit); ru; ru = ru->nexttype) {
|
for (ru = a_find(r->attribs, &at_travelunit); ru; ru = ru->nexttype) {
|
||||||
faction * f = ((unit*)ru->data.v)->faction;
|
faction * f = ((unit*)ru->data.v)->faction;
|
||||||
if (f->first==NULL) f->first = r;
|
if (f->first==NULL) f->first = r;
|
||||||
|
f->last = r->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
ulist = get_lighthouses(r);
|
ulist = get_lighthouses(r);
|
||||||
for (uptr=ulist;uptr!=NULL;uptr=uptr->next) {
|
for (uptr=ulist;uptr!=NULL;uptr=uptr->next) {
|
||||||
/* check lighthouse warden's faction */
|
/* check lighthouse warden's faction */
|
||||||
unit * u = uptr->data;
|
unit * u = uptr->data;
|
||||||
if (u->faction->first==NULL) {
|
faction * f = u->faction;
|
||||||
u->faction->first = r;
|
if (f->first==NULL) {
|
||||||
|
f->first = r;
|
||||||
}
|
}
|
||||||
|
f->last = r->next;
|
||||||
}
|
}
|
||||||
unitlist_clear(&ulist);
|
unitlist_clear(&ulist);
|
||||||
|
|
||||||
|
@ -1969,6 +1973,7 @@ update_intervals(void)
|
||||||
while (w) {
|
while (w) {
|
||||||
faction * f = w->faction;
|
faction * f = w->faction;
|
||||||
if (f->first==NULL) f->first = r;
|
if (f->first==NULL) f->first = r;
|
||||||
|
f->last = r->next;
|
||||||
w = w->next;
|
w = w->next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1053,8 +1053,10 @@ int change_hitpoints(struct unit *u, int value);
|
||||||
int weight(const struct unit * u);
|
int weight(const struct unit * u);
|
||||||
void changeblockchaos(void);
|
void changeblockchaos(void);
|
||||||
|
|
||||||
struct region *firstregion(struct faction * f);
|
/* intervall, in dem die regionen der partei zu finden sind */
|
||||||
struct region *lastregion(struct faction * f);
|
extern void update_intervals(void);
|
||||||
|
extern struct region *firstregion(struct faction * f);
|
||||||
|
extern struct region *lastregion(struct faction * f);
|
||||||
|
|
||||||
void inituhash(void);
|
void inituhash(void);
|
||||||
void uhash(struct unit * u);
|
void uhash(struct unit * u);
|
||||||
|
|
Loading…
Reference in New Issue