From 5f54d437603d33b5be602d7e86e9ccdb18b6925b Mon Sep 17 00:00:00 2001 From: Wanne Date: Wed, 8 Jul 2020 18:28:31 +0000 Subject: [PATCH] Fixed compilation error (sqrt) when compiling in Visual Studio 2010 git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8848 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- TileEngine/overhead map.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TileEngine/overhead map.cpp b/TileEngine/overhead map.cpp index b69b84bc..89693709 100644 --- a/TileEngine/overhead map.cpp +++ b/TileEngine/overhead map.cpp @@ -1772,8 +1772,8 @@ void RenderOverheadOverlays() // in order not go give away the precise location of the item, have the center of the circles vary, but with the item being inside // we can't use random numbers as the circles shouldn't move upon repeated calls, so use modulo magic INT16 totalvariationsquared = ( 4 + pWorldItem->sGridNo * 37 ) % radiusingridnos*radiusingridnos; - INT16 variation_x = sqrt(( ( pWorldItem->sGridNo * 13 ) % 100 ) * totalvariationsquared / 100); - INT16 variation_y = sqrt( totalvariationsquared - variation_x * variation_x ); + INT16 variation_x = sqrt(DOUBLE(( ( pWorldItem->sGridNo * 13 ) % 100 ) * totalvariationsquared / 100)); + INT16 variation_y = sqrt(DOUBLE(totalvariationsquared - variation_x * variation_x )); if ( pWorldItem->sGridNo % 8 < 4 ) variation_x *= -1; if ( (2 + pWorldItem->sGridNo) % 8 < 4 ) variation_y *= -1;