You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-12 13:20:55 +00:00
Add "Game" editor for better runtime debugging
This commit is contained in:
@@ -184,6 +184,7 @@ void Node::_notification(int p_notification) {
|
||||
}
|
||||
} break;
|
||||
|
||||
case NOTIFICATION_SUSPENDED:
|
||||
case NOTIFICATION_PAUSED: {
|
||||
if (is_physics_interpolated_and_enabled() && is_inside_tree()) {
|
||||
reset_physics_interpolation();
|
||||
@@ -695,6 +696,16 @@ void Node::_propagate_pause_notification(bool p_enable) {
|
||||
data.blocked--;
|
||||
}
|
||||
|
||||
void Node::_propagate_suspend_notification(bool p_enable) {
|
||||
notification(p_enable ? NOTIFICATION_SUSPENDED : NOTIFICATION_UNSUSPENDED);
|
||||
|
||||
data.blocked++;
|
||||
for (KeyValue<StringName, Node *> &KV : data.children) {
|
||||
KV.value->_propagate_suspend_notification(p_enable);
|
||||
}
|
||||
data.blocked--;
|
||||
}
|
||||
|
||||
Node::ProcessMode Node::get_process_mode() const {
|
||||
return data.process_mode;
|
||||
}
|
||||
@@ -850,7 +861,7 @@ bool Node::can_process_notification(int p_what) const {
|
||||
|
||||
bool Node::can_process() const {
|
||||
ERR_FAIL_COND_V(!is_inside_tree(), false);
|
||||
return _can_process(get_tree()->is_paused());
|
||||
return !get_tree()->is_suspended() && _can_process(get_tree()->is_paused());
|
||||
}
|
||||
|
||||
bool Node::_can_process(bool p_paused) const {
|
||||
|
||||
Reference in New Issue
Block a user