added extensive branch testing on animation's updateCurrentFrame