]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
fix a bug in the 1-frame case
authorRudolf Polzer <divverent@alientrap.org>
Tue, 21 Feb 2012 22:31:03 +0000 (23:31 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Tue, 21 Feb 2012 22:31:03 +0000 (23:31 +0100)
qcsrc/csqcmodellib/cl_model.qc

index b77507bb653a53d9eb1253ceec1ac60cb3c78c91..c54593be022ef17b1670bbb0df839335e754451c 100644 (file)
@@ -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
 }