VS: Fix return value for user-defined functions

This commit is contained in:
George Marques 2017-07-22 01:15:55 -03:00
parent 4fe6b2a674
commit effceee6ea
No known key found for this signature in database
GPG Key ID: 046BD46A3201E43D

View File

@ -29,9 +29,9 @@
/*************************************************************************/ /*************************************************************************/
#include "visual_script_flow_control.h" #include "visual_script_flow_control.h"
#include "project_settings.h"
#include "io/resource_loader.h" #include "io/resource_loader.h"
#include "os/keyboard.h" #include "os/keyboard.h"
#include "project_settings.h"
////////////////////////////////////////// //////////////////////////////////////////
////////////////RETURN//////////////////// ////////////////RETURN////////////////////
@ -138,12 +138,12 @@ public:
if (with_value) { if (with_value) {
*p_working_mem = *p_inputs[0]; *p_working_mem = *p_inputs[0];
return STEP_EXIT_FUNCTION_BIT;
} else { } else {
*p_working_mem = Variant(); *p_working_mem = Variant();
}
return 0; return 0;
} }
}
}; };
VisualScriptNodeInstance *VisualScriptReturn::instance(VisualScriptInstance *p_instance) { VisualScriptNodeInstance *VisualScriptReturn::instance(VisualScriptInstance *p_instance) {