浏览代码

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

Connect signal for VisualScript "Yield Signal" using oneshot mode
Rémi Verschelde 7 年之前
父节点
当前提交
c2031fc813
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      modules/visual_script/visual_script.cpp

+ 1 - 1
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 {