From 5febac09944fc74c5ce8a72653547aa7835bd6b1 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 31 Mar 2015 15:21:15 +0200 Subject: [PATCH] - removed incorrect multiplication from FraggleScript's PointToDist function. The problem was introduced by replacing a (fixed_t) type cast with FLOATTOFIXED without removing the value range adjustment. --- src/fragglescript/t_func.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fragglescript/t_func.cpp b/src/fragglescript/t_func.cpp index 4825fe06b..0bddcd7fd 100644 --- a/src/fragglescript/t_func.cpp +++ b/src/fragglescript/t_func.cpp @@ -1420,7 +1420,7 @@ void FParser::SF_PointToDist(void) double y = floatvalue(t_argv[3]) - floatvalue(t_argv[1]); t_return.type = svt_fixed; - t_return.value.f = FLOAT2FIXED(sqrt(x*x+y*y)*65536.f); + t_return.value.f = FLOAT2FIXED(sqrt(x*x+y*y)); } }