summaryrefslogtreecommitdiff
path: root/scene/2d
diff options
context:
space:
mode:
Diffstat (limited to 'scene/2d')
-rw-r--r--scene/2d/camera_2d.cpp1
-rw-r--r--scene/2d/navigation2d.cpp7
-rw-r--r--scene/2d/visibility_notifier_2d.cpp12
3 files changed, 1 insertions, 19 deletions
diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp
index 85256be940..27e07a35be 100644
--- a/scene/2d/camera_2d.cpp
+++ b/scene/2d/camera_2d.cpp
@@ -44,7 +44,6 @@ void Camera2D::_update_scroll() {
if (current) {
Matrix32 xform = get_camera_transform();
- RID vp = viewport->get_viewport();
if (viewport) {
viewport->set_canvas_transform( xform );
}
diff --git a/scene/2d/navigation2d.cpp b/scene/2d/navigation2d.cpp
index b4332cc75d..82c1327a8f 100644
--- a/scene/2d/navigation2d.cpp
+++ b/scene/2d/navigation2d.cpp
@@ -552,7 +552,6 @@ debug path
if (p_optimize) {
//string pulling
- Polygon *apex_poly=end_poly;
Vector2 apex_point=end_point;
Vector2 portal_left=apex_point;
Vector2 portal_right=apex_point;
@@ -613,12 +612,9 @@ debug path
//print_line("***ADVANCE LEFT");
} else {
- //_clip_path(path,apex_poly,portal_right,right_poly);
-
apex_point=portal_right;
p=right_poly;
left_poly=p;
- apex_poly=p;
portal_left=apex_point;
portal_right=apex_point;
if (path[path.size()-1].distance_to(apex_point)>CMP_EPSILON)
@@ -637,12 +633,9 @@ debug path
//print_line("***ADVANCE RIGHT");
} else {
- //_clip_path(path,apex_poly,portal_left,left_poly);
-
apex_point=portal_left;
p=left_poly;
right_poly=p;
- apex_poly=p;
portal_right=apex_point;
portal_left=apex_point;
if (path[path.size()-1].distance_to(apex_point)>CMP_EPSILON)
diff --git a/scene/2d/visibility_notifier_2d.cpp b/scene/2d/visibility_notifier_2d.cpp
index 12524a2192..5411950976 100644
--- a/scene/2d/visibility_notifier_2d.cpp
+++ b/scene/2d/visibility_notifier_2d.cpp
@@ -270,9 +270,6 @@ void VisibilityEnabler2D::_notification(int p_what){
return;
- Node *from = this;
- //find where current scene starts
-
for (Map<Node*,Variant>::Element *E=nodes.front();E;E=E->next()) {
if (!visible)
@@ -293,14 +290,7 @@ void VisibilityEnabler2D::_change_node_state(Node* p_node,bool p_enabled) {
RigidBody2D *rb = p_node->cast_to<RigidBody2D>();
if (rb) {
- if (p_enabled) {
- RigidBody2D::Mode mode = RigidBody2D::Mode(nodes[p_node].operator int());
- //rb->set_mode(mode);
- rb->set_sleeping(false);
- } else {
- //rb->set_mode(RigidBody2D::MODE_STATIC);
- rb->set_sleeping(true);
- }
+ rb->set_sleeping(!p_enabled);
}
}