From 90412527e0502bf9d5cd1ffdb8544ccb8c214e03 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Wed, 18 Dec 2019 09:31:32 +0000 Subject: [PATCH] Improve accuracy of sepldist when one dimension is zero Backported from Rednukem. git-svn-id: https://svn.eduke32.com/eduke32@8442 1a8010ca-5511-0410-912e-c29ae57300e0 # Conflicts: # source/build/include/common.h --- source/build/include/common.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/source/build/include/common.h b/source/build/include/common.h index c91407641..ff3ac4de1 100644 --- a/source/build/include/common.h +++ b/source/build/include/common.h @@ -78,11 +78,8 @@ static inline int32_t sepldist(const int32_t dx, const int32_t dy) { vec2_t d = { klabs(dx), klabs(dy) }; - if (playing_rr) - { - if (!d.y) return d.x; - if (!d.x) return d.y; - } + if (!d.y) return d.x; + if (!d.x) return d.y; if (d.x < d.y) swaplong(&d.x, &d.y);