--- deliantra/server/common/anim.C 2018/11/17 23:39:59 1.43 +++ deliantra/server/common/anim.C 2018/11/18 15:19:47 1.44 @@ -94,7 +94,7 @@ int max_state; /* Max animation state object should be drawn in */ int base_state; /* starting index # to draw from */ - if (!op->animation_id || !NUM_ANIMATIONS (op)) + if (!op->animation_id || !op->anim_frames ()) { LOG (llevError, "Object %s lacks animation.\n", op->debug_desc ()); op->clr_flag (FLAG_ANIMATE); @@ -105,7 +105,7 @@ { dir = op->head->direction; - if (NUM_ANIMATIONS (op) == NUM_ANIMATIONS (op->head)) + if (op->anim_frames () == op->head->anim_frames ()) op->state = op->head->state; else ++op->state; @@ -116,7 +116,7 @@ /* If object is turning, then max animation state is half through the * animations. Otherwise, we can use all the animations. */ - max_state = NUM_ANIMATIONS (op) / NUM_FACINGS (op); + max_state = op->anim_frames () / op->anim_facings (); base_state = 0; /* at least in the older animations that used is_turning, the first half * of the animations were left facing, the second half right facing. @@ -126,11 +126,11 @@ */ if (dir > 0) - switch (NUM_FACINGS (op)) + switch (op->anim_facings ()) { - case 2: base_state = ((dir - 1) / (8 / 2)) * (NUM_ANIMATIONS (op) / 2); break; - case 4: base_state = ((dir - 1) / (8 / 4)) * (NUM_ANIMATIONS (op) / 4); break; - case 8: base_state = ((dir - 1) / (8 / 8)) * (NUM_ANIMATIONS (op) / 8); break; + case 2: base_state = ((dir - 1) / (8 / 2)) * (op->anim_frames () / 2); break; + case 4: base_state = ((dir - 1) / (8 / 4)) * (op->anim_frames () / 4); break; + case 8: base_state = ((dir - 1) / (8 / 8)) * (op->anim_frames () / 8); break; } else base_state = 0; @@ -139,7 +139,7 @@ if (op->state >= max_state) op->state = 0; - SET_ANIMATION (op, op->state + base_state); + op->set_anim_frame (op->state + base_state); if (op->face == blank_face) op->invisible = 1;