--- deliantra/server/common/anim.C 2007/02/09 01:52:09 1.20 +++ deliantra/server/common/anim.C 2007/03/11 02:12:44 1.21 @@ -42,14 +42,10 @@ void init_anim (void) { - char - buf[MAX_BUF]; - FILE * - fp; - static int - anim_init = 0; - int - num_frames = 0, faces[MAX_ANIMATIONS], i; + char buf[MAX_BUF]; + FILE * fp; + static int anim_init = 0; + int num_frames = 0, faces[MAX_ANIMATIONS], i; if (anim_init) return; @@ -117,15 +113,14 @@ animations[num_animations].num_animations = num_frames; if (num_frames % animations[num_animations].facings) - { - LOG (llevDebug, "Animation %s frame numbers (%d) is not a multiple of facings (%d)\n", - &animations[num_animations].name, num_frames, animations[num_animations].facings); - } + LOG (llevDebug, "Animation %s frame numbers (%d) is not a multiple of facings (%d)\n", + &animations[num_animations].name, num_frames, animations[num_animations].facings); + num_frames = 0; } - else if (!strncmp (buf, "facings", 7)) + else if (!strncmp (buf, "facings ", 8)) { - if (!(animations[num_animations].facings = atoi (buf + 7))) + if (!(animations[num_animations].facings = atoi (buf + 8))) { LOG (llevDebug, "Animation %s has 0 facings, line=%s\n", &animations[num_animations].name, buf); animations[num_animations].facings = 1; @@ -134,7 +129,7 @@ } else { - if (!(faces[num_frames++] = FindFace (buf, 0))) + if (!(faces[num_frames++] = face_find (buf))) LOG (llevDebug, "Could not find face %s for animation %s\n", buf, &animations[num_animations].name); } } @@ -247,6 +242,7 @@ if (op->face == blank_face) op->invisible = 1; + /* This block covers monsters (eg, pixies) which are supposed to * cycle from visible to invisible and back to being visible. * as such, disable it for players, as then players would become @@ -254,7 +250,7 @@ */ else if (op->type != PLAYER && op->arch->clone.flag [FLAG_ALIVE]) { - if (op->face->number == 0) + if (op->face == 0) { op->invisible = 1; CLEAR_FLAG (op, FLAG_ALIVE);