]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/anim.qh
When possible use simpler LOG_* macros instead of LOG_*F
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / anim.qh
1 #pragma once
2
3 // begin engine fields
4
5 /** primary framegroup animation (strength = 1 - lerpfrac - lerpfrac3 - lerpfrac4) */
6 .float frame;
7 /** secondary framegroup animation (strength = lerpfrac) */
8 .float frame2;
9 /** tertiary framegroup animation (strength = lerpfrac3) */
10 .float frame3;
11 /** quaternary framegroup animation (strength = lerpfrac4) */
12 .float frame4;
13
14 /** strength of framegroup blend */
15 .float lerpfrac;
16 /** strength of framegroup blend */
17 .float lerpfrac3;
18 /** strength of framegroup blend */
19 .float lerpfrac4;
20
21 /** start time of framegroup animation */
22 .float frame1time;
23 /** start time of framegroup animation */
24 .float frame2time;
25 /** start time of framegroup animation */
26 .float frame3time;
27 /** start time of framegroup animation */
28 .float frame4time;
29
30 // end engine fields
31
32 // player animation state
33
34 .int animstate_startframe;
35 .int animstate_numframes;
36 .float animstate_framerate;
37 .float animstate_starttime;
38 .float animstate_endtime;
39 /** whether to repeat */
40 .bool animstate_looping;
41 /** true for one cycle, then changed to false */
42 .bool animstate_override;
43
44 void anim_set(entity e, vector anim, bool looping, bool override, bool restart);
45 #define setanim(...) anim_set(__VA_ARGS__)
46 void anim_update(entity e);
47 #define updateanim(...) anim_update(__VA_ARGS__)