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