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