Merge pull request #26608 from dragmz/fix22231

Calculate inputs count from arg types instead of names
This commit is contained in:
Rémi Verschelde 2019-03-04 21:52:47 +01:00 committed by GitHub
commit 8366811352
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -129,9 +129,8 @@ StringName VisualScriptFunctionCall::_get_base_type() const {
int VisualScriptFunctionCall::get_input_value_port_count() const { int VisualScriptFunctionCall::get_input_value_port_count() const {
if (call_mode == CALL_MODE_BASIC_TYPE) { if (call_mode == CALL_MODE_BASIC_TYPE) {
Vector<Variant::Type> types = Variant::get_method_argument_types(basic_type, function);
Vector<StringName> names = Variant::get_method_argument_names(basic_type, function); return types.size() + (rpc_call_mode >= RPC_RELIABLE_TO_ID ? 1 : 0) + 1;
return names.size() + (rpc_call_mode >= RPC_RELIABLE_TO_ID ? 1 : 0) + 1;
} else { } else {