Fix script being disowned
This commit is contained in:
parent
881b9118e4
commit
552185dc07
|
@ -85,7 +85,7 @@ void BTTask::initialize(Object *p_agent, Dictionary p_blackboard) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Ref<BTTask> BTTask::clone() const {
|
Ref<BTTask> BTTask::clone() const {
|
||||||
Ref<BTTask> inst = duplicate(true);
|
Ref<BTTask> inst = duplicate(false);
|
||||||
inst->parent = nullptr;
|
inst->parent = nullptr;
|
||||||
CRASH_COND(inst->get_parent().is_valid());
|
CRASH_COND(inst->get_parent().is_valid());
|
||||||
for (int i = 0; i < children.size(); i++) {
|
for (int i = 0; i < children.size(); i++) {
|
||||||
|
|
Loading…
Reference in New Issue