From: Rudolf Polzer Date: Sun, 7 Dec 2014 15:59:34 +0000 (+0100) Subject: csqcplayers: for player models, always overwrite .frame each frame. X-Git-Tag: xonotic-v0.8.0~124 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5902e7c6a89192433dd2a3ab16cef0619c97c07e;p=xonotic%2Fxonotic-data.pk3dir.git csqcplayers: for player models, always overwrite .frame each frame. --- diff --git a/qcsrc/client/csqcmodel_hooks.qc b/qcsrc/client/csqcmodel_hooks.qc index 120b6658d..b55d81d8d 100644 --- a/qcsrc/client/csqcmodel_hooks.qc +++ b/qcsrc/client/csqcmodel_hooks.qc @@ -655,16 +655,15 @@ void CSQCModel_Hook_PreDraw(float isplayer) self.anim_saveframe1time = self.anim_frame1time; self.anim_saveframe2 = self.anim_frame2; self.anim_saveframe2time = self.anim_frame2time; - if(sf) - { - CSQCModel_InterpolateAnimation_2To4_PreNote(sf | CSQCMODEL_PROPERTY_LERPFRAC); - self.lerpfrac = (doblend ? 0.5 : 0); - self.frame = self.anim_frame; - self.frame1time = self.anim_frame1time; - self.frame2 = self.anim_frame2; - self.frame2time = self.anim_frame2time; - CSQCModel_InterpolateAnimation_2To4_Note(sf | CSQCMODEL_PROPERTY_LERPFRAC, FALSE); - } + // Note: we always consider lerpfrac "changed", as it uses fixed values every time anyway. + // This ensures that .frame etc. are always written. + CSQCModel_InterpolateAnimation_2To4_PreNote(sf | CSQCMODEL_PROPERTY_LERPFRAC); + self.lerpfrac = (doblend ? 0.5 : 0); + self.frame = self.anim_frame; + self.frame1time = self.anim_frame1time; + self.frame2 = self.anim_frame2; + self.frame2time = self.anim_frame2time; + CSQCModel_InterpolateAnimation_2To4_Note(sf | CSQCMODEL_PROPERTY_LERPFRAC, FALSE); CSQCModel_InterpolateAnimation_2To4_Do(); if(doblend) {