From 0a8f7e60b6e99020d93ce951df05a147cd4ae9f6 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 18 Aug 2020 23:49:44 +0200 Subject: [PATCH] - fixed incompatibility of FindDistance3D with Shadow Warrior. Fixes #200 and most likely many other issues as well. --- source/core/mathutil.cpp | 2 +- source/games/duke/src/inlines.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/core/mathutil.cpp b/source/core/mathutil.cpp index df58c3daf..ad92b79a2 100644 --- a/source/core/mathutil.cpp +++ b/source/core/mathutil.cpp @@ -68,7 +68,7 @@ int FindDistance3D(int x, int y, int z) { x= abs(x); /* absolute values */ y= abs(y); - z= abs(z); + z= abs(z >> 4); if (xx - s2->x; vy = s1->y - s2->y; vz = s1->z - s2->z; - return(FindDistance3D(vx, vy, vz >> 4)); + return(FindDistance3D(vx, vy, vz)); } inline bool isIn(int value, int first)