Skip to content

Commit

Permalink
Call both native and script's _setup() in BTTask
Browse files Browse the repository at this point in the history
Current behavior is overriding, which is not correct as it's an initializer function.
  • Loading branch information
limbonaut committed Nov 1, 2024
1 parent 106608a commit 632e26c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions bt/tasks/bt_task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

if (!GDVIRTUAL_CALL(_setup)) {
_setup();
}
_setup();
GDVIRTUAL_CALL(_setup);
}

Ref<BTTask> BTTask::clone() const {
Expand Down

0 comments on commit 632e26c

Please sign in to comment.