From: Rudolf Polzer Date: Tue, 21 Feb 2012 22:31:03 +0000 (+0100) Subject: fix a bug in the 1-frame case X-Git-Tag: xonotic-v0.6.0~55 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=54b42974f82c296f59c6a914f09200c08d4e296c;ds=sidebyside fix a bug in the 1-frame case --- 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 }