From: Rudolf Polzer Date: Sun, 3 Nov 2024 01:03:08 +0000 (-0400) Subject: Fix some inconsistent ifdeffery. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c4e95da77e83a652d51f8bf89a25d038036bf289;p=xonotic%2Fxonotic-data.pk3dir.git Fix some inconsistent ifdeffery. Note that the function changed can't actually be called unless KEEP_ROLL is defined, which Xonotic does not define. --- diff --git a/qcsrc/lib/warpzone/common.qc b/qcsrc/lib/warpzone/common.qc index 7858311bc..65625a877 100644 --- a/qcsrc/lib/warpzone/common.qc +++ b/qcsrc/lib/warpzone/common.qc @@ -561,16 +561,22 @@ vector WarpZone_UnTransformAngles(entity wz, vector v) vector WarpZone_UnTransformVAngles(entity wz, vector ang) { +#ifdef KEEP_ROLL float roll; - roll = ang.z; ang.z = 0; +#endif ang = AnglesTransform_ApplyToVAngles(AnglesTransform_Invert(wz.warpzone_transform), ang); + +#ifdef KEEP_ROLL ang = AnglesTransform_Normalize(ang, true); ang = AnglesTransform_CancelRoll(ang); - ang.z = roll; +#else + ang = AnglesTransform_Normalize(ang, false); +#endif + return ang; }