diff --git a/platform/x11/detect.py b/platform/x11/detect.py index 4ecd23204fc..7fa1666c59d 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -55,6 +55,7 @@ def get_opts(): ('use_leak_sanitizer','Use llvm compiler sanitize memory leaks','no'), ('pulseaudio','Detect & Use pulseaudio','yes'), ('new_wm_api', 'Use experimental window management API','no'), + ('debug_release', 'Add debug symbols to release version','no'), ] def get_flags(): @@ -109,7 +110,10 @@ def configure(env): if (env["target"]=="release"): - env.Append(CCFLAGS=['-O2','-ffast-math','-fomit-frame-pointer']) + if (env["debug_release"]): + env.Append(CCFLAGS=['-g2','-fomit-frame-pointer']) + else: + env.Append(CCFLAGS=['-O2','-ffast-math','-fomit-frame-pointer']) elif (env["target"]=="release_debug"): diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp index 2ebf34d34b1..27a512845c0 100644 --- a/scene/2d/camera_2d.cpp +++ b/scene/2d/camera_2d.cpp @@ -216,6 +216,7 @@ void Camera2D::_notification(int p_what) { } break; case NOTIFICATION_ENTER_TREE: { + viewport = NULL; Node *n=this; while(n){ @@ -526,6 +527,7 @@ Camera2D::Camera2D() { drag_margin[MARGIN_RIGHT]=0.2; drag_margin[MARGIN_BOTTOM]=0.2; camera_pos=Vector2(); + first=true; smoothing=0.0; zoom = Vector2(1, 1); diff --git a/scene/2d/navigation2d.cpp b/scene/2d/navigation2d.cpp index e4d10cad123..d427bf4bc32 100644 --- a/scene/2d/navigation2d.cpp +++ b/scene/2d/navigation2d.cpp @@ -516,7 +516,8 @@ Vector Navigation2D::get_simple_path(const Vector2& p_start, const Vect apex_poly=p; portal_left=apex_point; portal_right=apex_point; - path.push_back(apex_point); + if (path[path.size()-1].distance_to(apex_point)>CMP_EPSILON) + path.push_back(apex_point); skip=true; } } @@ -536,7 +537,8 @@ Vector Navigation2D::get_simple_path(const Vector2& p_start, const Vect apex_poly=p; portal_right=apex_point; portal_left=apex_point; - path.push_back(apex_point); + if (path[path.size()-1].distance_to(apex_point)>CMP_EPSILON) + path.push_back(apex_point); } } @@ -547,7 +549,7 @@ Vector Navigation2D::get_simple_path(const Vector2& p_start, const Vect } - if (path[path.size()-1]!=begin_point) + if (path[path.size()-1].distance_to(begin_point)>CMP_EPSILON) path.push_back(begin_point); path.invert(); diff --git a/scene/resources/curve.cpp b/scene/resources/curve.cpp index 32949c32b7e..c1a389942fe 100644 --- a/scene/resources/curve.cpp +++ b/scene/resources/curve.cpp @@ -798,6 +798,7 @@ void Curve2D::_bind_methods() { ObjectTypeDB::bind_method(_MD("get_baked_length"),&Curve2D::get_baked_length); ObjectTypeDB::bind_method(_MD("interpolate_baked","offset","cubic"),&Curve2D::interpolate_baked,DEFVAL(false)); ObjectTypeDB::bind_method(_MD("get_baked_points"),&Curve2D::get_baked_points); + ObjectTypeDB::bind_method(_MD("tesselate","max_stages","tolerance_degrees"),&Curve2D::tesselate,DEFVAL(5),DEFVAL(4)); ObjectTypeDB::bind_method(_MD("_get_data"),&Curve2D::_get_data); ObjectTypeDB::bind_method(_MD("_set_data"),&Curve2D::_set_data); @@ -1330,6 +1331,7 @@ void Curve3D::_bind_methods() { ObjectTypeDB::bind_method(_MD("interpolate_baked","offset","cubic"),&Curve3D::interpolate_baked,DEFVAL(false)); ObjectTypeDB::bind_method(_MD("get_baked_points"),&Curve3D::get_baked_points); ObjectTypeDB::bind_method(_MD("get_baked_tilts"),&Curve3D::get_baked_tilts); + ObjectTypeDB::bind_method(_MD("tesselate","max_stages","tolerance_degrees"),&Curve3D::tesselate,DEFVAL(5),DEFVAL(4)); ObjectTypeDB::bind_method(_MD("_get_data"),&Curve3D::_get_data); ObjectTypeDB::bind_method(_MD("_set_data"),&Curve3D::_set_data);