From c4e95da77e83a652d51f8bf89a25d038036bf289 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sat, 2 Nov 2024 21:03:08 -0400 Subject: [PATCH] Fix some inconsistent ifdeffery. Note that the function changed can't actually be called unless KEEP_ROLL is defined, which Xonotic does not define. --- qcsrc/lib/warpzone/common.qc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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; } -- 2.39.2