]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/animdecide.qh
Merge branch 'master' into terencehill/itemstime
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / animdecide.qh
1 // must be called at least once to initialize, or when modelindex is changed
2 void animdecide_load_if_needed(entity e);
3
4 // client side frame inferring
5 void animdecide_setimplicitstate(entity e, float onground);
6 void animdecide_setframes(entity e, float support_blending, .float fld_frame, .float fld_frame1time, .float fld_frame2, .float fld_frame2time);
7
8 // please network this one
9 .float anim_state;
10 .float anim_time;
11 .float anim_lower_action;
12 .float anim_lower_time;
13 .float anim_upper_action;
14 .float anim_upper_time;
15
16 // when copying entities, copy these too
17 .float anim_implicit_state;
18 .float anim_implicit_time;
19 .float anim_lower_implicit_action;
20 .float anim_lower_implicit_time;
21 .float anim_upper_implicit_action;
22 .float anim_upper_implicit_time;
23
24 // explicit anim states (networked)
25 void animdecide_setstate(entity e, float newstate, float restart);
26 #define ANIMSTATE_DEAD1 1 // base frames: die1
27 #define ANIMSTATE_DEAD2 2 // base frames: die2
28 #define ANIMSTATE_DUCK 4 // turns walk into duckwalk, jump into duckjump, etc.
29 #define ANIMSTATE_FROZEN 8 // force idle
30
31 // implicit anim states (inferred from velocity, etc.)
32 #define ANIMIMPLICITSTATE_INAIR 1
33 #define ANIMIMPLICITSTATE_FORWARD 2
34 #define ANIMIMPLICITSTATE_BACKWARDS 4
35 #define ANIMIMPLICITSTATE_LEFT 8
36 #define ANIMIMPLICITSTATE_RIGHT 16
37 #define ANIMIMPLICITSTATE_JUMPRELEASED 32
38
39 // explicit actions (networked); negative values are for lower body
40 void animdecide_setaction(entity e, float action, float restart);
41 #define ANIMACTION_JUMP -1 // jump
42 #define ANIMACTION_DRAW 1 // draw
43 #define ANIMACTION_PAIN1 2 // pain
44 #define ANIMACTION_PAIN2 3 // pain
45 #define ANIMACTION_SHOOT 4 // shoot
46 #define ANIMACTION_TAUNT 5 // taunt
47 #define ANIMACTION_MELEE 6 // melee