Compare commits
No commits in common. "60a767032e2278c590c94e84a3c29847da6f6af6" and "134bb3214a4ef25aff18e73dee7ff7eefc0141f0" have entirely different histories.
60a767032e
...
134bb3214a
|
@ -263,21 +263,6 @@ void LimboHSM::_validate_property(PropertyInfo &p_property) const {
|
|||
void LimboHSM::_notification(int p_what) {
|
||||
switch (p_what) {
|
||||
case NOTIFICATION_POST_ENTER_TREE: {
|
||||
if (was_active && is_root()) {
|
||||
// Re-activate the root HSM if it was previously active.
|
||||
// Typically, this happens when the node is re-entered scene repeatedly (e.g., re-parenting, pooling).
|
||||
set_active(true);
|
||||
}
|
||||
} break;
|
||||
case NOTIFICATION_EXIT_TREE: {
|
||||
if (is_root()) {
|
||||
// Remember active status for re-parenting and exit state machine
|
||||
// to release resources and signal connections if active.
|
||||
was_active = active;
|
||||
if (is_active()) {
|
||||
_exit();
|
||||
}
|
||||
}
|
||||
} break;
|
||||
case NOTIFICATION_PROCESS: {
|
||||
_update(get_process_delta_time());
|
||||
|
|
|
@ -55,7 +55,6 @@ private:
|
|||
LimboState *previous_active;
|
||||
LimboState *next_active;
|
||||
bool updating = false;
|
||||
bool was_active = false;
|
||||
|
||||
HashMap<TransitionKey, Transition, TransitionKeyHasher> transitions;
|
||||
|
||||
|
|
|
@ -190,6 +190,11 @@ void LimboState::_notification(int p_what) {
|
|||
_update_blackboard_plan();
|
||||
}
|
||||
} break;
|
||||
case NOTIFICATION_PREDELETE: {
|
||||
if (is_active()) {
|
||||
_exit();
|
||||
}
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue