vector animdecide_getloweranim(entity e)
{
// death etc.
+ if(e.anim_state & ANIMSTATE_FOLLOW)
+ return vec3(((e.anim_state & ANIMSTATE_DUCK) ? e.anim_duckidle_x : e.anim_idle_x), e.anim_time, ANIMPRIO_DEAD); // dead priority so it's above all
if(e.anim_state & ANIMSTATE_FROZEN)
return vec3(e.anim_idle.x, e.anim_time, ANIMPRIO_DEAD);
if(e.anim_state & ANIMSTATE_DEAD1)
const int ANIMSTATE_DEAD2 = 2; // base frames: die2
const int ANIMSTATE_DUCK = 4; // turns walk into duckwalk, jump into duckjump, etc.
const int ANIMSTATE_FROZEN = 8; // force idle
+const int ANIMSTATE_FOLLOW = 16; // also force idle
// implicit anim states (inferred from velocity, etc.)
const int ANIMIMPLICITSTATE_INAIR = 1;
int animbits = deadbits;
if(self.frozen)
animbits |= ANIMSTATE_FROZEN;
+ if(self.movetype == MOVETYPE_FOLLOW)
+ animbits |= ANIMSTATE_FOLLOW;
if(self.crouch)
animbits |= ANIMSTATE_DUCK;
animdecide_setstate(self, animbits, false);