forked from github/server
readunit() erzeugt einheiten, muss sie daher auh anmelden.
This commit is contained in:
parent
b97cdde5ba
commit
8005f97d54
|
@ -344,6 +344,7 @@ set_alliance(faction * a, faction * b, int status)
|
||||||
void
|
void
|
||||||
update_interval(struct faction * f, struct region * r)
|
update_interval(struct faction * f, struct region * r)
|
||||||
{
|
{
|
||||||
|
if (r==NULL || f==NULL) return;
|
||||||
#ifdef ENUM_REGIONS
|
#ifdef ENUM_REGIONS
|
||||||
if (f->first==NULL || f->first->index>r->index) {
|
if (f->first==NULL || f->first->index>r->index) {
|
||||||
f->first = r;
|
f->first = r;
|
||||||
|
|
|
@ -1949,6 +1949,7 @@ readgame(const char * filename, int backup)
|
||||||
assert(u->region==NULL);
|
assert(u->region==NULL);
|
||||||
u->region = r;
|
u->region = r;
|
||||||
addlist2(up,u);
|
addlist2(up,u);
|
||||||
|
update_interval(u->faction, u->region);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
|
@ -832,7 +832,7 @@ u_setfaction(unit * u, faction * f)
|
||||||
u->prevF = NULL;
|
u->prevF = NULL;
|
||||||
|
|
||||||
u->faction = f;
|
u->faction = f;
|
||||||
update_interval(f, u->region);
|
if (u->region) update_interval(f, u->region);
|
||||||
if (cnt && f) {
|
if (cnt && f) {
|
||||||
set_number(u, cnt);
|
set_number(u, cnt);
|
||||||
if (playerrace(u->race)) {
|
if (playerrace(u->race)) {
|
||||||
|
|
Loading…
Reference in New Issue