fix: client node calls enter_tree on ENTER_TREE

This commit is contained in:
Sara Gerretsen 2025-11-05 13:34:20 +01:00
parent d7ad83abf1
commit 738b3c85e9

View file

@ -24,9 +24,8 @@ void ClientNode::enter_tree() {
if (singleton_instance) {
print_error("Attempt to create duplicate ClientNode, aborting");
abort();
} else {
singleton_instance = this;
}
singleton_instance = this;
}
void ClientNode::process() {
@ -71,6 +70,7 @@ void ClientNode::_notification(int what) {
return;
case NOTIFICATION_ENTER_TREE:
set_process(true);
enter_tree();
return;
case NOTIFICATION_PROCESS:
process();