diff options
| author | Hein-Pieter van Braam | 2017-08-24 22:58:51 +0200 |
|---|---|---|
| committer | Hein-Pieter van Braam | 2017-08-24 23:08:24 +0200 |
| commit | cacced7e507f7603bacc03ae2616e58f0ede122a (patch) | |
| tree | 7af89373e86cd1a7af6ea04e10280084cabb7144 /scene/animation/animation_player.cpp | |
| parent | 4aa2c18cb428ffde05c67987926736a9ca62703b (diff) | |
| download | godot-cacced7e507f7603bacc03ae2616e58f0ede122a.tar.gz godot-cacced7e507f7603bacc03ae2616e58f0ede122a.tar.zst godot-cacced7e507f7603bacc03ae2616e58f0ede122a.zip | |
Diffstat (limited to 'scene/animation/animation_player.cpp')
| -rw-r--r-- | scene/animation/animation_player.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp index 3acb11541..b94115775 100644 --- a/scene/animation/animation_player.cpp +++ b/scene/animation/animation_player.cpp @@ -251,9 +251,9 @@ void AnimationPlayer::_generate_node_caches(AnimationData *p_anim) { uint32_t id = resource.is_valid() ? resource->get_instance_id() : child->get_instance_id(); int bone_idx = -1; - if (a->track_get_path(i).get_property() && child->cast_to<Skeleton>()) { + if (a->track_get_path(i).get_property() && Object::cast_to<Skeleton>(child)) { - bone_idx = child->cast_to<Skeleton>()->find_bone(a->track_get_path(i).get_property()); + bone_idx = Object::cast_to<Skeleton>(child)->find_bone(a->track_get_path(i).get_property()); if (bone_idx == -1) { continue; @@ -280,14 +280,14 @@ void AnimationPlayer::_generate_node_caches(AnimationData *p_anim) { p_anim->node_cache[i]->path = a->track_get_path(i); p_anim->node_cache[i]->node = child; p_anim->node_cache[i]->resource = resource; - p_anim->node_cache[i]->node_2d = child->cast_to<Node2D>(); + p_anim->node_cache[i]->node_2d = Object::cast_to<Node2D>(child); if (a->track_get_type(i) == Animation::TYPE_TRANSFORM) { // special cases and caches for transform tracks // cache spatial - p_anim->node_cache[i]->spatial = child->cast_to<Spatial>(); + p_anim->node_cache[i]->spatial = Object::cast_to<Spatial>(child); // cache skeleton - p_anim->node_cache[i]->skeleton = child->cast_to<Skeleton>(); + p_anim->node_cache[i]->skeleton = Object::cast_to<Skeleton>(child); if (p_anim->node_cache[i]->skeleton) { StringName bone_name = a->track_get_path(i).get_property(); |
