mirror of
https://github.com/godotengine/godot.git
synced 2024-11-23 04:33:29 +00:00
Merge pull request #12097 from rcurtis/issue12065
Visualscript: Fixes untouched value is null instead of 0
This commit is contained in:
commit
bf88c3c8e8
@ -1280,6 +1280,11 @@ void VisualScriptBuiltinFunc::_bind_methods() {
|
||||
BIND_ENUM_CONSTANT(FUNC_MAX);
|
||||
}
|
||||
|
||||
VisualScriptBuiltinFunc::VisualScriptBuiltinFunc(VisualScriptBuiltinFunc::BuiltinFunc func) {
|
||||
|
||||
this->func = func;
|
||||
}
|
||||
|
||||
VisualScriptBuiltinFunc::VisualScriptBuiltinFunc() {
|
||||
|
||||
func = MATH_SIN;
|
||||
@ -1288,9 +1293,7 @@ VisualScriptBuiltinFunc::VisualScriptBuiltinFunc() {
|
||||
template <VisualScriptBuiltinFunc::BuiltinFunc func>
|
||||
static Ref<VisualScriptNode> create_builtin_func_node(const String &p_name) {
|
||||
|
||||
Ref<VisualScriptBuiltinFunc> node;
|
||||
node.instance();
|
||||
node->set_func(func);
|
||||
Ref<VisualScriptBuiltinFunc> node = memnew(VisualScriptBuiltinFunc(func));
|
||||
return node;
|
||||
}
|
||||
|
||||
|
@ -132,6 +132,7 @@ public:
|
||||
|
||||
virtual VisualScriptNodeInstance *instance(VisualScriptInstance *p_instance);
|
||||
|
||||
VisualScriptBuiltinFunc(VisualScriptBuiltinFunc::BuiltinFunc func);
|
||||
VisualScriptBuiltinFunc();
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user