]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/animdecide.qh
f9261adae6cc5e4cc96fcdd4108f35c2bd8b687a
[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 .int 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 .int 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 const float ANIMSTATE_DEAD1 = 1; // base frames: die1
27 const float ANIMSTATE_DEAD2 = 2; // base frames: die2
28 const float ANIMSTATE_DUCK = 4; // turns walk into duckwalk, jump into duckjump, etc.
29 const float ANIMSTATE_FROZEN = 8; // force idle
30
31 // implicit anim states (inferred from velocity, etc.)
32 const float ANIMIMPLICITSTATE_INAIR = 1;
33 const float ANIMIMPLICITSTATE_FORWARD = 2;
34 const float ANIMIMPLICITSTATE_BACKWARDS = 4;
35 const float ANIMIMPLICITSTATE_LEFT = 8;
36 const float ANIMIMPLICITSTATE_RIGHT = 16;
37 const float 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 const float ANIMACTION_JUMP = -1; // jump
42 const float ANIMACTION_DRAW = 1; // draw
43 const float ANIMACTION_PAIN1 = 2; // pain
44 const float ANIMACTION_PAIN2 = 3; // pain
45 const float ANIMACTION_SHOOT = 4; // shoot
46 const float ANIMACTION_TAUNT = 5; // taunt
47 const float ANIMACTION_MELEE = 6; // melee