X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcsqcmodellib%2Fcl_model.qh;h=98f1da03b49561fb6e3b7ac272196f87622615b2;hp=e8ea9012cb3e16ffc6b1f761c875da7672823ef3;hb=a240e0309a8ec5837f3ac3d37c168f5262e53d5b;hpb=ac51af716204959703e1d10f1c1ad1b2c60beafa diff --git a/qcsrc/csqcmodellib/cl_model.qh b/qcsrc/csqcmodellib/cl_model.qh index e8ea9012c..98f1da03b 100644 --- a/qcsrc/csqcmodellib/cl_model.qh +++ b/qcsrc/csqcmodellib/cl_model.qh @@ -19,8 +19,12 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ +#ifndef CL_MODEL_H +#define CL_MODEL_H -void CSQCModel_Read(float isnew); +#include "common.qh" + +void CSQCModel_Read(bool isnew); #define CSQCMODEL_IF(cond) #define CSQCMODEL_ENDIF @@ -35,3 +39,17 @@ void CSQCModel_Read(float isnew); entity CSQCModel_server2csqc(float pl); .float csqcmodel_teleported; + +// this is exported for custom frame animation code. Use with care. +// to update frames, first call this: +void CSQCModel_InterpolateAnimation_2To4_PreNote(int sf); +void CSQCModel_InterpolateAnimation_1To2_PreNote(int sf); +// then update frame, frame1time (and possibly frame2, frame2time, lerpfrac) +// if set_times is not set, caller is responsible for frame1time, frame2time, csqcmodel_lerpfractime! +void CSQCModel_InterpolateAnimation_2To4_Note(int sf, float set_times); +void CSQCModel_InterpolateAnimation_1To2_Note(int sf, float set_times); +// to retrieve animation state, call this +void CSQCModel_InterpolateAnimation_2To4_Do(); +void CSQCModel_InterpolateAnimation_1To2_Do(); +// will overwrite lerpfrac, lerpfrac3, lerpfrac4, and possibly clear frame*time if they are undisplayed according to lerpfracs +#endif