- fixed incompatibility of FindDistance3D with Shadow Warrior.

Fixes #200 and most likely many other issues as well.
This commit is contained in:
Christoph Oelckers 2020-08-18 23:49:44 +02:00
parent 57cdcda253
commit 0a8f7e60b6
2 changed files with 2 additions and 2 deletions

View file

@ -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 (x<y)
std::swap(x,y);

View file

@ -94,7 +94,7 @@ inline int dist(const spritetype* s1, const spritetype* s2)
vx = s1->x - 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)