diff options
-rw-r--r-- | engines/cge2/hero.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/cge2/hero.cpp b/engines/cge2/hero.cpp index 5efb24e88d..d6dab6d3f0 100644 --- a/engines/cge2/hero.cpp +++ b/engines/cge2/hero.cpp @@ -245,7 +245,7 @@ int Hero::distance(V3D pos) { V3D di = _pos3D - pos; long x = V2D::round(di._x); long z = V2D::round(di._z); - return ((x * x + z * z) * (x * x + z * z)); + return (int)sqrt((long double)(x * x + z * z)); } int Hero::distance(Sprite *spr) { |