]> icculus.org git repositories - divverent/nexuiz.git/blob - attic/TeamNexuiz/game/gamec/cl_weaponanimations.c
moved navnodeedit & TeamNexuiz to attic
[divverent/nexuiz.git] / attic / TeamNexuiz / game / gamec / cl_weaponanimations.c
1 $frame fire fire2 idle run\r
2 \r
3 // VorteX: static frame globals\r
4 float WFRAME_FIRE1 = 0;\r
5 float WFRAME_FIRE2 = 1;\r
6 float WFRAME_IDLE = 2;\r
7 float WFRAME_RUN = 3;\r
8 \r
9 // changes by LordHavoc on 03/30/04\r
10 // cleaned up code formatting a bit\r
11 // renamed to weapon_anim\r
12 void weapon_anim ()\r
13 {\r
14         if (self.attack_finished > time)\r
15                 self.weaponframe = $fire;\r
16         else if (self.movement_x || self.movement_y)\r
17                 self.weaponframe = $run;\r
18         else\r
19                 self.weaponframe = $idle;\r
20 }\r
21 void weapon_freeze ()\r
22 {\r
23         if (self.weaponentity)\r
24                 self.weaponentity.frame = WFRAME_IDLE;\r
25 }