11 classfield(Skeleton) .float skeleton_info_modelindex;
12 classfield(Skeleton) .float skeleton_info_skin;
22 if(e.skeleton_info_modelindex == e.modelindex && e.skeleton_info_skin == e.skin)
34 e.(bone_aimweight[i]) = 0;
55 LOG_TRACE(
"No model parameters for ", e.model);
58 e.skeleton_info_modelindex = e.modelindex;
59 e.skeleton_info_skin = e.skin;
62 skel_delete(e.skeletonindex);
69 float s = e.skeletonindex;
70 float n = (e.skeleton_numbones = skel_get_numbones(s));
72 for(i = 1; i <= n; ++i)
77 t = e.(skeleton_bonetype[p-1]);
78 if(i == e.bone_upperbody)
80 e.(skeleton_bonetype[i-1]) = t;
109 skel_delete(e.skeletonindex);
117 float m = e.modelindex;
120 e.skeletonindex = skel_create(m);
123 float s = e.skeletonindex;
126 float n = e.skeleton_numbones;
127 float savelerpfrac = e.lerpfrac;
128 float savelerpfrac3 = e.lerpfrac3;
129 float savelerpfrac4 = e.lerpfrac4;
131 vector fixbone_oldangles =
'0 0 0';
136 e.lerpfrac3 = savelerpfrac3 * 2;
139 skel_build(s, e, m, 0, 1, n);
145 for(bone = 0; bone < n; )
147 float firstbone = bone;
148 float bonetype = e.skeleton_bonetype[bone];
149 for(++bone; (bone < n) && (e.skeleton_bonetype[bone] == bonetype); ++bone)
155 e.lerpfrac3 = savelerpfrac3 * 2;
161 e.lerpfrac = savelerpfrac * 2;
163 e.lerpfrac4 = savelerpfrac4 * 2;
167 skel_build(s, e, m, 0, firstbone + 1, bone);
169 e.lerpfrac = savelerpfrac;
170 e.lerpfrac3 = savelerpfrac3;
171 e.lerpfrac4 = savelerpfrac4;
187 if(!e.v_angle_save_x)
189 e.v_angle_x = e.v_angle_save_x;
199 vector aim =
'1 0 0' *
bound(-90, e.v_angle_x, 90) * e.(bone_aimweight[i]);
void skeleton_markbones(entity e)
float get_model_parameters(string m, float sk)
#define skel_get_boneparent
float get_model_parameters_fixbone
void skel_set_boneabs(float s, int bone, vector absorg)
classfield(Skeleton) .float skeleton_info_modelindex
string get_model_parameters_bone_aim[MAX_AIM_BONES]
string get_model_parameters_bone_weapon
vector(float skel, float bonenum) _skel_get_boneabs_hidden
string get_model_parameters_bone_upperbody
#define MUTATOR_CALLHOOK(id,...)
void free_skeleton_from_frames(entity e)
float get_model_parameters_bone_aimweight[MAX_AIM_BONES]
void skeleton_from_frames(entity e, bool is_dead)
void skeleton_loadinfo(entity e)