summaryrefslogtreecommitdiffstats
path: root/scene/3d/spatial.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/3d/spatial.cpp')
-rw-r--r--scene/3d/spatial.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/scene/3d/spatial.cpp b/scene/3d/spatial.cpp
index 6498238e12..9e85a8a5b1 100644
--- a/scene/3d/spatial.cpp
+++ b/scene/3d/spatial.cpp
@@ -128,7 +128,7 @@ void Spatial::_notification(int p_what) {
Node *p = get_parent();
if (p)
- data.parent = p->cast_to<Spatial>();
+ data.parent = Object::cast_to<Spatial>(p);
if (data.parent)
data.C = data.parent->data.children.push_back(this);
@@ -167,7 +167,7 @@ void Spatial::_notification(int p_what) {
data.viewport = NULL;
Node *parent = get_parent();
while (parent && !data.viewport) {
- data.viewport = parent->cast_to<Viewport>();
+ data.viewport = Object::cast_to<Viewport>(parent);
parent = parent->get_parent();
}
@@ -284,7 +284,7 @@ Transform Spatial::get_global_transform() const {
#if 0
void Spatial::add_child_notify(Node *p_child) {
/*
- Spatial *s=p_child->cast_to<Spatial>();
+ Spatial *s=Object::cast_to<Spatial>(p_child);
if (!s)
return;
@@ -299,7 +299,7 @@ void Spatial::add_child_notify(Node *p_child) {
void Spatial::remove_child_notify(Node *p_child) {
/*
- Spatial *s=p_child->cast_to<Spatial>();
+ Spatial *s=Object::cast_to<Spatial>(p_child);
if (!s)
return;