diff options
Diffstat (limited to 'scene/2d/remote_transform_2d.cpp')
-rw-r--r-- | scene/2d/remote_transform_2d.cpp | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/scene/2d/remote_transform_2d.cpp b/scene/2d/remote_transform_2d.cpp index ec50f5f922..d9b73a5e6e 100644 --- a/scene/2d/remote_transform_2d.cpp +++ b/scene/2d/remote_transform_2d.cpp @@ -32,7 +32,6 @@ #include "scene/scene_string_names.h" void RemoteTransform2D::_update_cache() { - cache = ObjectID(); if (has_node(remote_node)) { Node *node = get_node(remote_node); @@ -45,7 +44,6 @@ void RemoteTransform2D::_update_cache() { } void RemoteTransform2D::_update_remote() { - if (!is_inside_tree()) return; @@ -61,7 +59,6 @@ void RemoteTransform2D::_update_remote() { //todo make faster if (use_global_coordinates) { - if (update_remote_position && update_remote_rotation && update_remote_scale) { n->set_global_transform(get_global_transform()); } else { @@ -83,7 +80,6 @@ void RemoteTransform2D::_update_remote() { } } else { - if (update_remote_position && update_remote_rotation && update_remote_scale) { n->set_transform(get_transform()); } else { @@ -107,11 +103,8 @@ void RemoteTransform2D::_update_remote() { } void RemoteTransform2D::_notification(int p_what) { - switch (p_what) { - case NOTIFICATION_ENTER_TREE: { - _update_cache(); } break; @@ -120,7 +113,6 @@ void RemoteTransform2D::_notification(int p_what) { break; if (cache.is_valid()) { - _update_remote(); } @@ -129,7 +121,6 @@ void RemoteTransform2D::_notification(int p_what) { } void RemoteTransform2D::set_remote_node(const NodePath &p_remote_node) { - remote_node = p_remote_node; if (is_inside_tree()) { _update_cache(); @@ -140,7 +131,6 @@ void RemoteTransform2D::set_remote_node(const NodePath &p_remote_node) { } NodePath RemoteTransform2D::get_remote_node() const { - return remote_node; } @@ -185,7 +175,6 @@ void RemoteTransform2D::force_update_cache() { } String RemoteTransform2D::get_configuration_warning() const { - if (!has_node(remote_node) || !Object::cast_to<Node2D>(get_node(remote_node))) { return TTR("Path property must point to a valid Node2D node to work."); } @@ -194,7 +183,6 @@ String RemoteTransform2D::get_configuration_warning() const { } void RemoteTransform2D::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_remote_node", "path"), &RemoteTransform2D::set_remote_node); ClassDB::bind_method(D_METHOD("get_remote_node"), &RemoteTransform2D::get_remote_node); ClassDB::bind_method(D_METHOD("force_update_cache"), &RemoteTransform2D::force_update_cache); @@ -219,7 +207,6 @@ void RemoteTransform2D::_bind_methods() { } RemoteTransform2D::RemoteTransform2D() { - use_global_coordinates = true; update_remote_position = true; update_remote_rotation = true; |