You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-12 13:20:55 +00:00
Fix #6583, Condition + Wait nodes freezing the game
Make sure that only the first node after VS resume gets resumed
This commit is contained in:
@@ -1578,12 +1578,15 @@ Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p
|
|||||||
|
|
||||||
VisualScriptNodeInstance::StartMode start_mode;
|
VisualScriptNodeInstance::StartMode start_mode;
|
||||||
{
|
{
|
||||||
if (p_resuming_yield)
|
if (p_resuming_yield) {
|
||||||
start_mode = VisualScriptNodeInstance::START_MODE_RESUME_YIELD;
|
start_mode = VisualScriptNodeInstance::START_MODE_RESUME_YIELD;
|
||||||
else if (!flow_stack || !(flow_stack[flow_stack_pos] & VisualScriptNodeInstance::FLOW_STACK_PUSHED_BIT)) //if there is a push bit, it means we are continuing a sequence
|
p_resuming_yield = false; // should resume only the first time
|
||||||
start_mode = VisualScriptNodeInstance::START_MODE_BEGIN_SEQUENCE;
|
} else if (flow_stack && (flow_stack[flow_stack_pos] & VisualScriptNodeInstance::FLOW_STACK_PUSHED_BIT)) {
|
||||||
else
|
//if there is a push bit, it means we are continuing a sequence
|
||||||
start_mode = VisualScriptNodeInstance::START_MODE_CONTINUE_SEQUENCE;
|
start_mode = VisualScriptNodeInstance::START_MODE_CONTINUE_SEQUENCE;
|
||||||
|
} else {
|
||||||
|
start_mode = VisualScriptNodeInstance::START_MODE_BEGIN_SEQUENCE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
VSDEBUG("STEP - STARTSEQ: " + itos(start_mode));
|
VSDEBUG("STEP - STARTSEQ: " + itos(start_mode));
|
||||||
|
|||||||
Reference in New Issue
Block a user