summaryrefslogtreecommitdiff
path: root/servers/physics/collision_object_sw.h
diff options
context:
space:
mode:
authorNils ANDRÉ-CHANG <nils@nilsand.re>2019-09-12 21:28:49 +0100
committerNils ANDRÉ-CHANG <nils@nilsand.re>2019-09-26 20:36:12 +0100
commit0024dd7bb5a8a5194ed0283fc506edcd8b4a7737 (patch)
tree86316cccbf4fda58a275a7451e37fda83465bb20 /servers/physics/collision_object_sw.h
parentcafb888361eba08297dd88b18dc71f4d418525c0 (diff)
parent24e1039eb6fe32115e8d1a62a84965e9be19a2ed (diff)
Merge branch 'master' into tab_key
Diffstat (limited to 'servers/physics/collision_object_sw.h')
-rw-r--r--servers/physics/collision_object_sw.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/servers/physics/collision_object_sw.h b/servers/physics/collision_object_sw.h
index 895eda8528..b9912f0ba2 100644
--- a/servers/physics/collision_object_sw.h
+++ b/servers/physics/collision_object_sw.h
@@ -86,13 +86,9 @@ protected:
void _unregister_shapes();
_FORCE_INLINE_ void _set_transform(const Transform &p_transform, bool p_update_shapes = true) {
-
#ifdef DEBUG_ENABLED
- if (p_transform.origin.length_squared() > MAX_OBJECT_DISTANCE_X2) {
- ERR_EXPLAIN("Object went too far away (more than " + itos(MAX_OBJECT_DISTANCE) + "mts from origin).");
- ERR_FAIL();
- }
+ ERR_FAIL_COND_MSG(p_transform.origin.length_squared() > MAX_OBJECT_DISTANCE_X2, "Object went too far away (more than " + itos(MAX_OBJECT_DISTANCE) + " units from origin).");
#endif
transform = p_transform;