summaryrefslogtreecommitdiff
path: root/modules/visual_script
diff options
context:
space:
mode:
authorMatthias Hoelzl <tc@xantira.com>2017-12-01 04:35:44 +0100
committerMatthias Hoelzl <tc@xantira.com>2017-12-01 04:44:47 +0100
commitc825a58fe06573d545796375c58a49d05aa66599 (patch)
treef50293d0533b7a0c00cd0098b9526e850f7e18f5 /modules/visual_script
parentd2e05b6e9bca9fcc9b7acaa74b4dbc7602982bbc (diff)
Connect signal for VisualScript "Yield Signal" using oneshot mode
Since the first call to a VisualScriptFunctionState invalidates the state, any further call results in errors.
Diffstat (limited to 'modules/visual_script')
-rw-r--r--modules/visual_script/visual_script.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp
index 26f2d687d8..bb6c32e9e0 100644
--- a/modules/visual_script/visual_script.cpp
+++ b/modules/visual_script/visual_script.cpp
@@ -2289,7 +2289,7 @@ void VisualScriptFunctionState::connect_to_signal(Object *p_obj, const String &p
binds.push_back(p_binds[i]);
}
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 {