move attribut deaktiviert, ageing gefixt.

This commit is contained in:
Enno Rehling 2002-04-07 10:26:28 +00:00
parent 45c51f71bf
commit 65187b2324
4 changed files with 7 additions and 4 deletions

View File

@ -21,7 +21,8 @@
static int
age_moved(attrib * a)
{
return a->data.i-- > 0;
--a->data.i;
return a->data.i > 0;
}
static void
@ -53,7 +54,7 @@ set_moved(attrib ** alist)
{
attrib * a = a_find(*alist, &at_moved);
if (a==NULL) a = a_add(alist, a_new(&at_moved));
a->data.i = 1;
a->data.i = 2;
}
void

View File

@ -654,7 +654,9 @@ move_unit(unit * u, region * r, unit ** ulist)
if (u->region!=NULL) maxhp = unit_max_hp(u);
if (!ulist) ulist = (&r->units);
if (u->region) {
#ifdef DELAYED_OFFENSE
set_moved(&u->attribs);
#endif
setguard(u, GUARD_NONE);
fset(u, FL_MOVED);
if (u->ship || u->building) leave(u->region, u);

View File

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

View File

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