diff options
Diffstat (limited to 'scene/2d/sprite.cpp')
-rw-r--r-- | scene/2d/sprite.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scene/2d/sprite.cpp b/scene/2d/sprite.cpp index 2ec529a166..c53faab5f9 100644 --- a/scene/2d/sprite.cpp +++ b/scene/2d/sprite.cpp @@ -3,7 +3,7 @@ /*************************************************************************/ /* 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) */ @@ -399,7 +399,7 @@ void ViewportSprite::_notification(int p_what) { Node *n = get_node(viewport_path); ERR_FAIL_COND(!n); - Viewport *vp=n->cast_to<Viewport>(); + Viewport *vp=Object::cast_to<Viewport>(n); ERR_FAIL_COND(!vp); Ref<RenderTargetTexture> rtt = vp->get_render_target_texture(); @@ -467,7 +467,7 @@ void ViewportSprite::set_viewport_path(const NodePath& p_viewport) { Node *n = get_node(viewport_path); ERR_FAIL_COND(!n); - Viewport *vp=n->cast_to<Viewport>(); + Viewport *vp=Object::cast_to<Viewport>(n); ERR_FAIL_COND(!vp); Ref<RenderTargetTexture> rtt = vp->get_render_target_texture(); @@ -544,13 +544,13 @@ Rect2 ViewportSprite::get_item_rect() const { String ViewportSprite::get_configuration_warning() const { - if (!has_node(viewport_path) || !get_node(viewport_path) || !get_node(viewport_path)->cast_to<Viewport>()) { + if (!has_node(viewport_path) || !Object::cast_to<Viewport>(get_node(viewport_path))) { return TTR("Path property must point to a valid Viewport node to work. Such Viewport must be set to 'render target' mode."); } else { Node *n = get_node(viewport_path); if (n) { - Viewport *vp = n->cast_to<Viewport>(); + Viewport *vp = Object::cast_to<Viewport>(n); if (!vp->is_set_as_render_target()) { return TTR("The Viewport set in the path property must be set as 'render target' in order for this sprite to work."); |