From 607e5b7c95d410ee10d0fa5da5b715428a6c1d07 Mon Sep 17 00:00:00 2001 From: "K. S. Ernest (iFire) Lee" Date: Wed, 25 Jul 2018 13:21:27 -0700 Subject: [PATCH] Visualscript: Don't type guess on nil. --- modules/visual_script/visual_script_editor.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp index ecf220a623c..23aa5ab13f5 100644 --- a/modules/visual_script/visual_script_editor.cpp +++ b/modules/visual_script/visual_script_editor.cpp @@ -2728,7 +2728,7 @@ void VisualScriptEditor::_selected_connect_node(const String &p_text, const Stri VisualScriptNode::TypeGuess tg = _guess_output_type(port_action_node, port_action_output, vn); if (tg.type == Variant::OBJECT) { vsfc->set_call_mode(VisualScriptFunctionCall::CALL_MODE_INSTANCE); - + vsfc->set_base_type(String("")); if (tg.gdclass != StringName()) { vsfc->set_base_type(tg.gdclass); @@ -2740,7 +2740,7 @@ void VisualScriptEditor::_selected_connect_node(const String &p_text, const Stri vsfc->set_base_type(base_type); } if (p_text == "call" || p_text == "call_deferred") { - vsfc->set_function(""); + vsfc->set_function(String("")); } } if (tg.script.is_valid()) { @@ -2748,7 +2748,7 @@ void VisualScriptEditor::_selected_connect_node(const String &p_text, const Stri } } else if (tg.type == Variant::NIL) { vsfc->set_call_mode(VisualScriptFunctionCall::CALL_MODE_INSTANCE); - vsfc->set_base_type(script->get_instance_base_type()); + vsfc->set_base_type(String("")); } else { vsfc->set_call_mode(VisualScriptFunctionCall::CALL_MODE_BASIC_TYPE); vsfc->set_basic_type(tg.type); @@ -2762,7 +2762,7 @@ void VisualScriptEditor::_selected_connect_node(const String &p_text, const Stri VisualScriptNode::TypeGuess tg = _guess_output_type(port_action_node, port_action_output, vn); if (tg.type == Variant::OBJECT) { vsp->set_call_mode(VisualScriptPropertySet::CALL_MODE_INSTANCE); - + vsp->set_base_type(String("")); if (tg.gdclass != StringName()) { vsp->set_base_type(tg.gdclass); @@ -2779,7 +2779,7 @@ void VisualScriptEditor::_selected_connect_node(const String &p_text, const Stri } } else if (tg.type == Variant::NIL) { vsp->set_call_mode(VisualScriptPropertySet::CALL_MODE_INSTANCE); - vsp->set_base_type(script->get_instance_base_type()); + vsp->set_base_type(String("")); } else { vsp->set_call_mode(VisualScriptPropertySet::CALL_MODE_BASIC_TYPE); vsp->set_basic_type(tg.type); @@ -2792,7 +2792,7 @@ void VisualScriptEditor::_selected_connect_node(const String &p_text, const Stri VisualScriptNode::TypeGuess tg = _guess_output_type(port_action_node, port_action_output, vn); if (tg.type == Variant::OBJECT) { vsp->set_call_mode(VisualScriptPropertyGet::CALL_MODE_INSTANCE); - + vsp->set_base_type(String("")); if (tg.gdclass != StringName()) { vsp->set_base_type(tg.gdclass); @@ -2809,7 +2809,7 @@ void VisualScriptEditor::_selected_connect_node(const String &p_text, const Stri } } else if (tg.type == Variant::NIL) { vsp->set_call_mode(VisualScriptPropertyGet::CALL_MODE_INSTANCE); - vsp->set_base_type(script->get_instance_base_type()); + vsp->set_base_type(String("")); } else { vsp->set_call_mode(VisualScriptPropertyGet::CALL_MODE_BASIC_TYPE); vsp->set_basic_type(tg.type);