From e64b82ebfcc3475c7a7d2a9196bfe20d6c9e3614 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sat, 15 Jul 2017 12:01:46 +0200 Subject: Some more typo fixes for "threshold" Looks like @reduz really does not like that word. --- editor/plugins/collision_polygon_editor_plugin.cpp | 10 +++++----- editor/plugins/path_2d_editor_plugin.cpp | 8 ++++---- modules/visual_script/visual_script_flow_control.cpp | 8 ++++---- servers/physics_2d/space_2d_sw.cpp | 2 +- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/editor/plugins/collision_polygon_editor_plugin.cpp b/editor/plugins/collision_polygon_editor_plugin.cpp index c89e6f59a4..270ba5a5a4 100644 --- a/editor/plugins/collision_polygon_editor_plugin.cpp +++ b/editor/plugins/collision_polygon_editor_plugin.cpp @@ -149,7 +149,7 @@ bool CollisionPolygonEditor::forward_spatial_gui_input(Camera* p_camera,const In Vector poly = node->get_polygon(); //first check if a point is to be added (segment split) - real_t grab_treshold=EDITOR_DEF("editors/poly_editor/point_grab_radius",8); + real_t grab_threshold=EDITOR_DEF("editors/poly_editor/point_grab_radius",8); switch(mode) { @@ -171,7 +171,7 @@ bool CollisionPolygonEditor::forward_spatial_gui_input(Camera* p_camera,const In } else { - if (wip.size()>1 && p_camera->unproject_position(gt.xform(Vector3(wip[0].x,wip[0].y,depth))).distance_to(gpoint)1 && p_camera->unproject_position(gt.xform(Vector3(wip[0].x,wip[0].y,depth))).distance_to(gpoint)unproject_position(gt.xform(Vector3(poly[i].x,poly[i].y,depth))); real_t d = cp.distance_to(gpoint); - if (dunproject_position(gt.xform(Vector3(poly[i].x,poly[i].y,depth))); real_t d = cp.distance_to(gpoint); - if (d &p_event) { edited_point=1; return true; } else { - if (wip.size()>1 && xform.xform(wip[0]).distance_to(gpoint)1 && xform.xform(wip[0]).distance_to(gpoint) &p_event) { continue; //not valid to reuse point real_t d = cp.distance_to(gpoint); - if (d &p_event) { Vector2 cp =xform.xform(poly[i]); real_t d = cp.distance_to(gpoint); - if (d &p_event) { Vector2 cp =xform.xform(poly[i]); real_t d = cp.distance_to(gpoint); - if (d(); filters[idx].type = Ref::Type(int(p_value)); if (filters[idx].type == Ref::JOYPAD_MOTION) { - filters[idx].joy_motion.axis_value = 0.5; //for treshold + filters[idx].joy_motion.axis_value = 0.5; //for threshold } else if (filters[idx].type == Ref::KEY) { filters[idx]->is_pressed() = true; //put these as true to make it more user friendly } else if (filters[idx].type == Ref::MOUSE_BUTTON) { @@ -1071,7 +1071,7 @@ bool VisualScriptInputFilter::_set(const StringName &p_name, const Variant &p_va filters[idx].joy_motion.axis = int(p_value) << 1 | filters[idx].joy_motion.axis; } else if (what == "mode") { filters[idx].joy_motion.axis |= int(p_value); - } else if (what == "treshold") { + } else if (what == "threshold") { filters[idx].joy_motion.axis_value = p_value; } else { return false; @@ -1281,7 +1281,7 @@ bool VisualScriptInputFilter::_get(const StringName &p_name, Variant &r_ret) con r_ret = filters[idx].joy_motion.axis >> 1; } else if (what == "mode") { r_ret = filters[idx].joy_motion.axis & 1; - } else if (what == "treshold") { + } else if (what == "threshold") { r_ret = filters[idx].joy_motion.axis_value; } else { return false; @@ -1434,7 +1434,7 @@ void VisualScriptInputFilter::_get_property_list(List *p_list) con p_list->push_back(PropertyInfo(Variant::INT, base + "axis_index")); p_list->push_back(PropertyInfo(Variant::INT, base + "mode", PROPERTY_HINT_ENUM, "Min,Max")); - p_list->push_back(PropertyInfo(Variant::REAL, base + "treshold", PROPERTY_HINT_RANGE, "0,1,0.01")); + p_list->push_back(PropertyInfo(Variant::REAL, base + "threshold", PROPERTY_HINT_RANGE, "0,1,0.01")); } break; case Ref::JOYPAD_BUTTON: { p_list->push_back(PropertyInfo(Variant::INT, base + "button_index")); diff --git a/servers/physics_2d/space_2d_sw.cpp b/servers/physics_2d/space_2d_sw.cpp index 7049a9cf34..bcc58b3aac 100644 --- a/servers/physics_2d/space_2d_sw.cpp +++ b/servers/physics_2d/space_2d_sw.cpp @@ -1186,7 +1186,7 @@ Space2DSW::Space2DSW() { contact_max_allowed_penetration = 0.3; constraint_bias = 0.2; - body_linear_velocity_sleep_threshold = GLOBAL_DEF("physics/2d/sleep_threashold_linear", 2.0); + body_linear_velocity_sleep_threshold = GLOBAL_DEF("physics/2d/sleep_threshold_linear", 2.0); body_angular_velocity_sleep_threshold = GLOBAL_DEF("physics/2d/sleep_threshold_angular", (8.0 / 180.0 * Math_PI)); body_time_to_sleep = GLOBAL_DEF("physics/2d/time_before_sleep", 0.5); -- cgit v1.2.3