From: Rudolf Polzer Date: Fri, 15 Oct 2010 16:56:42 +0000 (+0200) Subject: fix handling of angles of the rocket projectile X-Git-Tag: xonotic-v0.1.0preview~301 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=79f55bef0bc029dc324680292ccbd21f3ab67fbc;p=xonotic%2Fxonotic-data.pk3dir.git fix handling of angles of the rocket projectile --- diff --git a/qcsrc/client/interpolate.qc b/qcsrc/client/interpolate.qc index 5ee28b0fd..f96d3d7f9 100644 --- a/qcsrc/client/interpolate.qc +++ b/qcsrc/client/interpolate.qc @@ -6,15 +6,17 @@ .float itime1, itime2; void InterpolateOrigin_Reset() { - self.iflags &~= (IFLAG_PREVALID | IFLAG_VALID); + self.iflags &~= IFLAG_INTERNALMASK; self.itime1 = self.itime2 = 0; } void InterpolateOrigin_Note() { float dt; + float f0; dt = time - self.itime2; + f0 = self.iflags; if(self.iflags & IFLAG_PREVALID) self.iflags |= IFLAG_VALID; else @@ -30,8 +32,16 @@ void InterpolateOrigin_Note() if(self.iflags & IFLAG_ANGLES) { fixedmakevectors(self.angles); - self.iforward1 = self.iforward2; - self.iup1 = self.iup2; + if(f0 & IFLAG_VALID) + { + self.iforward1 = self.iforward2; + self.iup1 = self.iup2; + } + else + { + self.iforward1 = v_forward; + self.iup1 = v_up; + } self.iforward2 = v_forward; self.iup2 = v_up; }