X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcsqcmodellib%2Finterpolate.qc;h=78fb051f793765d0c9f5d884dead2ef9a5bb8bb1;hb=b974a7cdcce185eede9dcf22d2c95772cab31401;hp=c1626f816e3b395cb70fa9da1c0e07737ccb1ae0;hpb=e14bb786305e05541496fb5b28c090e0ff1b5783;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/csqcmodellib/interpolate.qc b/qcsrc/csqcmodellib/interpolate.qc index c1626f816..78fb051f7 100644 --- a/qcsrc/csqcmodellib/interpolate.qc +++ b/qcsrc/csqcmodellib/interpolate.qc @@ -19,6 +19,16 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ +#if defined(CSQC) + #include "../dpdefs/csprogsdefs.qh" + #include "../client/defs.qh" + #include "../warpzonelib/anglestransform.qh" + #include "../client/autocvars.qh" + #include "interpolate.qh" + #include "cl_model.qh" +#elif defined(MENUQC) +#elif defined(SVQC) +#endif .vector iorigin1, iorigin2; .vector ivelocity1, ivelocity2; @@ -28,14 +38,14 @@ .vector ivup1, ivup2; .float itime1, itime2; void InterpolateOrigin_Reset() -{ - self.iflags &~= IFLAG_INTERNALMASK; +{SELFPARAM(); + self.iflags &= ~IFLAG_INTERNALMASK; self.itime1 = self.itime2 = 0; } void InterpolateOrigin_Note() -{ +{SELFPARAM(); float dt; - float f0; + int f0; dt = time - self.itime2; @@ -95,7 +105,7 @@ void InterpolateOrigin_Note() else if(self.iflags & IFLAG_V_ANGLE_X) { self.ivforward1_x = self.ivforward2_x; - self.ivforward2_x = self.v_angle_x; + self.ivforward2_x = self.v_angle.x; } if(self.iflags & IFLAG_VELOCITY) @@ -106,7 +116,7 @@ void InterpolateOrigin_Note() if(self.iflags & IFLAG_TELEPORTED) { - self.iflags &~= IFLAG_TELEPORTED; + self.iflags &= ~IFLAG_TELEPORTED; self.itime1 = self.itime2 = time; // don't lerp } else if(vlen(self.iorigin2 - self.iorigin1) > 1000) @@ -128,7 +138,7 @@ void InterpolateOrigin_Note() } } void InterpolateOrigin_Do() -{ +{SELFPARAM(); vector forward, up; if(self.itime1 && self.itime2 && self.itime1 != self.itime2) { @@ -155,7 +165,7 @@ void InterpolateOrigin_Do() } } void InterpolateOrigin_Undo() -{ +{SELFPARAM(); if(self.iflags & IFLAG_ORIGIN) setorigin(self, self.iorigin2); if(self.iflags & IFLAG_ANGLES)