From 52c710f25a1b8dcdb1cd967c755fba6a93db1fc6 Mon Sep 17 00:00:00 2001 From: Ivan Vodopiviz Date: Sat, 17 Mar 2018 23:32:07 +0100 Subject: [PATCH] Changed debug max distance to avoid overflow Changed it to roughly sqrt(FLT_MAX), it's a little less to account for float inaccuracies. Fixes #1835 (cherry picked from commit 55f79f2e809f27e3e3d24e8f06cb86a9e28cffb0) --- servers/physics/collision_object_sw.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/servers/physics/collision_object_sw.h b/servers/physics/collision_object_sw.h index f5d32e56a01..dee28bb6dff 100644 --- a/servers/physics/collision_object_sw.h +++ b/servers/physics/collision_object_sw.h @@ -37,7 +37,8 @@ #include "shape_sw.h" #ifdef DEBUG_ENABLED -#define MAX_OBJECT_DISTANCE 10000000.0 +#define MAX_OBJECT_DISTANCE 3.1622776601683791e+18 + #define MAX_OBJECT_DISTANCE_X2 (MAX_OBJECT_DISTANCE * MAX_OBJECT_DISTANCE) #endif