summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/io/ip.cpp8
-rw-r--r--core/io/ip.h2
-rw-r--r--doc/classes/IP.xml2
-rw-r--r--editor/editor_resource_picker.cpp7
-rw-r--r--editor/plugins/mesh_library_editor_plugin.cpp2
-rw-r--r--modules/websocket/library_godot_websocket.js2
6 files changed, 15 insertions, 8 deletions
diff --git a/core/io/ip.cpp b/core/io/ip.cpp
index 8e0d47e762..2f88307d94 100644
--- a/core/io/ip.cpp
+++ b/core/io/ip.cpp
@@ -186,7 +186,7 @@ IP::ResolverID IP::resolve_hostname_queue_item(const String &p_hostname, IP::Typ
}
IP::ResolverStatus IP::get_resolve_item_status(ResolverID p_id) const {
- ERR_FAIL_INDEX_V(p_id, IP::RESOLVER_MAX_QUERIES, IP::RESOLVER_STATUS_NONE);
+ ERR_FAIL_INDEX_V_MSG(p_id, IP::RESOLVER_MAX_QUERIES, IP::RESOLVER_STATUS_NONE, vformat("Too many concurrent DNS resolver queries (%d, but should be %d at most). Try performing less network requests at once.", p_id, IP::RESOLVER_MAX_QUERIES));
IP::ResolverStatus res = resolver->queue[p_id].status.get();
if (res == IP::RESOLVER_STATUS_NONE) {
@@ -197,7 +197,7 @@ IP::ResolverStatus IP::get_resolve_item_status(ResolverID p_id) const {
}
IPAddress IP::get_resolve_item_address(ResolverID p_id) const {
- ERR_FAIL_INDEX_V(p_id, IP::RESOLVER_MAX_QUERIES, IPAddress());
+ ERR_FAIL_INDEX_V_MSG(p_id, IP::RESOLVER_MAX_QUERIES, IPAddress(), vformat("Too many concurrent DNS resolver queries (%d, but should be %d at most). Try performing less network requests at once.", p_id, IP::RESOLVER_MAX_QUERIES));
MutexLock lock(resolver->mutex);
@@ -217,7 +217,7 @@ IPAddress IP::get_resolve_item_address(ResolverID p_id) const {
}
Array IP::get_resolve_item_addresses(ResolverID p_id) const {
- ERR_FAIL_INDEX_V(p_id, IP::RESOLVER_MAX_QUERIES, Array());
+ ERR_FAIL_INDEX_V_MSG(p_id, IP::RESOLVER_MAX_QUERIES, Array(), vformat("Too many concurrent DNS resolver queries (%d, but should be %d at most). Try performing less network requests at once.", p_id, IP::RESOLVER_MAX_QUERIES));
MutexLock lock(resolver->mutex);
if (resolver->queue[p_id].status.get() != IP::RESOLVER_STATUS_DONE) {
@@ -237,7 +237,7 @@ Array IP::get_resolve_item_addresses(ResolverID p_id) const {
}
void IP::erase_resolve_item(ResolverID p_id) {
- ERR_FAIL_INDEX(p_id, IP::RESOLVER_MAX_QUERIES);
+ ERR_FAIL_INDEX_MSG(p_id, IP::RESOLVER_MAX_QUERIES, vformat("Too many concurrent DNS resolver queries (%d, but should be %d at most). Try performing less network requests at once.", p_id, IP::RESOLVER_MAX_QUERIES));
resolver->queue[p_id].status.set(IP::RESOLVER_STATUS_NONE);
}
diff --git a/core/io/ip.h b/core/io/ip.h
index 5602710550..ab00b7b0a6 100644
--- a/core/io/ip.h
+++ b/core/io/ip.h
@@ -56,7 +56,7 @@ public:
};
enum {
- RESOLVER_MAX_QUERIES = 32,
+ RESOLVER_MAX_QUERIES = 256,
RESOLVER_INVALID_ID = -1
};
diff --git a/doc/classes/IP.xml b/doc/classes/IP.xml
index 7ecac8680a..569f7fe570 100644
--- a/doc/classes/IP.xml
+++ b/doc/classes/IP.xml
@@ -103,7 +103,7 @@
<constant name="RESOLVER_STATUS_ERROR" value="3" enum="ResolverStatus">
DNS hostname resolver status: Error.
</constant>
- <constant name="RESOLVER_MAX_QUERIES" value="32">
+ <constant name="RESOLVER_MAX_QUERIES" value="256">
Maximum number of concurrent DNS resolver queries allowed, [constant RESOLVER_INVALID_ID] is returned if exceeded.
</constant>
<constant name="RESOLVER_INVALID_ID" value="-1">
diff --git a/editor/editor_resource_picker.cpp b/editor/editor_resource_picker.cpp
index a7b2a4cfa6..53f1a689d6 100644
--- a/editor/editor_resource_picker.cpp
+++ b/editor/editor_resource_picker.cpp
@@ -327,6 +327,13 @@ void EditorResourcePicker::_edit_menu_cbk(int p_which) {
case OBJ_MENU_PASTE: {
edited_resource = EditorSettings::get_singleton()->get_resource_clipboard();
+ if (edited_resource->is_built_in() && EditorNode::get_singleton()->get_edited_scene() &&
+ edited_resource->get_path().get_slice("::", 0) != EditorNode::get_singleton()->get_edited_scene()->get_scene_file_path()) {
+ // Automatically make resource unique if it belongs to another scene.
+ _edit_menu_cbk(OBJ_MENU_MAKE_UNIQUE);
+ return;
+ }
+
emit_signal(SNAME("resource_changed"), edited_resource);
_update_resource();
} break;
diff --git a/editor/plugins/mesh_library_editor_plugin.cpp b/editor/plugins/mesh_library_editor_plugin.cpp
index 41e3471a78..423ec5f4ed 100644
--- a/editor/plugins/mesh_library_editor_plugin.cpp
+++ b/editor/plugins/mesh_library_editor_plugin.cpp
@@ -271,7 +271,7 @@ MeshLibraryEditor::MeshLibraryEditor() {
menu = memnew(MenuButton);
Node3DEditor::get_singleton()->add_control_to_menu_panel(menu);
menu->set_position(Point2(1, 1));
- menu->set_text(TTR("Mesh Library"));
+ menu->set_text(TTR("MeshLibrary"));
menu->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("MeshLibrary"), SNAME("EditorIcons")));
menu->get_popup()->add_item(TTR("Add Item"), MENU_OPTION_ADD_ITEM);
menu->get_popup()->add_item(TTR("Remove Selected Item"), MENU_OPTION_REMOVE_ITEM);
diff --git a/modules/websocket/library_godot_websocket.js b/modules/websocket/library_godot_websocket.js
index c88986fbe3..57f1f10b02 100644
--- a/modules/websocket/library_godot_websocket.js
+++ b/modules/websocket/library_godot_websocket.js
@@ -135,7 +135,7 @@ const GodotWebSocket = {
if (!ref) {
return;
}
- GodotWebSocket.close(p_id, 1001, '');
+ GodotWebSocket.close(p_id, 3001, 'destroyed');
IDHandler.remove(p_id);
ref.onopen = null;
ref.onmessage = null;