while(1)
{
ent_animate(me,NULL,0,0);
if(key_w)
{
mv_lastMode = 2;
ent_animate(me, "walk", animationCount, ANM_CYCLE);
animationCount += 5*time_step;
}
else
{
//ent_animate(me,NULL,0,0);/// NOT NEEDED
ent_animate(me, "walk", animationCount, ANM_CYCLE);
if(mv_lastMode != 1) mv_fpsBlend = 0;
mv_lastMode = 1;
ent_blendframe(me, me, "stand", 0, mv_fpsBlend);
mv_fpsBlend = clamp(mv_fpsBlend + 3*time_step, 0, 100);
if(mv_fpsBlend >= 25)
{
ent_animate(me, "stand", mv_fpsAnim, ANM_CYCLE);
mv_fpsAnim += 3*time_step;
}
else
{
mv_fpsAnim = 0;
}
}
ent_animate(me, "r_pose", 0, ANM_ADD); //Comment out this line to see the expected result
wait(1);
}