readunit() erzeugt einheiten, muss sie daher auh anmelden.

This commit is contained in:
Enno Rehling 2005-04-28 07:04:10 +00:00
parent b97cdde5ba
commit 8005f97d54
3 changed files with 3 additions and 1 deletions

View File

@ -344,6 +344,7 @@ set_alliance(faction * a, faction * b, int status)
void
update_interval(struct faction * f, struct region * r)
{
if (r==NULL || f==NULL) return;
#ifdef ENUM_REGIONS
if (f->first==NULL || f->first->index>r->index) {
f->first = r;

View File

@ -1949,6 +1949,7 @@ readgame(const char * filename, int backup)
assert(u->region==NULL);
u->region = r;
addlist2(up,u);
update_interval(u->faction, u->region);
}
}
printf("\n");

View File

@ -832,7 +832,7 @@ u_setfaction(unit * u, faction * f)
u->prevF = NULL;
u->faction = f;
update_interval(f, u->region);
if (u->region) update_interval(f, u->region);
if (cnt && f) {
set_number(u, cnt);
if (playerrace(u->race)) {