bugfix mapper, conquest rules

This commit is contained in:
Enno Rehling 2003-05-27 21:51:36 +00:00
parent 53ebc4c0ce
commit 2e1537cb2c
5 changed files with 4 additions and 3 deletions

View File

@ -243,6 +243,7 @@ alliancevictory(void)
const struct building_type * btype = bt_find("stronghold");
region * r = regions;
alliance * al = alliances;
if (btype==NULL) return;
while (r!=NULL) {
building * b = r->buildings;
while (b!=NULL) {

View File

@ -67,7 +67,6 @@ bt_find(const char* name)
btl = buildingtypes;
while (btl && strncasecmp(btl->type->_name, name, strlen(name))) btl = btl->next;
}
assert(btl);
return btl?btl->type:NULL;
}

View File

@ -243,6 +243,7 @@ alliancevictory(void)
const struct building_type * btype = bt_find("stronghold");
region * r = regions;
alliance * al = alliances;
if (btype==NULL) return;
while (r!=NULL) {
building * b = r->buildings;
while (b!=NULL) {

View File

@ -293,7 +293,7 @@ score(void)
if (token!=NULL) {
unit * u = f->units;
while (u!=NULL) {
const item ** iitem = i_find(&u->items, token);
item ** iitem = i_find(&u->items, token);
if (iitem!=NULL && *iitem!=NULL) {
grails += (*iitem)->number;
}

View File

@ -322,7 +322,7 @@ read_newfactions(const char * filename)
#ifdef ALLIANCES
int alliance;
/* email;race;locale;startbonus;subscription;alliance */
if (fscanf(F, "%s %s %s %d %s %d %d", email, race, lang, &bonus, &subscription, password, &alliance)<=0) break;
if (fscanf(F, "%s %s %s %d %d %s %d", email, race, lang, &bonus, &subscription, password, &alliance)<=0) break;
#else
/* email;race;locale;startbonus;subscription */
if (fscanf(F, "%s %s %s %d %d %s", email, race, lang, &bonus, &subscription, password)<=0) break;