1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

Merge pull request #13436 from hoelzl/pr-vs-yield-signal-oneshot

Connect signal for VisualScript "Yield Signal" using oneshot mode
This commit is contained in:
Rémi Verschelde
2017-12-06 23:43:27 +01:00
committed by GitHub

View File

@@ -2289,7 +2289,7 @@ void VisualScriptFunctionState::connect_to_signal(Object *p_obj, const String &p
binds.push_back(p_binds[i]); binds.push_back(p_binds[i]);
} }
binds.push_back(Ref<VisualScriptFunctionState>(this)); //add myself on the back to avoid dying from unreferencing binds.push_back(Ref<VisualScriptFunctionState>(this)); //add myself on the back to avoid dying from unreferencing
p_obj->connect(p_signal, this, "_signal_callback", binds); p_obj->connect(p_signal, this, "_signal_callback", binds, CONNECT_ONESHOT);
} }
bool VisualScriptFunctionState::is_valid() const { bool VisualScriptFunctionState::is_valid() const {