From c5473fc657837bfb7448dd1e1d21ee3236a26c5d Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 30 Aug 2009 21:05:29 +0000 Subject: [PATCH] new army-abbreviations --- src/common/kernel/battle.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/common/kernel/battle.c b/src/common/kernel/battle.c index 13090451b..308a6c995 100644 --- a/src/common/kernel/battle.c +++ b/src/common/kernel/battle.c @@ -223,12 +223,14 @@ static const char * sideabkz(side *s, boolean truename) { static char sideabkz_buf[8]; /* STATIC_RESULT: used for return, not across calls */ + faction * f = (s->stealthfaction && !truename)?s->stealthfaction:s->faction; - if (s->stealthfaction && truename == false) { - abkz(s->stealthfaction->name, sideabkz_buf, sizeof(sideabkz_buf), 3); - } else { - abkz(s->faction->name, sideabkz_buf, sizeof(sideabkz_buf), 3); - } +#undef SIDE_ABKZ +#ifdef SIDE_ABKZ + abkz(f->name, sideabkz_buf, sizeof(sideabkz_buf), 3); +#else + strcpy(sideabkz_buf, itoa36(f->no)); +#endif return sideabkz_buf; }