From 65187b232430d7c50f830e36971c9087c42377b5 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 7 Apr 2002 10:26:28 +0000 Subject: [PATCH] move attribut deaktiviert, ageing gefixt. --- src/common/attributes/moved.c | 5 +++-- src/common/kernel/unit.c | 2 ++ src/common/util/attrib.c | 2 +- src/common/util/event.c | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/common/attributes/moved.c b/src/common/attributes/moved.c index 883fc1308..e6778f0b5 100644 --- a/src/common/attributes/moved.c +++ b/src/common/attributes/moved.c @@ -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 diff --git a/src/common/kernel/unit.c b/src/common/kernel/unit.c index a006c87ff..0f1175f99 100644 --- a/src/common/kernel/unit.c +++ b/src/common/kernel/unit.c @@ -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); diff --git a/src/common/util/attrib.c b/src/common/util/attrib.c index 74977c31d..4b79f0c11 100644 --- a/src/common/util/attrib.c +++ b/src/common/util/attrib.c @@ -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: diff --git a/src/common/util/event.c b/src/common/util/event.c index f8fe285c0..51a0be85a 100644 --- a/src/common/util/event.c +++ b/src/common/util/event.c @@ -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;