Xonotic
anim.qh
Go to the documentation of this file.
1 #pragma once
2 
3 // begin engine fields
4 
6 .float frame;
8 .float frame2;
10 .float frame3;
12 .float frame4;
13 
15 .float lerpfrac;
17 .float lerpfrac3;
19 .float lerpfrac4;
20 
22 .float frame1time;
24 .float frame2time;
26 .float frame3time;
28 .float frame4time;
29 
30 // end engine fields
31 
32 // player animation state
33 
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__)
int animstate_numframes
Definition: anim.qh:35
float animstate_endtime
Definition: anim.qh:38
bool animstate_override
true for one cycle, then changed to false
Definition: anim.qh:42
float frame2
secondary framegroup animation (strength = lerpfrac)
Definition: anim.qh:8
entity() spawn
float frame4
quaternary framegroup animation (strength = lerpfrac4)
Definition: anim.qh:12
void anim_update(entity e)
Update e.frame based on its animstate relative to time.
Definition: anim.qc:36
float frame3
tertiary framegroup animation (strength = lerpfrac3)
Definition: anim.qh:10
float frame2time
start time of framegroup animation
Definition: anim.qh:24
int animstate_startframe
Definition: anim.qh:34
void anim_set(entity e, vector anim, bool looping, bool override, bool restart)
Definition: anim.qc:6
float frame3time
start time of framegroup animation
Definition: anim.qh:26
float lerpfrac
strength of framegroup blend
Definition: anim.qh:15
float lerpfrac4
strength of framegroup blend
Definition: anim.qh:19
vector(float skel, float bonenum) _skel_get_boneabs_hidden
float frame4time
start time of framegroup animation
Definition: anim.qh:28
float animstate_starttime
Definition: anim.qh:37
float frame
primary framegroup animation (strength = 1 - lerpfrac - lerpfrac3 - lerpfrac4)
Definition: anim.qh:6
bool animstate_looping
whether to repeat
Definition: anim.qh:40
float animstate_framerate
Definition: anim.qh:36
float frame1time
start time of framegroup animation
Definition: anim.qh:22
float lerpfrac3
strength of framegroup blend
Definition: anim.qh:17