diff options
Diffstat (limited to 'scene/multiplayer/multiplayer_synchronizer.cpp')
-rw-r--r-- | scene/multiplayer/multiplayer_synchronizer.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/scene/multiplayer/multiplayer_synchronizer.cpp b/scene/multiplayer/multiplayer_synchronizer.cpp index fbe1b99cc9..33e845a7a3 100644 --- a/scene/multiplayer/multiplayer_synchronizer.cpp +++ b/scene/multiplayer/multiplayer_synchronizer.cpp @@ -108,10 +108,15 @@ void MultiplayerSynchronizer::_notification(int p_what) { if (root_path.is_empty()) { return; } - if (p_what == NOTIFICATION_ENTER_TREE) { - _start(); - } else if (p_what == NOTIFICATION_EXIT_TREE) { - _stop(); + + switch (p_what) { + case NOTIFICATION_ENTER_TREE: { + _start(); + } break; + + case NOTIFICATION_EXIT_TREE: { + _stop(); + } break; } } |