- Kleine Fixes, Datenfile wird wieder eingelesen.

This commit is contained in:
Christian Schlittchen 2002-04-07 14:20:48 +00:00
parent 64a61120ea
commit 4d1347424e
5 changed files with 5 additions and 7 deletions

View File

@ -36,7 +36,7 @@ read_moved(attrib * a, FILE * F)
{ {
fscanf(F, "%d", &a->data.i); fscanf(F, "%d", &a->data.i);
if (a->data.i !=0 ) return AT_READ_OK; if (a->data.i !=0 ) return AT_READ_OK;
else return AT_READ_FAIL; else return AT_READ_OK; /* eigentlich _FAIL, workaround */
} }
attrib_type at_moved = { attrib_type at_moved = {

View File

@ -1060,8 +1060,6 @@ randomevents(void)
drown(r); drown(r);
} }
/* Orkische vermehren sich */
for (r = regions; r; r = r->next) { for (r = regions; r; r = r->next) {
for (u = r->units; u; u = u->next) { for (u = r->units; u; u = u->next) {
if (is_cursed(u->attribs, C_ORC, 0) if (is_cursed(u->attribs, C_ORC, 0)

View File

@ -194,7 +194,7 @@ a_readeffect(attrib *a, FILE *f)
fscanf(f, "%s %d", zText, &power); fscanf(f, "%s %d", zText, &power);
ptype = pt_find(zText); ptype = pt_find(zText);
} }
if (ptype==NULL || power==0) return 0; if (ptype==NULL || power==0) return AT_READ_FAIL;
edata->type = ptype; edata->type = ptype;
edata->value = power; edata->value = power;
return AT_READ_OK; return AT_READ_OK;

View File

@ -264,7 +264,7 @@ a_read(FILE * f, attrib ** attribs)
a_add(attribs, na); a_add(attribs, na);
break; break;
case AT_READ_FAIL: case AT_READ_FAIL:
log_warning(("reading attribute %s failed.\n", zText)); log_warning(("reading attribute %s failed\n", zText));
a_free(na); a_free(na);
break; break;
default: default:

View File

@ -55,7 +55,7 @@ read_triggers(FILE * F, trigger ** tp)
tp = &(*tp)->next; tp = &(*tp)->next;
break; break;
case AT_READ_FAIL: case AT_READ_FAIL:
log_warning(("reading trigger for %s failed.\n", ttype->name)); log_warning(("reading trigger for %s failed\n", ttype->name));
t_free(*tp); t_free(*tp);
*tp = NULL; *tp = NULL;
break; break;