"Merkwürdiges Supermegamonster frisst Region leer"
fixed error in mistletoe-zombie creation
This commit is contained in:
Enno Rehling 2008-08-28 19:01:36 +00:00
parent 3c0d17e568
commit 17bcb2d7a7
1 changed files with 31 additions and 36 deletions

View File

@ -225,7 +225,7 @@ void
destroyfaction(faction * f)
{
region *rc;
unit *u;
unit *u = f->units;
faction *ff;
if (!f->alive) return;
@ -237,25 +237,19 @@ destroyfaction(faction * f)
free(bm);
}
for (u=f->units;u;u=u->nextF) {
region * r = u->region;
/* give away your stuff, make zombies if you cannot (quest items) */
while (u) {
/* give away your stuff, make zombies if you cannot (quest items) */
int result = gift_items(u, GIFT_FRIENDS|GIFT_PEASANTS);
if (result!=0) {
unit * zombie = u;
u = u->nextF;
make_zombie(zombie);
} else {
break;
}
}
if (u==NULL) continue;
region * r = u->region;
if (!fval(r->terrain, SEA_REGION) && !!playerrace(u->race)) {
const race * rc = u->race;
int m = rmoney(u->region);
int m = rmoney(r);
if ((rc->ec_flags & ECF_REC_ETHEREAL)==0) {
int p = rpeasants(u->region);
@ -276,9 +270,10 @@ destroyfaction(faction * f)
}
m += get_money(u);
rsetmoney(r, m);
}
set_number(u, 0);
u=u->nextF;
}
}
f->alive = 0;
/* no way! f->units = NULL; */