NUMMER SCHIFF abgestellt wegen Missbrauchs (Sonnensegel-Verschleierung).

This commit is contained in:
Enno Rehling 2006-08-07 21:46:40 +00:00
parent b89721873c
commit 732dc68e93
2 changed files with 10 additions and 9 deletions

View File

@ -728,12 +728,13 @@ give_cmd(unit * u, order * ord)
if (u->items) { if (u->items) {
item **itmp=&u->items; item **itmp=&u->items;
while (*itmp) { while (*itmp) {
if ((*itmp)->number > 0 item * itm = *itmp;
&& (*itmp)->number - get_reservation(u, (*itmp)->type->rtype) > 0) { const item_type * itype = itm->type;
n = (*itmp)->number - get_reservation(u, (*itmp)->type->rtype); if (itm->number > 0 && itm->number - get_reservation(u, itype->rtype) > 0) {
if (give_item(n, (*itmp)->type, u, u2, ord)==0) continue; n = itm->number - get_reservation(u, itype->rtype);
} if (give_item(n, itype, u, u2, ord)==0) continue;
itmp = &(*itmp)->next; }
itmp = &itm->next;
} }
} }
return; return;

View File

@ -3121,7 +3121,7 @@ renumber(void)
u->no = i; u->no = i;
uhash(u); uhash(u);
break; break;
#ifdef ALLOW_SHIP_RENUM
case P_SHIP: case P_SHIP:
if(!u->ship) { if(!u->ship) {
cmistake(u,ord,144,MSG_EVENT); cmistake(u,ord,144,MSG_EVENT);
@ -3149,7 +3149,7 @@ renumber(void)
u->ship->no = i; u->ship->no = i;
shash(u->ship); shash(u->ship);
break; break;
#endif
case P_BUILDING: case P_BUILDING:
case P_GEBAEUDE: case P_GEBAEUDE:
if(!u->building) { if(!u->building) {
@ -3180,7 +3180,7 @@ renumber(void)
break; break;
default: default:
cmistake(u,ord,239,MSG_EVENT); cmistake(u, ord, 239, MSG_EVENT);
} }
} }
} }