From 840eef8eb199c032a119357bd6bad394d287e78f Mon Sep 17 00:00:00 2001 From: Strangerke Date: Mon, 23 Jun 2014 18:10:05 +0200 Subject: CGE2: Add a big hack to work around the coordinates issue --- engines/cge2/hero.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'engines/cge2/hero.cpp') diff --git a/engines/cge2/hero.cpp b/engines/cge2/hero.cpp index 3e9a439f1a..d1caf1f43e 100644 --- a/engines/cge2/hero.cpp +++ b/engines/cge2/hero.cpp @@ -314,7 +314,8 @@ int Hero::distance(V3D pos) { V3D di = _pos3D - pos; int x = di._x.round(); int z = di._z.round(); - return ((int)sqrt((long double)x * x + z * z)); + int retval = (int)sqrt((long double)x * x + z * z); + return retval; } int Hero::distance(Sprite *spr) { -- cgit v1.2.3