1
0
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:
Michael Alexsander
2024-09-18 18:07:18 -03:00
parent 8004c7524f
commit 16524a8a01
45 changed files with 2378 additions and 274 deletions

View File

@@ -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 {