]> icculus.org git repositories - divverent/nexuiz.git/blob - data/qcsrc/server/gamec/cl_weaponanimations.c
raise items a bit higher on mapstart, that fixes missing armor shards/stuck healthpac...
[divverent/nexuiz.git] / data / qcsrc / server / gamec / cl_weaponanimations.c
1 $frame fire fire2 idle run
2
3 // VorteX: static frame globals
4 float WFRAME_FIRE1 = 0;
5 float WFRAME_FIRE2 = 1;
6 float WFRAME_IDLE = 2;
7 float WFRAME_RUN = 3;
8
9 // changes by LordHavoc on 03/30/04
10 // cleaned up code formatting a bit
11 // renamed to weapon_anim
12 void weapon_anim ()
13 {
14         if (self.attack_finished > time)
15                 self.weaponframe = $fire;
16         else if (self.movement_x || self.movement_y)
17                 self.weaponframe = $run;
18         else
19                 self.weaponframe = $idle;
20 }
21 void weapon_freeze ()
22 {
23         if (self.weaponentity)
24                 self.weaponentity.frame = WFRAME_IDLE;
25 }