diff --git a/util/CallableNode.gd b/util/CallableNode.gd index fc3a16c..6620031 100644 --- a/util/CallableNode.gd +++ b/util/CallableNode.gd @@ -15,9 +15,11 @@ var result: Variant = null ## 2. the CallableNode is passed the given args and opts; ## 3. the CallableNode is requested to call _ready, ## and then added as a child to the parent; -## 4. if the CallableNode's process_mode is PROCESS_MODE_INHERIT, -## the inherited process mode of the CallableNode is resolved, -## and its process_mode is set directly to that; +## 4. if the CallableNode's process_mode is PROCESS_MODE_INHERIT +## or PROCESS_MODE_DISABLED, the most descended process_mode +## in its ancestry not to equal either of those values +## is applied directly to the CallableNode instead +## (falling back to PROCESS_MODE_PAUSABLE if none is found); ## 5. the parent's process mode is set to PROCESS_MODE_DISABLED; ## 6. the function yields until the CallableNode is exiting the tree; ## 7. steps 2-5 are undone; @@ -42,9 +44,9 @@ func invoke_existing( parent.add_child(self) # step 4 var process_mode_resolve := self - while ( - process_mode_resolve and - process_mode_resolve.process_mode == Node.PROCESS_MODE_INHERIT + while process_mode_resolve and ( + process_mode_resolve.process_mode == Node.PROCESS_MODE_INHERIT or + process_mode_resolve.process_mode == Node.PROCESS_MODE_DISABLED ): process_mode_resolve = process_mode_resolve.get_parent() if process_mode_resolve: