diff options
author | Juan Linietsky <juan@godotengine.org> | 2020-02-12 14:24:06 -0300 |
---|---|---|
committer | Juan Linietsky <juan@godotengine.org> | 2020-02-12 14:24:54 -0300 |
commit | cf8c679a23b21d6c6f29cba6a54eaa2eed88bf92 (patch) | |
tree | 52aca947b395362b2addec4843915b15947c32ca /scene/3d/remote_transform.cpp | |
parent | 4aa31a2851e3dd5b67193194f899850239b2669d (diff) | |
download | redot-engine-cf8c679a23b21d6c6f29cba6a54eaa2eed88bf92.tar.gz |
ObjectID converted to a structure, fixes many bugs where used incorrectly as 32 bits.
Diffstat (limited to 'scene/3d/remote_transform.cpp')
-rw-r--r-- | scene/3d/remote_transform.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/scene/3d/remote_transform.cpp b/scene/3d/remote_transform.cpp index 983af7a9ec..9ef43647ba 100644 --- a/scene/3d/remote_transform.cpp +++ b/scene/3d/remote_transform.cpp @@ -31,7 +31,7 @@ #include "remote_transform.h" void RemoteTransform::_update_cache() { - cache = 0; + cache = ObjectID(); if (has_node(remote_node)) { Node *node = get_node(remote_node); if (!node || this == node || node->is_a_parent_of(this) || this->is_a_parent_of(node)) { @@ -47,7 +47,7 @@ void RemoteTransform::_update_remote() { if (!is_inside_tree()) return; - if (!cache) + if (cache.is_null()) return; Spatial *n = Object::cast_to<Spatial>(ObjectDB::get_instance(cache)); @@ -114,7 +114,7 @@ void RemoteTransform::_notification(int p_what) { if (!is_inside_tree()) break; - if (cache) { + if (cache.is_valid()) { _update_remote(); } @@ -219,6 +219,5 @@ RemoteTransform::RemoteTransform() { update_remote_rotation = true; update_remote_scale = true; - cache = 0; set_notify_transform(true); } |