From 54b42974f82c296f59c6a914f09200c08d4e296c Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Tue, 21 Feb 2012 23:31:03 +0100 Subject: [PATCH] fix a bug in the 1-frame case --- qcsrc/csqcmodellib/cl_model.qc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qcsrc/csqcmodellib/cl_model.qc b/qcsrc/csqcmodellib/cl_model.qc index b77507bb65..c54593be02 100644 --- a/qcsrc/csqcmodellib/cl_model.qc +++ b/qcsrc/csqcmodellib/cl_model.qc @@ -134,7 +134,10 @@ void CSQCModel_InterpolateAnimation_Do() } else { - self.lerpfrac = 1 - bound(0, (time - self.frame1time) / autocvar_cl_lerpanim_maxdelta_framegroups, 1); + if(self.frame2time == 0) // if frame2 was not previously displayed, only frame1 can make sense + self.lerpfrac = 0; + else + self.lerpfrac = 1 - bound(0, (time - self.frame1time) / autocvar_cl_lerpanim_maxdelta_framegroups, 1); } #endif } -- 2.39.2