Compare commits

...

2 Commits

Author SHA1 Message Date
Serhii Snitsaruk d08273e875
Merge 2e0047bb59 into eaa43020f5 2024-10-13 21:36:29 -03:00
Serhii Snitsaruk 2e0047bb59
Call both native and script's `_setup()` in BTTask
Current behavior is overriding, which is not correct as it's an initializer function.
2024-09-22 14:49:46 +02:00
1 changed files with 2 additions and 3 deletions

View File

@ -172,9 +172,8 @@ void BTTask::initialize(Node *p_agent, const Ref<Blackboard> &p_blackboard, Node
get_child(i)->initialize(p_agent, p_blackboard, p_scene_root); get_child(i)->initialize(p_agent, p_blackboard, p_scene_root);
} }
if (!GDVIRTUAL_CALL(_setup)) { _setup();
_setup(); GDVIRTUAL_CALL(_setup);
}
} }
Ref<BTTask> BTTask::clone() const { Ref<BTTask> BTTask::clone() const {