Zauber "Süsse Träume" vermehrt Einheit nicht

bugfix static variables
This commit is contained in:
Enno Rehling 2005-10-16 21:08:22 +00:00
parent b58303211f
commit 114b40d85c
1 changed files with 4 additions and 2 deletions

View File

@ -1123,11 +1123,13 @@ orc_growth(void)
unit *u; unit *u;
for (u = r->units; u; u = u->next) { for (u = r->units; u; u = u->next) {
static boolean init = false; static boolean init = false;
static curse *c = 0; static const curse_type *ct_orcish = 0;
curse *c = 0;
if (!init) { if (!init) {
init = true; init = true;
c = get_curse(u->attribs, ct_find("orcish")); ct_orcish = ct_find("orcish");
} }
if (ct_orcish) c = get_curse(u->attribs, ct_orcish);
if (c && !has_skill(u, SK_MAGIC) && !has_skill(u, SK_ALCHEMY) && !fval(u, UFL_HERO)) { if (c && !has_skill(u, SK_MAGIC) && !has_skill(u, SK_ALCHEMY) && !fval(u, UFL_HERO)) {
int n; int n;