make muzzle flashes track the muzzle

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1746 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2008-04-07 00:46:14 +00:00
parent b57350442c
commit 9f42b1a895
4 changed files with 22 additions and 13 deletions
+1 -2
View File
@@ -628,10 +628,9 @@ void weapon::renderhudmodel(int lastaction, int index)
if(!intermission) wm.calcmove(unitv, lastaction);
s_sprintfd(path)("weapons/%s", info.modelname);
static int lastanim[2], lastswitch[2];
bool emit = false;
bool emit = (wm.anim&ANIM_INDEX)==ANIM_GUN_SHOOT;
if(lastanim[index]!=(wm.anim|(type<<24)))
{
if((lastanim[index]&ANIM_INDEX)!=ANIM_GUN_SHOOT && (wm.anim&ANIM_INDEX)==ANIM_GUN_SHOOT) emit = true;
lastanim[index] = wm.anim|(type<<24);
lastswitch[index] = lastmillis;
}