diff options
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/enet/networked_multiplayer_enet.cpp | 5 | ||||
| -rw-r--r-- | modules/gridmap/grid_map_editor_plugin.cpp | 10 |
2 files changed, 14 insertions, 1 deletions
diff --git a/modules/enet/networked_multiplayer_enet.cpp b/modules/enet/networked_multiplayer_enet.cpp index 9491373013..94260e8c13 100644 --- a/modules/enet/networked_multiplayer_enet.cpp +++ b/modules/enet/networked_multiplayer_enet.cpp @@ -362,7 +362,10 @@ void NetworkedMultiplayerENet::poll() { // To myself and only myself incoming_packets.push_back(packet); } else if (!server_relay) { - // No other destination is allowed when server is not relaying + // When relaying is disabled, other destinations will only be processed by the server. + if (target == 0 || target < -1) { + incoming_packets.push_back(packet); + } continue; } else if (target == 0) { // Re-send to everyone but sender :| diff --git a/modules/gridmap/grid_map_editor_plugin.cpp b/modules/gridmap/grid_map_editor_plugin.cpp index 7e17ac2f05..80551de1ba 100644 --- a/modules/gridmap/grid_map_editor_plugin.cpp +++ b/modules/gridmap/grid_map_editor_plugin.cpp @@ -1080,6 +1080,16 @@ void GridMapEditor::_notification(int p_what) { options->set_icon(get_theme_icon("GridMap", "EditorIcons")); search_box->set_right_icon(get_theme_icon("Search", "EditorIcons")); } break; + + case NOTIFICATION_APPLICATION_FOCUS_OUT: { + if (input_action == INPUT_PAINT) { + // Simulate mouse released event to stop drawing when editor focus exists. + Ref<InputEventMouseButton> release; + release.instance(); + release->set_button_index(MOUSE_BUTTON_LEFT); + forward_spatial_input_event(nullptr, release); + } + } break; } } |