forked from github/server
parent
376d38e787
commit
489cb20b62
|
@ -136,14 +136,17 @@ destroyfaction(faction * f)
|
||||||
while (nf) {
|
while (nf) {
|
||||||
unit * u2 = nf->unit;
|
unit * u2 = nf->unit;
|
||||||
#ifdef NEW_ITEMS
|
#ifdef NEW_ITEMS
|
||||||
const item * itm;
|
item * itm = u->items;
|
||||||
for (itm=u->items;itm;itm=itm->next) {
|
while(itm){
|
||||||
|
const item_type * itype = itm->type;
|
||||||
|
item * itn = itm->next;
|
||||||
int n = itm->number;
|
int n = itm->number;
|
||||||
if (n<=0) continue;
|
|
||||||
n = n * nf->number / number;
|
n = n * nf->number / number;
|
||||||
if (n<=0) continue;
|
if (n>0) {
|
||||||
i_change(&u->items, itm->type, -n);
|
i_change(&u->items, itype, -n);
|
||||||
i_change(&u2->items, itm->type, n);
|
i_change(&u2->items, itype, n);
|
||||||
|
}
|
||||||
|
itm = itn;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
resource_t res;
|
resource_t res;
|
||||||
|
|
Loading…
Reference in New Issue