weapon animation switching fix
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3351 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -623,14 +623,8 @@ void weapon::renderhudmodel(int lastaction, int index)
|
||||
weaponmove wm;
|
||||
if(!intermission) wm.calcmove(unitv, lastaction);
|
||||
s_sprintfd(path)("weapons/%s", info.modelname);
|
||||
static int lastanim[2], lastswitch[2];
|
||||
bool emit = (wm.anim&ANIM_INDEX)==ANIM_GUN_SHOOT && (lastmillis - lastaction) < flashtime();
|
||||
if(lastanim[index]!=(wm.anim|(type<<24)))
|
||||
{
|
||||
lastanim[index] = wm.anim|(type<<24);
|
||||
lastswitch[index] = lastmillis;
|
||||
}
|
||||
rendermodel(path, wm.anim|ANIM_DYNALLOC|(index ? ANIM_MIRROR : 0)|(emit ? ANIM_PARTICLE : 0), 0, -1, wm.pos, player1->yaw+90, player1->pitch+wm.k_rot, 40.0f, lastswitch[index], NULL, NULL, 1.28f);
|
||||
rendermodel(path, wm.anim|ANIM_DYNALLOC|(index ? ANIM_MIRROR : 0)|(emit ? ANIM_PARTICLE : 0), 0, -1, wm.pos, player1->yaw+90, player1->pitch+wm.k_rot, 40.0f, wm.basetime, NULL, NULL, 1.28f);
|
||||
}
|
||||
|
||||
void weapon::updatetimers()
|
||||
|
||||
Reference in New Issue
Block a user