vector a = '0 0 0';
switch(fr)
{
+ default:
case WFRAME_IDLE: a = wepent.anim_idle; break;
case WFRAME_FIRE1: a = wepent.anim_fire1; break;
case WFRAME_FIRE2: a = wepent.anim_fire2; break;
- default:
case WFRAME_RELOAD: a = wepent.anim_reload; break;
}
a.z *= t;
bool restartanim;
if (fr == WFRAME_DONTCHANGE)
{
+ // this can happen when the weapon entity is newly spawned, since it has a clear state and no previous weapon frame
+ if (this.wframe == WFRAME_DONTCHANGE)
+ this.wframe = WFRAME_IDLE;
fr = this.wframe;
restartanim = false;
}