diff options
Diffstat (limited to 'scene/3d/remote_transform.cpp')
-rw-r--r-- | scene/3d/remote_transform.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/scene/3d/remote_transform.cpp b/scene/3d/remote_transform.cpp index 492930ea9b..8faf985b11 100644 --- a/scene/3d/remote_transform.cpp +++ b/scene/3d/remote_transform.cpp @@ -1,10 +1,9 @@ - /*************************************************************************/ -/* remote_transform.cpp */ +/* remote_transform.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ -/* http://www.godotengine.org */ +/* https://godotengine.org */ /*************************************************************************/ /* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ /* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ @@ -51,11 +50,7 @@ void RemoteTransform::_update_remote() { if (!cache) return; - Object *obj = ObjectDB::get_instance(cache); - if (!obj) - return; - - Spatial *n = obj->cast_to<Spatial>(); + Spatial *n = Object::cast_to<Spatial>(ObjectDB::get_instance(cache)); if (!n) return; @@ -177,7 +172,7 @@ bool RemoteTransform::get_update_scale() const { String RemoteTransform::get_configuration_warning() const { - if (!has_node(remote_node) || !get_node(remote_node) || !get_node(remote_node)->cast_to<Spatial>()) { + if (!has_node(remote_node) || !Object::cast_to<Spatial>(get_node(remote_node))) { return TTR("Path property must point to a valid Spatial node to work."); } |