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