summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/SCsub31
-rw-r--r--modules/assimp/editor_scene_importer_assimp.cpp14
-rw-r--r--modules/bullet/area_bullet.cpp6
-rw-r--r--modules/bullet/bullet_physics_server.cpp8
-rw-r--r--modules/bullet/doc_classes/BulletPhysicsDirectBodyState.xml2
-rw-r--r--modules/bullet/doc_classes/BulletPhysicsServer.xml2
-rw-r--r--modules/bullet/rigid_body_bullet.cpp8
-rw-r--r--modules/bullet/soft_body_bullet.cpp1
-rw-r--r--modules/bullet/space_bullet.cpp18
-rw-r--r--modules/csg/doc_classes/CSGBox.xml2
-rw-r--r--modules/csg/doc_classes/CSGCombiner.xml2
-rw-r--r--modules/csg/doc_classes/CSGCylinder.xml2
-rw-r--r--modules/csg/doc_classes/CSGMesh.xml2
-rw-r--r--modules/csg/doc_classes/CSGPolygon.xml2
-rw-r--r--modules/csg/doc_classes/CSGPrimitive.xml2
-rw-r--r--modules/csg/doc_classes/CSGShape.xml2
-rw-r--r--modules/csg/doc_classes/CSGSphere.xml2
-rw-r--r--modules/csg/doc_classes/CSGTorus.xml2
-rw-r--r--modules/enet/doc_classes/NetworkedMultiplayerENet.xml2
-rw-r--r--modules/freetype/SCsub2
-rw-r--r--modules/gdnative/SCsub20
-rw-r--r--modules/gdnative/doc_classes/@NativeScript.xml2
-rw-r--r--modules/gdnative/doc_classes/ARVRInterfaceGDNative.xml2
-rw-r--r--modules/gdnative/doc_classes/GDNative.xml2
-rw-r--r--modules/gdnative/doc_classes/GDNativeLibrary.xml2
-rw-r--r--modules/gdnative/doc_classes/MultiplayerPeerGDNative.xml2
-rw-r--r--modules/gdnative/doc_classes/NativeScript.xml2
-rw-r--r--modules/gdnative/doc_classes/PacketPeerGDNative.xml2
-rw-r--r--modules/gdnative/doc_classes/PluginScript.xml2
-rw-r--r--modules/gdnative/doc_classes/StreamPeerGDNative.xml2
-rw-r--r--modules/gdnative/doc_classes/VideoStreamGDNative.xml7
-rw-r--r--modules/gdnative/doc_classes/WebRTCDataChannelGDNative.xml2
-rw-r--r--modules/gdnative/doc_classes/WebRTCPeerConnectionGDNative.xml2
-rw-r--r--modules/gdnative/gdnative.cpp2
-rw-r--r--modules/gdnative/gdnative_builders.py97
-rw-r--r--modules/gdnative/include/pluginscript/godot_pluginscript.h3
-rw-r--r--modules/gdnative/nativescript/nativescript.cpp2
-rw-r--r--modules/gdnative/register_types.cpp2
-rw-r--r--modules/gdscript/doc_classes/@GDScript.xml7
-rw-r--r--modules/gdscript/doc_classes/GDScript.xml2
-rw-r--r--modules/gdscript/doc_classes/GDScriptFunctionState.xml4
-rw-r--r--modules/gdscript/doc_classes/GDScriptNativeClass.xml2
-rw-r--r--modules/gdscript/gdscript_functions.cpp6
-rw-r--r--modules/gdscript/language_server/gdscript_extend_parser.cpp2
-rw-r--r--modules/gridmap/doc_classes/GridMap.xml2
-rw-r--r--modules/hdr/image_loader_hdr.cpp2
-rw-r--r--modules/mbedtls/crypto_mbedtls.cpp4
-rwxr-xr-xmodules/mbedtls/stream_peer_mbedtls.cpp2
-rw-r--r--modules/mobile_vr/doc_classes/MobileVRInterface.xml2
-rw-r--r--modules/modules_builders.py16
-rw-r--r--modules/mono/csharp_script.cpp30
-rw-r--r--modules/mono/editor/bindings_generator.cpp42
-rw-r--r--modules/mono/editor/script_class_parser.cpp19
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs28
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/NodeExtensions.cs2
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs4
-rw-r--r--modules/mono/glue/gd_glue.cpp6
-rw-r--r--modules/mono/mono_gd/gd_mono.cpp10
-rw-r--r--modules/mono/mono_gd/gd_mono_android.cpp2
-rw-r--r--modules/mono/mono_gd/gd_mono_class.cpp8
-rw-r--r--modules/mono/mono_gd/gd_mono_field.cpp2
-rw-r--r--modules/mono/mono_gd/gd_mono_log.cpp6
-rw-r--r--modules/mono/mono_gd/gd_mono_marshal.cpp2
-rw-r--r--modules/mono/mono_gd/gd_mono_utils.cpp4
-rw-r--r--modules/opensimplex/doc_classes/NoiseTexture.xml9
-rw-r--r--modules/opensimplex/doc_classes/OpenSimplexNoise.xml5
-rw-r--r--modules/opensimplex/open_simplex_noise.cpp9
-rw-r--r--modules/opensimplex/open_simplex_noise.h7
-rw-r--r--modules/recast/navigation_mesh_generator.cpp3
-rw-r--r--modules/regex/doc_classes/RegEx.xml2
-rw-r--r--modules/regex/doc_classes/RegExMatch.xml2
-rw-r--r--modules/register_module_types.h4
-rw-r--r--modules/stb_vorbis/audio_stream_ogg_vorbis.cpp2
-rw-r--r--modules/stb_vorbis/audio_stream_ogg_vorbis.h2
-rw-r--r--modules/stb_vorbis/doc_classes/AudioStreamOGGVorbis.xml2
-rw-r--r--modules/svg/SCsub4
-rw-r--r--modules/svg/image_loader_svg.cpp18
-rw-r--r--modules/svg/image_loader_svg.h7
-rw-r--r--modules/theora/doc_classes/VideoStreamTheora.xml6
-rw-r--r--modules/theora/video_stream_theora.cpp7
-rw-r--r--modules/tinyexr/image_loader_tinyexr.cpp4
-rw-r--r--modules/upnp/doc_classes/UPNP.xml2
-rw-r--r--modules/upnp/doc_classes/UPNPDevice.xml2
-rw-r--r--modules/visual_script/doc_classes/@VisualScript.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScript.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptClassConstant.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptComment.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptComposeArray.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptCondition.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptConstant.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptConstructor.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptCustomNode.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptDeconstruct.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptEditor.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptEmitSignal.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptEngineSingleton.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptExpression.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptFunction.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptFunctionCall.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptFunctionState.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptGlobalConstant.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptIndexGet.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptIndexSet.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptInputAction.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptIterator.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptLists.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptLocalVar.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptLocalVarSet.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptMathConstant.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptNode.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptOperator.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptPreload.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptPropertyGet.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptPropertySet.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptResourcePath.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptReturn.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptSceneNode.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptSceneTree.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptSelect.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptSelf.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptSequence.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptSubCall.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptSwitch.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptTypeCast.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptVariableGet.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptVariableSet.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptWhile.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptYield.xml2
-rw-r--r--modules/visual_script/doc_classes/VisualScriptYieldSignal.xml2
-rw-r--r--modules/visual_script/visual_script_nodes.cpp28
-rw-r--r--modules/webm/doc_classes/VideoStreamWebm.xml6
-rw-r--r--modules/webm/video_stream_webm.cpp42
-rw-r--r--modules/webrtc/doc_classes/WebRTCDataChannel.xml2
-rw-r--r--modules/webrtc/doc_classes/WebRTCMultiplayer.xml2
-rw-r--r--modules/webrtc/doc_classes/WebRTCPeerConnection.xml2
-rw-r--r--modules/websocket/doc_classes/WebSocketClient.xml2
-rw-r--r--modules/websocket/doc_classes/WebSocketMultiplayerPeer.xml2
-rw-r--r--modules/websocket/doc_classes/WebSocketPeer.xml12
-rw-r--r--modules/websocket/doc_classes/WebSocketServer.xml2
-rw-r--r--modules/websocket/emws_peer.cpp5
-rw-r--r--modules/websocket/emws_peer.h1
-rw-r--r--modules/websocket/websocket_peer.cpp1
-rw-r--r--modules/websocket/websocket_peer.h1
-rw-r--r--modules/websocket/websocket_server.cpp2
-rw-r--r--modules/websocket/wsl_client.cpp1
-rw-r--r--modules/websocket/wsl_peer.cpp10
-rw-r--r--modules/websocket/wsl_peer.h1
-rw-r--r--modules/websocket/wsl_server.cpp5
150 files changed, 395 insertions, 408 deletions
diff --git a/modules/SCsub b/modules/SCsub
index dc0420616c..5b39b18334 100644
--- a/modules/SCsub
+++ b/modules/SCsub
@@ -2,23 +2,32 @@
Import('env')
+import modules_builders
+
env_modules = env.Clone()
Export('env_modules')
-env.modules_sources = []
+# Header with MODULE_*_ENABLED defines.
+env.CommandNoCache("modules_enabled.gen.h", Value(env.module_list), modules_builders.generate_modules_enabled)
-env_modules.add_source_files(env.modules_sources, "register_module_types.gen.cpp")
+# libmodule_<name>.a for each active module.
+for module in env.module_list:
+ env.modules_sources = []
+ SConscript(module + "/SCsub")
-for x in env.module_list:
- if (x in env.disabled_modules):
+ # Some modules are not linked automatically but can be enabled optionally
+ # on iOS, so we handle those specially.
+ if env["platform"] == "iphone" and module in ["arkit", "camera"]:
continue
- env_modules.Append(CPPDEFINES=["MODULE_" + x.upper() + "_ENABLED"])
- SConscript(x + "/SCsub")
-
-if env['split_libmodules']:
- env.split_lib("modules", env_lib = env_modules)
-else:
- lib = env_modules.add_library("modules", env.modules_sources)
+ lib = env_modules.add_library("module_%s" % module, env.modules_sources)
env.Prepend(LIBS=[lib])
+
+# libmodules.a with only register_module_types.
+# Must be last so that all libmodule_<name>.a libraries are on the right side
+# in the linker command.
+env.modules_sources = []
+env_modules.add_source_files(env.modules_sources, "register_module_types.gen.cpp")
+lib = env_modules.add_library("modules", env.modules_sources)
+env.Prepend(LIBS=[lib])
diff --git a/modules/assimp/editor_scene_importer_assimp.cpp b/modules/assimp/editor_scene_importer_assimp.cpp
index 726f4c1ed0..69ab068648 100644
--- a/modules/assimp/editor_scene_importer_assimp.cpp
+++ b/modules/assimp/editor_scene_importer_assimp.cpp
@@ -188,22 +188,22 @@ template <>
struct EditorSceneImporterAssetImportInterpolate<Quat> {
Quat lerp(const Quat &a, const Quat &b, float c) const {
- ERR_FAIL_COND_V(!a.is_normalized(), Quat());
- ERR_FAIL_COND_V(!b.is_normalized(), Quat());
+ ERR_FAIL_COND_V_MSG(!a.is_normalized(), Quat(), "The quaternion \"a\" must be normalized.");
+ ERR_FAIL_COND_V_MSG(!b.is_normalized(), Quat(), "The quaternion \"b\" must be normalized.");
return a.slerp(b, c).normalized();
}
Quat catmull_rom(const Quat &p0, const Quat &p1, const Quat &p2, const Quat &p3, float c) {
- ERR_FAIL_COND_V(!p1.is_normalized(), Quat());
- ERR_FAIL_COND_V(!p2.is_normalized(), Quat());
+ ERR_FAIL_COND_V_MSG(!p1.is_normalized(), Quat(), "The quaternion \"p1\" must be normalized.");
+ ERR_FAIL_COND_V_MSG(!p2.is_normalized(), Quat(), "The quaternion \"p2\" must be normalized.");
return p1.slerp(p2, c).normalized();
}
Quat bezier(Quat start, Quat control_1, Quat control_2, Quat end, float t) {
- ERR_FAIL_COND_V(!start.is_normalized(), Quat());
- ERR_FAIL_COND_V(!end.is_normalized(), Quat());
+ ERR_FAIL_COND_V_MSG(!start.is_normalized(), Quat(), "The start quaternion must be normalized.");
+ ERR_FAIL_COND_V_MSG(!end.is_normalized(), Quat(), "The end quaternion must be normalized.");
return start.slerp(end, t).normalized();
}
@@ -389,7 +389,7 @@ EditorSceneImporterAssimp::_generate_scene(const String &p_path, aiScene *scene,
Spatial *parent_node = parent_lookup->value();
ERR_FAIL_COND_V_MSG(parent_node == NULL, state.root,
- "Parent node invalid even though lookup successful, out of ram?")
+ "Parent node invalid even though lookup successful, out of ram?");
if (spatial != state.root) {
parent_node->add_child(spatial);
diff --git a/modules/bullet/area_bullet.cpp b/modules/bullet/area_bullet.cpp
index 79ada54f0f..8d03a99556 100644
--- a/modules/bullet/area_bullet.cpp
+++ b/modules/bullet/area_bullet.cpp
@@ -167,7 +167,7 @@ bool AreaBullet::is_monitoring() const {
}
void AreaBullet::main_shape_changed() {
- CRASH_COND(!get_main_shape())
+ CRASH_COND(!get_main_shape());
btGhost->setCollisionShape(get_main_shape());
}
@@ -245,7 +245,7 @@ void AreaBullet::set_param(PhysicsServer::AreaParameter p_param, const Variant &
set_spOv_gravityPointAttenuation(p_value);
break;
default:
- WARN_PRINTS("Area doesn't support this parameter in the Bullet backend: " + itos(p_param));
+ WARN_PRINT("Area doesn't support this parameter in the Bullet backend: " + itos(p_param));
}
}
@@ -268,7 +268,7 @@ Variant AreaBullet::get_param(PhysicsServer::AreaParameter p_param) const {
case PhysicsServer::AREA_PARAM_GRAVITY_POINT_ATTENUATION:
return spOv_gravityPointAttenuation;
default:
- WARN_PRINTS("Area doesn't support this parameter in the Bullet backend: " + itos(p_param));
+ WARN_PRINT("Area doesn't support this parameter in the Bullet backend: " + itos(p_param));
return Variant();
}
}
diff --git a/modules/bullet/bullet_physics_server.cpp b/modules/bullet/bullet_physics_server.cpp
index 6662e130c8..e507987297 100644
--- a/modules/bullet/bullet_physics_server.cpp
+++ b/modules/bullet/bullet_physics_server.cpp
@@ -57,10 +57,10 @@
// <--------------- Joint creation asserts
/// Assert the body is assigned to a space
-#define JointAssertSpace(body, bIndex, ret) \
- if (!body->get_space()) { \
- ERR_PRINTS("Before create a joint the Body" + String(bIndex) + " must be added to a space!"); \
- return ret; \
+#define JointAssertSpace(body, bIndex, ret) \
+ if (!body->get_space()) { \
+ ERR_PRINT("Before create a joint the Body" + String(bIndex) + " must be added to a space!"); \
+ return ret; \
}
/// Assert the two bodies of joint are in the same space
diff --git a/modules/bullet/doc_classes/BulletPhysicsDirectBodyState.xml b/modules/bullet/doc_classes/BulletPhysicsDirectBodyState.xml
index 078bcc45a8..5ea1b810a1 100644
--- a/modules/bullet/doc_classes/BulletPhysicsDirectBodyState.xml
+++ b/modules/bullet/doc_classes/BulletPhysicsDirectBodyState.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BulletPhysicsDirectBodyState" inherits="PhysicsDirectBodyState" category="Core" version="3.2">
+<class name="BulletPhysicsDirectBodyState" inherits="PhysicsDirectBodyState" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/modules/bullet/doc_classes/BulletPhysicsServer.xml b/modules/bullet/doc_classes/BulletPhysicsServer.xml
index 2a37f6af5e..af8fb3c02c 100644
--- a/modules/bullet/doc_classes/BulletPhysicsServer.xml
+++ b/modules/bullet/doc_classes/BulletPhysicsServer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="BulletPhysicsServer" inherits="PhysicsServer" category="Core" version="3.2">
+<class name="BulletPhysicsServer" inherits="PhysicsServer" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/modules/bullet/rigid_body_bullet.cpp b/modules/bullet/rigid_body_bullet.cpp
index 16a8cf8ede..dfc9647813 100644
--- a/modules/bullet/rigid_body_bullet.cpp
+++ b/modules/bullet/rigid_body_bullet.cpp
@@ -320,7 +320,7 @@ void RigidBodyBullet::destroy_kinematic_utilities() {
}
void RigidBodyBullet::main_shape_changed() {
- CRASH_COND(!get_main_shape())
+ CRASH_COND(!get_main_shape());
btBody->setCollisionShape(get_main_shape());
set_continuous_collision_detection(is_continuous_collision_detection_enabled()); // Reset
}
@@ -515,7 +515,7 @@ void RigidBodyBullet::set_param(PhysicsServer::BodyParameter p_param, real_t p_v
scratch_space_override_modificator();
break;
default:
- WARN_PRINTS("Parameter " + itos(p_param) + " not supported by bullet. Value: " + itos(p_value));
+ WARN_PRINT("Parameter " + itos(p_param) + " not supported by bullet. Value: " + itos(p_value));
}
}
@@ -536,7 +536,7 @@ real_t RigidBodyBullet::get_param(PhysicsServer::BodyParameter p_param) const {
case PhysicsServer::BODY_PARAM_GRAVITY_SCALE:
return gravity_scale;
default:
- WARN_PRINTS("Parameter " + itos(p_param) + " not supported by bullet");
+ WARN_PRINT("Parameter " + itos(p_param) + " not supported by bullet");
return 0;
}
}
@@ -619,7 +619,7 @@ Variant RigidBodyBullet::get_state(PhysicsServer::BodyState p_state) const {
case PhysicsServer::BODY_STATE_CAN_SLEEP:
return can_sleep;
default:
- WARN_PRINTS("This state " + itos(p_state) + " is not supported by Bullet");
+ WARN_PRINT("This state " + itos(p_state) + " is not supported by Bullet");
return Variant();
}
}
diff --git a/modules/bullet/soft_body_bullet.cpp b/modules/bullet/soft_body_bullet.cpp
index f4c0ffa6eb..a7988279c0 100644
--- a/modules/bullet/soft_body_bullet.cpp
+++ b/modules/bullet/soft_body_bullet.cpp
@@ -168,6 +168,7 @@ void SoftBodyBullet::set_node_position(int p_node_index, const Vector3 &p_global
void SoftBodyBullet::set_node_position(int p_node_index, const btVector3 &p_global_position) {
if (bt_soft_body) {
+ bt_soft_body->m_nodes[p_node_index].m_q = bt_soft_body->m_nodes[p_node_index].m_x;
bt_soft_body->m_nodes[p_node_index].m_x = p_global_position;
}
}
diff --git a/modules/bullet/space_bullet.cpp b/modules/bullet/space_bullet.cpp
index 0f50d31611..762637ce75 100644
--- a/modules/bullet/space_bullet.cpp
+++ b/modules/bullet/space_bullet.cpp
@@ -110,7 +110,7 @@ bool BulletPhysicsDirectSpaceState::intersect_ray(const Vector3 &p_from, const V
r_result.collider_id = gObj->get_instance_id();
r_result.collider = 0 == r_result.collider_id ? NULL : ObjectDB::get_instance(r_result.collider_id);
} else {
- WARN_PRINTS("The raycast performed has hit a collision object that is not part of Godot scene, please check it.");
+ WARN_PRINT("The raycast performed has hit a collision object that is not part of Godot scene, please check it.");
}
return true;
} else {
@@ -127,7 +127,7 @@ int BulletPhysicsDirectSpaceState::intersect_shape(const RID &p_shape, const Tra
btCollisionShape *btShape = shape->create_bt_shape(p_xform.basis.get_scale_abs(), p_margin);
if (!btShape->isConvex()) {
bulletdelete(btShape);
- ERR_PRINTS("The shape is not a convex shape, then is not supported: shape type: " + itos(shape->get_type()));
+ ERR_PRINT("The shape is not a convex shape, then is not supported: shape type: " + itos(shape->get_type()));
return 0;
}
btConvexShape *btConvex = static_cast<btConvexShape *>(btShape);
@@ -157,7 +157,7 @@ bool BulletPhysicsDirectSpaceState::cast_motion(const RID &p_shape, const Transf
btCollisionShape *btShape = shape->create_bt_shape(p_xform.basis.get_scale(), p_margin);
if (!btShape->isConvex()) {
bulletdelete(btShape);
- ERR_PRINTS("The shape is not a convex shape, then is not supported: shape type: " + itos(shape->get_type()));
+ ERR_PRINT("The shape is not a convex shape, then is not supported: shape type: " + itos(shape->get_type()));
return false;
}
btConvexShape *bt_convex_shape = static_cast<btConvexShape *>(btShape);
@@ -212,7 +212,7 @@ bool BulletPhysicsDirectSpaceState::collide_shape(RID p_shape, const Transform &
btCollisionShape *btShape = shape->create_bt_shape(p_shape_xform.basis.get_scale_abs(), p_margin);
if (!btShape->isConvex()) {
bulletdelete(btShape);
- ERR_PRINTS("The shape is not a convex shape, then is not supported: shape type: " + itos(shape->get_type()));
+ ERR_PRINT("The shape is not a convex shape, then is not supported: shape type: " + itos(shape->get_type()));
return 0;
}
btConvexShape *btConvex = static_cast<btConvexShape *>(btShape);
@@ -244,7 +244,7 @@ bool BulletPhysicsDirectSpaceState::rest_info(RID p_shape, const Transform &p_sh
btCollisionShape *btShape = shape->create_bt_shape(p_shape_xform.basis.get_scale_abs(), p_margin);
if (!btShape->isConvex()) {
bulletdelete(btShape);
- ERR_PRINTS("The shape is not a convex shape, then is not supported: shape type: " + itos(shape->get_type()));
+ ERR_PRINT("The shape is not a convex shape, then is not supported: shape type: " + itos(shape->get_type()));
return 0;
}
btConvexShape *btConvex = static_cast<btConvexShape *>(btShape);
@@ -389,7 +389,7 @@ void SpaceBullet::set_param(PhysicsServer::AreaParameter p_param, const Variant
case PhysicsServer::AREA_PARAM_GRAVITY_POINT_ATTENUATION:
break;
default:
- WARN_PRINTS("This set parameter (" + itos(p_param) + ") is ignored, the SpaceBullet doesn't support it.");
+ WARN_PRINT("This set parameter (" + itos(p_param) + ") is ignored, the SpaceBullet doesn't support it.");
break;
}
}
@@ -412,7 +412,7 @@ Variant SpaceBullet::get_param(PhysicsServer::AreaParameter p_param) {
case PhysicsServer::AREA_PARAM_GRAVITY_POINT_ATTENUATION:
return 0;
default:
- WARN_PRINTS("This get parameter (" + itos(p_param) + ") is ignored, the SpaceBullet doesn't support it.");
+ WARN_PRINT("This get parameter (" + itos(p_param) + ") is ignored, the SpaceBullet doesn't support it.");
return Variant();
}
}
@@ -428,7 +428,7 @@ void SpaceBullet::set_param(PhysicsServer::SpaceParameter p_param, real_t p_valu
case PhysicsServer::SPACE_PARAM_BODY_ANGULAR_VELOCITY_DAMP_RATIO:
case PhysicsServer::SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS:
default:
- WARN_PRINTS("This set parameter (" + itos(p_param) + ") is ignored, the SpaceBullet doesn't support it.");
+ WARN_PRINT("This set parameter (" + itos(p_param) + ") is ignored, the SpaceBullet doesn't support it.");
break;
}
}
@@ -444,7 +444,7 @@ real_t SpaceBullet::get_param(PhysicsServer::SpaceParameter p_param) {
case PhysicsServer::SPACE_PARAM_BODY_ANGULAR_VELOCITY_DAMP_RATIO:
case PhysicsServer::SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS:
default:
- WARN_PRINTS("The SpaceBullet doesn't support this get parameter (" + itos(p_param) + "), 0 is returned.");
+ WARN_PRINT("The SpaceBullet doesn't support this get parameter (" + itos(p_param) + "), 0 is returned.");
return 0.f;
}
}
diff --git a/modules/csg/doc_classes/CSGBox.xml b/modules/csg/doc_classes/CSGBox.xml
index 14f5a1952e..e2f0f8488a 100644
--- a/modules/csg/doc_classes/CSGBox.xml
+++ b/modules/csg/doc_classes/CSGBox.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CSGBox" inherits="CSGPrimitive" category="Core" version="3.2">
+<class name="CSGBox" inherits="CSGPrimitive" version="4.0">
<brief_description>
A CSG Box shape.
</brief_description>
diff --git a/modules/csg/doc_classes/CSGCombiner.xml b/modules/csg/doc_classes/CSGCombiner.xml
index 51428b25f8..ab95d3c3ee 100644
--- a/modules/csg/doc_classes/CSGCombiner.xml
+++ b/modules/csg/doc_classes/CSGCombiner.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CSGCombiner" inherits="CSGShape" category="Core" version="3.2">
+<class name="CSGCombiner" inherits="CSGShape" version="4.0">
<brief_description>
A CSG node that allows you to combine other CSG modifiers.
</brief_description>
diff --git a/modules/csg/doc_classes/CSGCylinder.xml b/modules/csg/doc_classes/CSGCylinder.xml
index 9fc0281887..2dd8c6a8d0 100644
--- a/modules/csg/doc_classes/CSGCylinder.xml
+++ b/modules/csg/doc_classes/CSGCylinder.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CSGCylinder" inherits="CSGPrimitive" category="Core" version="3.2">
+<class name="CSGCylinder" inherits="CSGPrimitive" version="4.0">
<brief_description>
A CSG Cylinder shape.
</brief_description>
diff --git a/modules/csg/doc_classes/CSGMesh.xml b/modules/csg/doc_classes/CSGMesh.xml
index aae730aa49..f1fe2c286b 100644
--- a/modules/csg/doc_classes/CSGMesh.xml
+++ b/modules/csg/doc_classes/CSGMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CSGMesh" inherits="CSGPrimitive" category="Core" version="3.2">
+<class name="CSGMesh" inherits="CSGPrimitive" version="4.0">
<brief_description>
A CSG Mesh shape that uses a mesh resource.
</brief_description>
diff --git a/modules/csg/doc_classes/CSGPolygon.xml b/modules/csg/doc_classes/CSGPolygon.xml
index 0ecee92cd5..64ae46c69a 100644
--- a/modules/csg/doc_classes/CSGPolygon.xml
+++ b/modules/csg/doc_classes/CSGPolygon.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CSGPolygon" inherits="CSGPrimitive" category="Core" version="3.2">
+<class name="CSGPolygon" inherits="CSGPrimitive" version="4.0">
<brief_description>
Extrudes a 2D polygon shape to create a 3D mesh.
</brief_description>
diff --git a/modules/csg/doc_classes/CSGPrimitive.xml b/modules/csg/doc_classes/CSGPrimitive.xml
index 0a692ffbdb..ba395b7edd 100644
--- a/modules/csg/doc_classes/CSGPrimitive.xml
+++ b/modules/csg/doc_classes/CSGPrimitive.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CSGPrimitive" inherits="CSGShape" category="Core" version="3.2">
+<class name="CSGPrimitive" inherits="CSGShape" version="4.0">
<brief_description>
Base class for CSG primitives.
</brief_description>
diff --git a/modules/csg/doc_classes/CSGShape.xml b/modules/csg/doc_classes/CSGShape.xml
index 9566c04f19..64a2fb1840 100644
--- a/modules/csg/doc_classes/CSGShape.xml
+++ b/modules/csg/doc_classes/CSGShape.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CSGShape" inherits="GeometryInstance" category="Core" version="3.2">
+<class name="CSGShape" inherits="GeometryInstance" version="4.0">
<brief_description>
The CSG base class.
</brief_description>
diff --git a/modules/csg/doc_classes/CSGSphere.xml b/modules/csg/doc_classes/CSGSphere.xml
index 714e725acb..847cc63586 100644
--- a/modules/csg/doc_classes/CSGSphere.xml
+++ b/modules/csg/doc_classes/CSGSphere.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CSGSphere" inherits="CSGPrimitive" category="Core" version="3.2">
+<class name="CSGSphere" inherits="CSGPrimitive" version="4.0">
<brief_description>
A CSG Sphere shape.
</brief_description>
diff --git a/modules/csg/doc_classes/CSGTorus.xml b/modules/csg/doc_classes/CSGTorus.xml
index 5dc6bb8380..84a08edaf5 100644
--- a/modules/csg/doc_classes/CSGTorus.xml
+++ b/modules/csg/doc_classes/CSGTorus.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CSGTorus" inherits="CSGPrimitive" category="Core" version="3.2">
+<class name="CSGTorus" inherits="CSGPrimitive" version="4.0">
<brief_description>
A CSG Torus shape.
</brief_description>
diff --git a/modules/enet/doc_classes/NetworkedMultiplayerENet.xml b/modules/enet/doc_classes/NetworkedMultiplayerENet.xml
index 7c2e783a4f..76b3710e96 100644
--- a/modules/enet/doc_classes/NetworkedMultiplayerENet.xml
+++ b/modules/enet/doc_classes/NetworkedMultiplayerENet.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NetworkedMultiplayerENet" inherits="NetworkedMultiplayerPeer" category="Core" version="3.2">
+<class name="NetworkedMultiplayerENet" inherits="NetworkedMultiplayerPeer" version="4.0">
<brief_description>
PacketPeer implementation using the [url=http://enet.bespin.org/index.html]ENet[/url] library.
</brief_description>
diff --git a/modules/freetype/SCsub b/modules/freetype/SCsub
index 8f4a8de895..7b66aa1c76 100644
--- a/modules/freetype/SCsub
+++ b/modules/freetype/SCsub
@@ -102,5 +102,3 @@ if env['builtin_freetype']:
# Godot source files
env_freetype.add_source_files(env.modules_sources, "*.cpp")
-# Used in scene/, needs to be in main env
-env.Append(CPPDEFINES=['FREETYPE_ENABLED'])
diff --git a/modules/gdnative/SCsub b/modules/gdnative/SCsub
index 0cdd585558..a18c75fa27 100644
--- a/modules/gdnative/SCsub
+++ b/modules/gdnative/SCsub
@@ -30,23 +30,3 @@ _, gensource = env_gdnative.CommandNoCache(['include/gdnative_api_struct.gen.h',
env_gdnative.add_source_files(env.modules_sources, [gensource])
env.use_ptrcall = True
-
-
-if ARGUMENTS.get('gdnative_wrapper', False):
- gensource, = env_gdnative.CommandNoCache('gdnative_wrapper_code.gen.cpp', 'gdnative_api.json', run_in_subprocess(gdnative_builders.build_gdnative_wrapper_code))
-
- gd_wrapper_env = env.Clone()
- gd_wrapper_env.Prepend(CPPPATH=['#modules/gdnative/include/'])
-
- if gd_wrapper_env['use_lto']:
- if not env.msvc:
- gd_wrapper_env.Append(CCFLAGS=['-fno-lto'])
- gd_wrapper_env.Append(LINKFLAGS=['-fno-lto'])
- else:
- gd_wrapper_env.Append(CCFLAGS=['/GL-'])
- gd_wrapper_env.Append(LINKFLAGS=['/LTCG:OFF'])
-
- if not env.msvc:
- gd_wrapper_env.Append(CCFLAGS=['-fPIC'])
-
- lib = gd_wrapper_env.add_library("#bin/gdnative_wrapper_code", [gensource])
diff --git a/modules/gdnative/doc_classes/@NativeScript.xml b/modules/gdnative/doc_classes/@NativeScript.xml
index cb5de198ac..809b225e21 100644
--- a/modules/gdnative/doc_classes/@NativeScript.xml
+++ b/modules/gdnative/doc_classes/@NativeScript.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="@NativeScript" category="Core" version="3.2">
+<class name="@NativeScript" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/modules/gdnative/doc_classes/ARVRInterfaceGDNative.xml b/modules/gdnative/doc_classes/ARVRInterfaceGDNative.xml
index 47c2ee3358..e8405b64a3 100644
--- a/modules/gdnative/doc_classes/ARVRInterfaceGDNative.xml
+++ b/modules/gdnative/doc_classes/ARVRInterfaceGDNative.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ARVRInterfaceGDNative" inherits="ARVRInterface" category="Core" version="3.2">
+<class name="ARVRInterfaceGDNative" inherits="ARVRInterface" version="4.0">
<brief_description>
GDNative wrapper for an ARVR interface.
</brief_description>
diff --git a/modules/gdnative/doc_classes/GDNative.xml b/modules/gdnative/doc_classes/GDNative.xml
index 8750ddc56d..b4b63bf04a 100644
--- a/modules/gdnative/doc_classes/GDNative.xml
+++ b/modules/gdnative/doc_classes/GDNative.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GDNative" inherits="Reference" category="Core" version="3.2">
+<class name="GDNative" inherits="Reference" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/modules/gdnative/doc_classes/GDNativeLibrary.xml b/modules/gdnative/doc_classes/GDNativeLibrary.xml
index aa48ab44f2..820f126dd1 100644
--- a/modules/gdnative/doc_classes/GDNativeLibrary.xml
+++ b/modules/gdnative/doc_classes/GDNativeLibrary.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GDNativeLibrary" inherits="Resource" category="Core" version="3.2">
+<class name="GDNativeLibrary" inherits="Resource" version="4.0">
<brief_description>
An external library containing functions or script classes to use in Godot.
</brief_description>
diff --git a/modules/gdnative/doc_classes/MultiplayerPeerGDNative.xml b/modules/gdnative/doc_classes/MultiplayerPeerGDNative.xml
index b9a01672a6..9f33d32e81 100644
--- a/modules/gdnative/doc_classes/MultiplayerPeerGDNative.xml
+++ b/modules/gdnative/doc_classes/MultiplayerPeerGDNative.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MultiplayerPeerGDNative" inherits="NetworkedMultiplayerPeer" category="Core" version="3.2">
+<class name="MultiplayerPeerGDNative" inherits="NetworkedMultiplayerPeer" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/modules/gdnative/doc_classes/NativeScript.xml b/modules/gdnative/doc_classes/NativeScript.xml
index dc735546e3..b21d16a6fd 100644
--- a/modules/gdnative/doc_classes/NativeScript.xml
+++ b/modules/gdnative/doc_classes/NativeScript.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NativeScript" inherits="Script" category="Core" version="3.2">
+<class name="NativeScript" inherits="Script" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/modules/gdnative/doc_classes/PacketPeerGDNative.xml b/modules/gdnative/doc_classes/PacketPeerGDNative.xml
index acfb597cff..ea9869cc58 100644
--- a/modules/gdnative/doc_classes/PacketPeerGDNative.xml
+++ b/modules/gdnative/doc_classes/PacketPeerGDNative.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PacketPeerGDNative" inherits="PacketPeer" category="Core" version="3.2">
+<class name="PacketPeerGDNative" inherits="PacketPeer" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/modules/gdnative/doc_classes/PluginScript.xml b/modules/gdnative/doc_classes/PluginScript.xml
index 33b5f02bd4..9616101090 100644
--- a/modules/gdnative/doc_classes/PluginScript.xml
+++ b/modules/gdnative/doc_classes/PluginScript.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PluginScript" inherits="Script" category="Core" version="3.2">
+<class name="PluginScript" inherits="Script" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/modules/gdnative/doc_classes/StreamPeerGDNative.xml b/modules/gdnative/doc_classes/StreamPeerGDNative.xml
index f7e0d76fdb..de76277fff 100644
--- a/modules/gdnative/doc_classes/StreamPeerGDNative.xml
+++ b/modules/gdnative/doc_classes/StreamPeerGDNative.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StreamPeerGDNative" inherits="StreamPeer" category="Core" version="3.2">
+<class name="StreamPeerGDNative" inherits="StreamPeer" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/modules/gdnative/doc_classes/VideoStreamGDNative.xml b/modules/gdnative/doc_classes/VideoStreamGDNative.xml
index ed7678b7be..153988bad8 100644
--- a/modules/gdnative/doc_classes/VideoStreamGDNative.xml
+++ b/modules/gdnative/doc_classes/VideoStreamGDNative.xml
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VideoStreamGDNative" inherits="VideoStream" category="Core" version="3.2">
+<class name="VideoStreamGDNative" inherits="VideoStream" version="4.0">
<brief_description>
+ [VideoStream] resource for for video formats implemented via GDNative.
</brief_description>
<description>
+ [VideoStream] resource for for video formats implemented via GDNative.
+ It can be used via [url=https://github.com/KidRigger/godot-videodecoder]godot-videodecoder[/url] which uses the [url=https://ffmpeg.org]FFmpeg[/url] library.
</description>
<tutorials>
</tutorials>
@@ -11,6 +14,7 @@
<return type="String">
</return>
<description>
+ Returns the video file handled by this [VideoStreamGDNative].
</description>
</method>
<method name="set_file">
@@ -19,6 +23,7 @@
<argument index="0" name="file" type="String">
</argument>
<description>
+ Sets the video file that this [VideoStreamGDNative] resource handles. The supported extensions depend on the GDNative plugins used to expose video formats.
</description>
</method>
</methods>
diff --git a/modules/gdnative/doc_classes/WebRTCDataChannelGDNative.xml b/modules/gdnative/doc_classes/WebRTCDataChannelGDNative.xml
index ac18ec6020..f32a4f0a23 100644
--- a/modules/gdnative/doc_classes/WebRTCDataChannelGDNative.xml
+++ b/modules/gdnative/doc_classes/WebRTCDataChannelGDNative.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="WebRTCDataChannelGDNative" inherits="WebRTCDataChannel" category="Core" version="3.2">
+<class name="WebRTCDataChannelGDNative" inherits="WebRTCDataChannel" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/modules/gdnative/doc_classes/WebRTCPeerConnectionGDNative.xml b/modules/gdnative/doc_classes/WebRTCPeerConnectionGDNative.xml
index 44cb8e5db8..82f8633bb6 100644
--- a/modules/gdnative/doc_classes/WebRTCPeerConnectionGDNative.xml
+++ b/modules/gdnative/doc_classes/WebRTCPeerConnectionGDNative.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="WebRTCPeerConnectionGDNative" inherits="WebRTCPeerConnection" category="Core" version="3.2">
+<class name="WebRTCPeerConnectionGDNative" inherits="WebRTCPeerConnection" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/modules/gdnative/gdnative.cpp b/modules/gdnative/gdnative.cpp
index d9dc256ac0..1571b821a5 100644
--- a/modules/gdnative/gdnative.cpp
+++ b/modules/gdnative/gdnative.cpp
@@ -339,7 +339,7 @@ bool GDNative::initialize() {
if (err || !library_init) {
OS::get_singleton()->close_dynamic_library(native_handle);
native_handle = NULL;
- ERR_PRINTS("Failed to obtain " + library->get_symbol_prefix() + "gdnative_init symbol");
+ ERR_PRINT("Failed to obtain " + library->get_symbol_prefix() + "gdnative_init symbol");
return false;
}
diff --git a/modules/gdnative/gdnative_builders.py b/modules/gdnative/gdnative_builders.py
index 20c1a2233c..0d95a65b7e 100644
--- a/modules/gdnative/gdnative_builders.py
+++ b/modules/gdnative/gdnative_builders.py
@@ -12,30 +12,6 @@ def _spaced(e):
def _build_gdnative_api_struct_header(api):
- gdnative_api_init_macro = [
- '\textern const godot_gdnative_core_api_struct *_gdnative_wrapper_api_struct;'
- ]
-
- for ext in api['extensions']:
- name = ext['name']
- gdnative_api_init_macro.append(
- '\textern const godot_gdnative_ext_{0}_api_struct *_gdnative_wrapper_{0}_api_struct;'.format(name))
-
- gdnative_api_init_macro.append('\t_gdnative_wrapper_api_struct = options->api_struct;')
- gdnative_api_init_macro.append('\tfor (unsigned int i = 0; i < _gdnative_wrapper_api_struct->num_extensions; i++) { ')
- gdnative_api_init_macro.append('\t\tswitch (_gdnative_wrapper_api_struct->extensions[i]->type) {')
-
- for ext in api['extensions']:
- name = ext['name']
- gdnative_api_init_macro.append(
- '\t\t\tcase GDNATIVE_EXT_%s:' % ext['type'])
- gdnative_api_init_macro.append(
- '\t\t\t\t_gdnative_wrapper_{0}_api_struct = (godot_gdnative_ext_{0}_api_struct *)'
- ' _gdnative_wrapper_api_struct->extensions[i];'.format(name))
- gdnative_api_init_macro.append('\t\t\t\tbreak;')
- gdnative_api_init_macro.append('\t\t}')
- gdnative_api_init_macro.append('\t}')
-
out = [
'/* THIS FILE IS GENERATED DO NOT EDIT */',
'#ifndef GODOT_GDNATIVE_API_STRUCT_H',
@@ -49,8 +25,6 @@ def _build_gdnative_api_struct_header(api):
'#include <pluginscript/godot_pluginscript.h>',
'#include <videodecoder/godot_videodecoder.h>',
'',
- '#define GDNATIVE_API_INIT(options) do { \\\n' + ' \\\n'.join(gdnative_api_init_macro) + ' \\\n } while (0)',
- '',
'#ifdef __cplusplus',
'extern "C" {',
'#endif',
@@ -238,76 +212,5 @@ def build_gdnative_api_struct(target, source, env):
fd.write(_build_gdnative_api_struct_source(api))
-def _build_gdnative_wrapper_code(api):
- out = [
- '/* THIS FILE IS GENERATED DO NOT EDIT */',
- '',
- '#include <gdnative/gdnative.h>',
- '#include <nativescript/godot_nativescript.h>',
- '#include <pluginscript/godot_pluginscript.h>',
- '#include <arvr/godot_arvr.h>',
- '#include <videodecoder/godot_videodecoder.h>',
- '',
- '#include <gdnative_api_struct.gen.h>',
- '',
- '#ifdef __cplusplus',
- 'extern "C" {',
- '#endif',
- '',
- 'godot_gdnative_core_api_struct *_gdnative_wrapper_api_struct = 0;',
- ]
-
- for ext in api['extensions']:
- name = ext['name']
- out.append('godot_gdnative_ext_' + name + '_api_struct *_gdnative_wrapper_' + name + '_api_struct = 0;')
-
- out += ['']
-
- for funcdef in api['core']['api']:
- args = ', '.join(['%s%s' % (_spaced(t), n) for t, n in funcdef['arguments']])
- out.append('%s%s(%s) {' % (_spaced(funcdef['return_type']), funcdef['name'], args))
-
- args = ', '.join(['%s' % n for t, n in funcdef['arguments']])
-
- return_line = '\treturn ' if funcdef['return_type'] != 'void' else '\t'
- return_line += '_gdnative_wrapper_api_struct->' + funcdef['name'] + '(' + args + ');'
-
- out.append(return_line)
- out.append('}')
- out.append('')
-
- for ext in api['extensions']:
- name = ext['name']
- for funcdef in ext['api']:
- args = ', '.join(['%s%s' % (_spaced(t), n) for t, n in funcdef['arguments']])
- out.append('%s%s(%s) {' % (_spaced(funcdef['return_type']), funcdef['name'], args))
-
- args = ', '.join(['%s' % n for t, n in funcdef['arguments']])
-
- return_line = '\treturn ' if funcdef['return_type'] != 'void' else '\t'
- return_line += '_gdnative_wrapper_' + name + '_api_struct->' + funcdef['name'] + '(' + args + ');'
-
- out.append(return_line)
- out.append('}')
- out.append('')
-
- out += [
- '#ifdef __cplusplus',
- '}',
- '#endif'
- ]
-
- return '\n'.join(out)
-
-
-def build_gdnative_wrapper_code(target, source, env):
- with open(source[0], 'r') as fd:
- api = json.load(fd)
-
- wrapper_file = target[0]
- with open(wrapper_file, 'w') as fd:
- fd.write(_build_gdnative_wrapper_code(api))
-
-
if __name__ == '__main__':
subprocess_main(globals())
diff --git a/modules/gdnative/include/pluginscript/godot_pluginscript.h b/modules/gdnative/include/pluginscript/godot_pluginscript.h
index 2c2528b8b9..e8822fc1ec 100644
--- a/modules/gdnative/include/pluginscript/godot_pluginscript.h
+++ b/modules/gdnative/include/pluginscript/godot_pluginscript.h
@@ -57,9 +57,6 @@ typedef struct {
int p_argcount, godot_variant_call_error *r_error);
void (*notification)(godot_pluginscript_instance_data *p_data, int p_notification);
- // TODO: could this rpc mode stuff be moved to the godot_pluginscript_script_manifest ?
- godot_method_rpc_mode (*get_rpc_mode)(godot_pluginscript_instance_data *p_data, const godot_string *p_method);
- godot_method_rpc_mode (*get_rset_mode)(godot_pluginscript_instance_data *p_data, const godot_string *p_variable);
//this is used by script languages that keep a reference counter of their own
//you can make make Ref<> not die when it reaches zero, so deleting the reference
diff --git a/modules/gdnative/nativescript/nativescript.cpp b/modules/gdnative/nativescript/nativescript.cpp
index 7a5a7bbc3a..8b06af6c7b 100644
--- a/modules/gdnative/nativescript/nativescript.cpp
+++ b/modules/gdnative/nativescript/nativescript.cpp
@@ -746,7 +746,7 @@ void NativeScriptInstance::notification(int p_notification) {
#ifdef DEBUG_ENABLED
if (p_notification == MainLoop::NOTIFICATION_CRASH) {
if (current_method_call != StringName("")) {
- ERR_PRINTS("NativeScriptInstance detected crash on method: " + current_method_call);
+ ERR_PRINT("NativeScriptInstance detected crash on method: " + current_method_call);
current_method_call = "";
}
}
diff --git a/modules/gdnative/register_types.cpp b/modules/gdnative/register_types.cpp
index cb84c23e7a..4142f60ba6 100644
--- a/modules/gdnative/register_types.cpp
+++ b/modules/gdnative/register_types.cpp
@@ -278,7 +278,7 @@ void register_gdnative_types() {
proc_ptr);
if (err != OK) {
- ERR_PRINTS("No " + lib->get_symbol_prefix() + "gdnative_singleton in \"" + singleton->get_library()->get_current_library_path() + "\" found");
+ ERR_PRINT("No " + lib->get_symbol_prefix() + "gdnative_singleton in \"" + singleton->get_library()->get_current_library_path() + "\" found");
} else {
singleton_gdnatives.push_back(singleton);
((void (*)())proc_ptr)();
diff --git a/modules/gdscript/doc_classes/@GDScript.xml b/modules/gdscript/doc_classes/@GDScript.xml
index c4b7e4887e..b947d95fac 100644
--- a/modules/gdscript/doc_classes/@GDScript.xml
+++ b/modules/gdscript/doc_classes/@GDScript.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="@GDScript" category="Core" version="3.2">
+<class name="@GDScript" version="4.0">
<brief_description>
Built-in GDScript functions.
</brief_description>
@@ -39,12 +39,11 @@
<argument index="1" name="alpha" type="float" default="1.0">
</argument>
<description>
- Returns a color according to the standardised [code]name[/code] with [code]alpha[/code] ranging from 0 to 1.
+ Returns a color according to the standardized [code]name[/code] with [code]alpha[/code] ranging from 0 to 1.
[codeblock]
red = ColorN("red", 1)
[/codeblock]
- Supported color names:
- "aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige", "bisque", "black", "blanchedalmond", "blue", "blueviolet", "brown", "burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflower", "cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod", "darkgray", "darkgreen", "darkkhaki", "darkmagenta", "darkolivegreen", "darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen", "darkslateblue", "darkslategray", "darkturquoise", "darkviolet", "deeppink", "deepskyblue", "dimgray", "dodgerblue", "firebrick", "floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite", "gold", "goldenrod", "gray", "webgray", "green", "webgreen", "greenyellow", "honeydew", "hotpink", "indianred", "indigo", "ivory", "khaki", "lavender", "lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral", "lightcyan", "lightgoldenrod", "lightgray", "lightgreen", "lightpink", "lightsalmon", "lightseagreen", "lightskyblue", "lightslategray", "lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta", "maroon", "webmaroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple", "mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise", "mediumvioletred", "midnightblue", "mintcream", "mistyrose", "moccasin", "navajowhite", "navyblue", "oldlace", "olive", "olivedrab", "orange", "orangered", "orchid", "palegoldenrod", "palegreen", "paleturquoise", "palevioletred", "papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue", "purple", "webpurple", "rebeccapurple", "red", "rosybrown", "royalblue", "saddlebrown", "salmon", "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue", "slateblue", "slategray", "snow", "springgreen", "steelblue", "tan", "teal", "thistle", "tomato", "turquoise", "violet", "wheat", "white", "whitesmoke", "yellow", "yellowgreen".
+ Supported color names are the same as the constants defined in [Color].
</description>
</method>
<method name="abs">
diff --git a/modules/gdscript/doc_classes/GDScript.xml b/modules/gdscript/doc_classes/GDScript.xml
index 8e175a7ab8..5d0e93e117 100644
--- a/modules/gdscript/doc_classes/GDScript.xml
+++ b/modules/gdscript/doc_classes/GDScript.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GDScript" inherits="Script" category="Core" version="3.2">
+<class name="GDScript" inherits="Script" version="4.0">
<brief_description>
A script implemented in the GDScript programming language.
</brief_description>
diff --git a/modules/gdscript/doc_classes/GDScriptFunctionState.xml b/modules/gdscript/doc_classes/GDScriptFunctionState.xml
index 690953108f..9a73764646 100644
--- a/modules/gdscript/doc_classes/GDScriptFunctionState.xml
+++ b/modules/gdscript/doc_classes/GDScriptFunctionState.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GDScriptFunctionState" inherits="Reference" category="Core" version="3.2">
+<class name="GDScriptFunctionState" inherits="Reference" version="4.0">
<brief_description>
State of a function call after yielding.
</brief_description>
@@ -33,7 +33,7 @@
</methods>
<signals>
<signal name="completed">
- <argument index="0" name="result" type="Nil">
+ <argument index="0" name="result" type="Variant">
</argument>
<description>
</description>
diff --git a/modules/gdscript/doc_classes/GDScriptNativeClass.xml b/modules/gdscript/doc_classes/GDScriptNativeClass.xml
index 70583d47a7..0a8982de8e 100644
--- a/modules/gdscript/doc_classes/GDScriptNativeClass.xml
+++ b/modules/gdscript/doc_classes/GDScriptNativeClass.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GDScriptNativeClass" inherits="Reference" category="Core" version="3.2">
+<class name="GDScriptNativeClass" inherits="Reference" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/modules/gdscript/gdscript_functions.cpp b/modules/gdscript/gdscript_functions.cpp
index 01d62a1c62..c398633dc5 100644
--- a/modules/gdscript/gdscript_functions.cpp
+++ b/modules/gdscript/gdscript_functions.cpp
@@ -800,7 +800,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
}
String message = *p_args[0];
- ERR_PRINTS(message);
+ ERR_PRINT(message);
r_ret = Variant();
} break;
case PUSH_WARNING: {
@@ -814,7 +814,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
}
String message = *p_args[0];
- WARN_PRINTS(message);
+ WARN_PRINT(message);
r_ret = Variant();
} break;
case VAR_TO_STR: {
@@ -1260,7 +1260,7 @@ void GDScriptFunctions::call(Function p_func, const Variant **p_args, int p_arg_
if (err != OK) {
r_ret = Variant();
- ERR_PRINTS(vformat("Error parsing JSON at line %s: %s", errl, errs));
+ ERR_PRINT(vformat("Error parsing JSON at line %s: %s", errl, errs));
}
} break;
diff --git a/modules/gdscript/language_server/gdscript_extend_parser.cpp b/modules/gdscript/language_server/gdscript_extend_parser.cpp
index 701809e755..0f6f13944b 100644
--- a/modules/gdscript/language_server/gdscript_extend_parser.cpp
+++ b/modules/gdscript/language_server/gdscript_extend_parser.cpp
@@ -757,7 +757,7 @@ Dictionary ExtendGDScriptParser::dump_class_api(const GDScriptParser::ClassNode
Array static_functions;
for (int i = 0; i < p_class->static_functions.size(); ++i) {
- static_functions.append(dump_function_api(p_class->functions[i]));
+ static_functions.append(dump_function_api(p_class->static_functions[i]));
}
class_api["static_functions"] = static_functions;
diff --git a/modules/gridmap/doc_classes/GridMap.xml b/modules/gridmap/doc_classes/GridMap.xml
index 3de971db6d..37ebb3e5d5 100644
--- a/modules/gridmap/doc_classes/GridMap.xml
+++ b/modules/gridmap/doc_classes/GridMap.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GridMap" inherits="Spatial" category="Core" version="3.2">
+<class name="GridMap" inherits="Spatial" version="4.0">
<brief_description>
Node for 3D tile-based maps.
</brief_description>
diff --git a/modules/hdr/image_loader_hdr.cpp b/modules/hdr/image_loader_hdr.cpp
index 4505df0f8f..3fa7266f1a 100644
--- a/modules/hdr/image_loader_hdr.cpp
+++ b/modules/hdr/image_loader_hdr.cpp
@@ -47,7 +47,7 @@ Error ImageLoaderHDR::load_image(Ref<Image> p_image, FileAccess *f, bool p_force
if (line.begins_with("FORMAT=")) { // leave option to implement other commands
ERR_FAIL_COND_V_MSG(line != "FORMAT=32-bit_rle_rgbe", ERR_FILE_UNRECOGNIZED, "Only 32-bit_rle_rgbe is supported for HDR files.");
} else if (!line.begins_with("#")) { // not comment
- WARN_PRINTS("Ignoring unsupported header information in HDR: " + line + ".");
+ WARN_PRINT("Ignoring unsupported header information in HDR: " + line + ".");
}
}
diff --git a/modules/mbedtls/crypto_mbedtls.cpp b/modules/mbedtls/crypto_mbedtls.cpp
index 9b072785af..2bd80064e3 100644
--- a/modules/mbedtls/crypto_mbedtls.cpp
+++ b/modules/mbedtls/crypto_mbedtls.cpp
@@ -182,7 +182,7 @@ CryptoMbedTLS::CryptoMbedTLS() {
mbedtls_entropy_init(&entropy);
int ret = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, NULL, 0);
if (ret != 0) {
- ERR_PRINTS(" failed\n ! mbedtls_ctr_drbg_seed returned an error" + itos(ret));
+ ERR_PRINT(" failed\n ! mbedtls_ctr_drbg_seed returned an error" + itos(ret));
}
}
@@ -267,7 +267,7 @@ Ref<X509Certificate> CryptoMbedTLS::generate_self_signed_certificate(Ref<CryptoK
if (err != 0) {
mbedtls_mpi_free(&serial);
mbedtls_x509write_crt_free(&crt);
- ERR_PRINTS("Generated invalid certificate: " + itos(err));
+ ERR_PRINT("Generated invalid certificate: " + itos(err));
return NULL;
}
diff --git a/modules/mbedtls/stream_peer_mbedtls.cpp b/modules/mbedtls/stream_peer_mbedtls.cpp
index b88d9e48a4..f06327e0d5 100755
--- a/modules/mbedtls/stream_peer_mbedtls.cpp
+++ b/modules/mbedtls/stream_peer_mbedtls.cpp
@@ -88,7 +88,7 @@ Error StreamPeerMbedTLS::_do_handshake() {
while ((ret = mbedtls_ssl_handshake(ssl_ctx->get_context())) != 0) {
if (ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE) {
// An error occurred.
- ERR_PRINTS("TLS handshake error: " + itos(ret));
+ ERR_PRINT("TLS handshake error: " + itos(ret));
_print_error(ret);
disconnect_from_stream();
status = STATUS_ERROR;
diff --git a/modules/mobile_vr/doc_classes/MobileVRInterface.xml b/modules/mobile_vr/doc_classes/MobileVRInterface.xml
index a132333a87..7552abe61d 100644
--- a/modules/mobile_vr/doc_classes/MobileVRInterface.xml
+++ b/modules/mobile_vr/doc_classes/MobileVRInterface.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MobileVRInterface" inherits="ARVRInterface" category="Core" version="3.2">
+<class name="MobileVRInterface" inherits="ARVRInterface" version="4.0">
<brief_description>
Generic mobile VR implementation.
</brief_description>
diff --git a/modules/modules_builders.py b/modules/modules_builders.py
new file mode 100644
index 0000000000..0e9cba2b0b
--- /dev/null
+++ b/modules/modules_builders.py
@@ -0,0 +1,16 @@
+"""Functions used to generate source files during build time
+
+All such functions are invoked in a subprocess on Windows to prevent build flakiness.
+"""
+
+from platform_methods import subprocess_main
+
+
+def generate_modules_enabled(target, source, env):
+ with open(target[0].path, 'w') as f:
+ for module in env.module_list:
+ f.write('#define %s\n' % ("MODULE_" + module.upper() + "_ENABLED"))
+
+
+if __name__ == '__main__':
+ subprocess_main(globals())
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp
index 3d868b0839..2847f3b414 100644
--- a/modules/mono/csharp_script.cpp
+++ b/modules/mono/csharp_script.cpp
@@ -165,9 +165,9 @@ void CSharpLanguage::finish() {
Object *obj = ObjectDB::get_instance(id);
if (obj) {
- ERR_PRINTS("Leaked unsafe reference to object: " + obj->get_class() + ":" + itos(id));
+ ERR_PRINT("Leaked unsafe reference to object: " + obj->get_class() + ":" + itos(id));
} else {
- ERR_PRINTS("Leaked unsafe reference to deleted object: " + itos(id));
+ ERR_PRINT("Leaked unsafe reference to deleted object: " + itos(id));
}
}
#endif
@@ -1080,7 +1080,7 @@ void CSharpLanguage::_load_scripts_metadata() {
int err_line;
Error json_err = JSON::parse(old_json, old_dict_var, err_str, err_line);
if (json_err != OK) {
- ERR_PRINTS("Failed to parse metadata file: '" + err_str + "' (" + String::num_int64(err_line) + ").");
+ ERR_PRINT("Failed to parse metadata file: '" + err_str + "' (" + String::num_int64(err_line) + ").");
return;
}
@@ -1721,8 +1721,7 @@ bool CSharpInstance::has_method(const StringName &p_method) const {
Variant CSharpInstance::call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
- if (!script.is_valid())
- ERR_FAIL_V(Variant());
+ ERR_FAIL_COND_V(!script.is_valid(), Variant());
GD_MONO_SCOPE_THREAD_ATTACH;
@@ -2425,6 +2424,9 @@ bool CSharpScript::_update_exports() {
top = top->get_parent_class();
}
+ // Need to check this here, before disposal
+ bool base_ref = Object::cast_to<Reference>(tmp_native) != NULL;
+
// Dispose the temporary managed instance
MonoException *exc = NULL;
@@ -2438,10 +2440,10 @@ bool CSharpScript::_update_exports() {
MonoGCHandle::free_handle(tmp_pinned_gchandle);
tmp_object = NULL;
- if (tmp_native && !Object::cast_to<Reference>(tmp_native)) {
+ if (tmp_native && !base_ref) {
Node *node = Object::cast_to<Node>(tmp_native);
if (node && node->is_inside_tree()) {
- ERR_PRINTS("Temporary instance was added to the scene tree.");
+ ERR_PRINT("Temporary instance was added to the scene tree.");
} else {
memdelete(tmp_native);
}
@@ -2519,7 +2521,7 @@ bool CSharpScript::_get_signal(GDMonoClass *p_class, GDMonoClass *p_delegate, Ve
arg.type = GDMonoMarshal::managed_to_variant_type(types[i]);
if (arg.type == Variant::NIL) {
- ERR_PRINTS("Unknown type of signal parameter: '" + arg.name + "' in '" + p_class->get_full_name() + "'.");
+ ERR_PRINT("Unknown type of signal parameter: '" + arg.name + "' in '" + p_class->get_full_name() + "'.");
return false;
}
@@ -2549,7 +2551,7 @@ bool CSharpScript::_get_member_export(IMonoClassMember *p_member, bool p_inspect
if (p_member->is_static()) {
if (p_member->has_attribute(CACHED_CLASS(ExportAttribute)))
- ERR_PRINTS("Cannot export member because it is static: '" + MEMBER_FULL_QUALIFIED_NAME(p_member) + "'.");
+ ERR_PRINT("Cannot export member because it is static: '" + MEMBER_FULL_QUALIFIED_NAME(p_member) + "'.");
return false;
}
@@ -2572,12 +2574,12 @@ bool CSharpScript::_get_member_export(IMonoClassMember *p_member, bool p_inspect
GDMonoProperty *property = static_cast<GDMonoProperty *>(p_member);
if (!property->has_getter()) {
if (exported)
- ERR_PRINTS("Read-only property cannot be exported: '" + MEMBER_FULL_QUALIFIED_NAME(p_member) + "'.");
+ ERR_PRINT("Read-only property cannot be exported: '" + MEMBER_FULL_QUALIFIED_NAME(p_member) + "'.");
return false;
}
if (!property->has_setter()) {
if (exported)
- ERR_PRINTS("Write-only property (without getter) cannot be exported: '" + MEMBER_FULL_QUALIFIED_NAME(p_member) + "'.");
+ ERR_PRINT("Write-only property (without getter) cannot be exported: '" + MEMBER_FULL_QUALIFIED_NAME(p_member) + "'.");
return false;
}
}
@@ -2596,7 +2598,7 @@ bool CSharpScript::_get_member_export(IMonoClassMember *p_member, bool p_inspect
String hint_string;
if (variant_type == Variant::NIL) {
- ERR_PRINTS("Unknown exported member type: '" + MEMBER_FULL_QUALIFIED_NAME(p_member) + "'.");
+ ERR_PRINT("Unknown exported member type: '" + MEMBER_FULL_QUALIFIED_NAME(p_member) + "'.");
return false;
}
@@ -2888,7 +2890,7 @@ bool CSharpScript::can_instance() const {
"Compile",
ProjectSettings::get_singleton()->globalize_path(get_path()));
} else {
- ERR_PRINTS("C# project could not be created; cannot add file: '" + get_path() + "'.");
+ ERR_PRINT("C# project could not be created; cannot add file: '" + get_path() + "'.");
}
}
}
@@ -3434,7 +3436,7 @@ Error ResourceFormatSaverCSharpScript::save(const String &p_path, const RES &p_r
"Compile",
ProjectSettings::get_singleton()->globalize_path(p_path));
} else {
- ERR_PRINTS("C# project could not be created; cannot add file: '" + p_path + "'.");
+ ERR_PRINT("C# project could not be created; cannot add file: '" + p_path + "'.");
}
}
#endif
diff --git a/modules/mono/editor/bindings_generator.cpp b/modules/mono/editor/bindings_generator.cpp
index 9beadb1778..34f01ce3c6 100644
--- a/modules/mono/editor/bindings_generator.cpp
+++ b/modules/mono/editor/bindings_generator.cpp
@@ -278,7 +278,7 @@ String BindingsGenerator::bbcode_to_xml(const String &p_bbcode, const TypeInterf
Vector<String> link_target_parts = link_target.split(".");
if (link_target_parts.size() <= 0 || link_target_parts.size() > 2) {
- ERR_PRINTS("Invalid reference format: '" + tag + "'.");
+ ERR_PRINT("Invalid reference format: '" + tag + "'.");
xml_output.append("<c>");
xml_output.append(tag);
@@ -374,7 +374,7 @@ String BindingsGenerator::bbcode_to_xml(const String &p_bbcode, const TypeInterf
xml_output.append(target_enum_itype.proxy_name); // Includes nesting class if any
xml_output.append("\"/>");
} else {
- ERR_PRINTS("Cannot resolve enum reference in documentation: '" + link_target + "'.");
+ ERR_PRINT("Cannot resolve enum reference in documentation: '" + link_target + "'.");
xml_output.append("<c>");
xml_output.append(link_target);
@@ -423,7 +423,7 @@ String BindingsGenerator::bbcode_to_xml(const String &p_bbcode, const TypeInterf
xml_output.append(target_iconst->proxy_name);
xml_output.append("\"/>");
} else {
- ERR_PRINTS("Cannot resolve global constant reference in documentation: '" + link_target + "'.");
+ ERR_PRINT("Cannot resolve global constant reference in documentation: '" + link_target + "'.");
xml_output.append("<c>");
xml_output.append(link_target);
@@ -463,7 +463,7 @@ String BindingsGenerator::bbcode_to_xml(const String &p_bbcode, const TypeInterf
xml_output.append(target_iconst->proxy_name);
xml_output.append("\"/>");
} else {
- ERR_PRINTS("Cannot resolve constant reference in documentation: '" + link_target + "'.");
+ ERR_PRINT("Cannot resolve constant reference in documentation: '" + link_target + "'.");
xml_output.append("<c>");
xml_output.append(link_target);
@@ -533,7 +533,7 @@ String BindingsGenerator::bbcode_to_xml(const String &p_bbcode, const TypeInterf
xml_output.append(target_itype->proxy_name);
xml_output.append("\"/>");
} else {
- ERR_PRINTS("Cannot resolve type reference in documentation: '" + tag + "'.");
+ ERR_PRINT("Cannot resolve type reference in documentation: '" + tag + "'.");
xml_output.append("<c>");
xml_output.append(tag);
@@ -1207,7 +1207,7 @@ Error BindingsGenerator::_generate_cs_type(const TypeInterface &itype, const Str
output.append(obj_types[itype.base_name].proxy_name);
output.append("\n");
} else {
- ERR_PRINTS("Base type '" + itype.base_name.operator String() + "' does not exist, for class '" + itype.name + "'.");
+ ERR_PRINT("Base type '" + itype.base_name.operator String() + "' does not exist, for class '" + itype.name + "'.");
return ERR_INVALID_DATA;
}
}
@@ -1646,7 +1646,7 @@ Error BindingsGenerator::_generate_cs_method(const BindingsGenerator::TypeInterf
if (p_imethod.is_deprecated) {
if (p_imethod.deprecation_message.empty())
- WARN_PRINTS("An empty deprecation message is discouraged. Method: '" + p_imethod.proxy_name + "'.");
+ WARN_PRINT("An empty deprecation message is discouraged. Method: '" + p_imethod.proxy_name + "'.");
p_output.append(MEMBER_BEGIN "[Obsolete(\"");
p_output.append(p_imethod.deprecation_message);
@@ -2134,7 +2134,7 @@ const BindingsGenerator::TypeInterface *BindingsGenerator::_get_type_or_placehol
if (found)
return found;
- ERR_PRINTS(String() + "Type not found. Creating placeholder: '" + p_typeref.cname.operator String() + "'.");
+ ERR_PRINT(String() + "Type not found. Creating placeholder: '" + p_typeref.cname.operator String() + "'.");
const Map<StringName, TypeInterface>::Element *match = placeholder_types.find(p_typeref.cname);
@@ -2358,9 +2358,9 @@ bool BindingsGenerator::_populate_object_type_interfaces() {
// which could actually will return something different.
// Let's put this to notify us if that ever happens.
if (itype.cname != name_cache.type_Object || imethod.name != "free") {
- WARN_PRINTS("Notification: New unexpected virtual non-overridable method found."
- " We only expected Object.free, but found '" +
- itype.name + "." + imethod.name + "'.");
+ WARN_PRINT("Notification: New unexpected virtual non-overridable method found."
+ " We only expected Object.free, but found '" +
+ itype.name + "." + imethod.name + "'.");
}
} else if (return_info.type == Variant::INT && return_info.usage & PROPERTY_USAGE_CLASS_IS_ENUM) {
imethod.return_type.cname = return_info.class_name;
@@ -2369,7 +2369,7 @@ bool BindingsGenerator::_populate_object_type_interfaces() {
imethod.return_type.cname = return_info.class_name;
if (!imethod.is_virtual && ClassDB::is_parent_class(return_info.class_name, name_cache.type_Reference) && return_info.hint != PROPERTY_HINT_RESOURCE_TYPE) {
/* clang-format off */
- ERR_PRINTS("Return type is reference but hint is not '" _STR(PROPERTY_HINT_RESOURCE_TYPE) "'."
+ ERR_PRINT("Return type is reference but hint is not '" _STR(PROPERTY_HINT_RESOURCE_TYPE) "'."
" Are you returning a reference type by pointer? Method: '" + itype.name + "." + imethod.name + "'.");
/* clang-format on */
ERR_FAIL_V(false);
@@ -3038,7 +3038,7 @@ void BindingsGenerator::_populate_global_constants() {
// HARDCODED: The Error enum have the prefix 'ERR_' for everything except 'OK' and 'FAILED'.
if (ienum.cname == name_cache.enum_Error) {
if (prefix_length > 0) { // Just in case it ever changes
- ERR_PRINTS("Prefix for enum '" _STR(Error) "' is not empty.");
+ ERR_PRINT("Prefix for enum '" _STR(Error) "' is not empty.");
}
prefix_length = 1; // 'ERR_'
@@ -3133,7 +3133,7 @@ void BindingsGenerator::handle_cmdline_args(const List<String> &p_cmdline_args)
glue_dir_path = path_elem->get();
elem = elem->next();
} else {
- ERR_PRINTS(generate_all_glue_option + ": No output directory specified (expected path to '{GODOT_ROOT}/modules/mono/glue').");
+ ERR_PRINT(generate_all_glue_option + ": No output directory specified (expected path to '{GODOT_ROOT}/modules/mono/glue').");
}
--options_left;
@@ -3144,7 +3144,7 @@ void BindingsGenerator::handle_cmdline_args(const List<String> &p_cmdline_args)
cs_dir_path = path_elem->get();
elem = elem->next();
} else {
- ERR_PRINTS(generate_cs_glue_option + ": No output directory specified.");
+ ERR_PRINT(generate_cs_glue_option + ": No output directory specified.");
}
--options_left;
@@ -3155,7 +3155,7 @@ void BindingsGenerator::handle_cmdline_args(const List<String> &p_cmdline_args)
cpp_dir_path = path_elem->get();
elem = elem->next();
} else {
- ERR_PRINTS(generate_cpp_glue_option + ": No output directory specified.");
+ ERR_PRINT(generate_cpp_glue_option + ": No output directory specified.");
}
--options_left;
@@ -3169,26 +3169,26 @@ void BindingsGenerator::handle_cmdline_args(const List<String> &p_cmdline_args)
bindings_generator.set_log_print_enabled(true);
if (!bindings_generator.initialized) {
- ERR_PRINTS("Failed to initialize the bindings generator");
+ ERR_PRINT("Failed to initialize the bindings generator");
::exit(0);
}
if (glue_dir_path.length()) {
if (bindings_generator.generate_glue(glue_dir_path) != OK)
- ERR_PRINTS(generate_all_glue_option + ": Failed to generate the C++ glue.");
+ ERR_PRINT(generate_all_glue_option + ": Failed to generate the C++ glue.");
if (bindings_generator.generate_cs_api(glue_dir_path.plus_file(API_SOLUTION_NAME)) != OK)
- ERR_PRINTS(generate_all_glue_option + ": Failed to generate the C# API.");
+ ERR_PRINT(generate_all_glue_option + ": Failed to generate the C# API.");
}
if (cs_dir_path.length()) {
if (bindings_generator.generate_cs_api(cs_dir_path) != OK)
- ERR_PRINTS(generate_cs_glue_option + ": Failed to generate the C# API.");
+ ERR_PRINT(generate_cs_glue_option + ": Failed to generate the C# API.");
}
if (cpp_dir_path.length()) {
if (bindings_generator.generate_glue(cpp_dir_path) != OK)
- ERR_PRINTS(generate_cpp_glue_option + ": Failed to generate the C++ glue.");
+ ERR_PRINT(generate_cpp_glue_option + ": Failed to generate the C++ glue.");
}
// Exit once done
diff --git a/modules/mono/editor/script_class_parser.cpp b/modules/mono/editor/script_class_parser.cpp
index 8ac4df9952..bece23c9a6 100644
--- a/modules/mono/editor/script_class_parser.cpp
+++ b/modules/mono/editor/script_class_parser.cpp
@@ -635,13 +635,14 @@ static String get_preprocessor_directive(const String &p_line, int p_from) {
CRASH_COND(p_line[p_from] != '#');
p_from++;
int i = p_from;
- while (i < p_line.length() && p_line[i] != ' ' && p_line[i] != '\t') {
+ while (i < p_line.length() && (p_line[i] == '_' || (p_line[i] >= 'A' && p_line[i] <= 'Z') ||
+ (p_line[i] >= 'a' && p_line[i] <= 'z') || p_line[i] > 127)) {
i++;
}
return p_line.substr(p_from, i - p_from);
}
-static void run_dummy_preprocessor(String &r_source) {
+static void run_dummy_preprocessor(String &r_source, const String &p_filepath) {
Vector<String> lines = r_source.split("\n", /* p_allow_empty: */ true);
@@ -655,8 +656,8 @@ static void run_dummy_preprocessor(String &r_source) {
const int line_len = line.length();
- int j = 0;
- while (j < line_len) {
+ int j;
+ for (j = 0; j < line_len; j++) {
if (line[j] != ' ' && line[j] != '\t') {
if (line[j] == '#') {
// First non-whitespace char of the line is '#'
@@ -668,13 +669,13 @@ static void run_dummy_preprocessor(String &r_source) {
if_level++;
is_branch_being_compiled.push_back(if_level == 0 || is_branch_being_compiled[if_level - 1]);
} else if (directive == "elif") {
- ERR_CONTINUE_MSG(if_level == -1, "Found unexpected '#elif' directive.");
+ ERR_CONTINUE_MSG(if_level == -1, "Found unexpected '#elif' directive. File: '" + p_filepath + "'.");
is_branch_being_compiled.write[if_level] = false;
} else if (directive == "else") {
- ERR_CONTINUE_MSG(if_level == -1, "Found unexpected '#else' directive.");
+ ERR_CONTINUE_MSG(if_level == -1, "Found unexpected '#else' directive. File: '" + p_filepath + "'.");
is_branch_being_compiled.write[if_level] = false;
} else if (directive == "endif") {
- ERR_CONTINUE_MSG(if_level == -1, "Found unexpected '#endif' directive.");
+ ERR_CONTINUE_MSG(if_level == -1, "Found unexpected '#endif' directive. File: '" + p_filepath + "'.");
is_branch_being_compiled.remove(if_level);
if_level--;
}
@@ -686,8 +687,6 @@ static void run_dummy_preprocessor(String &r_source) {
break;
}
}
-
- j++;
}
if (j == line_len) {
@@ -722,7 +721,7 @@ Error ScriptClassParser::parse_file(const String &p_filepath) {
" Please ensure that scripts are saved in valid UTF-8 unicode." :
"Failed to read file: '" + p_filepath + "'.");
- run_dummy_preprocessor(source);
+ run_dummy_preprocessor(source, p_filepath);
return parse(source);
}
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs
index 0462ef1125..1d1a49945f 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Color.cs
@@ -318,9 +318,9 @@ namespace Godot
return res;
}
- public int ToAbgr32()
+ public uint ToAbgr32()
{
- int c = (byte)Math.Round(a * 255);
+ uint c = (byte)Math.Round(a * 255);
c <<= 8;
c |= (byte)Math.Round(b * 255);
c <<= 8;
@@ -331,9 +331,9 @@ namespace Godot
return c;
}
- public long ToAbgr64()
+ public ulong ToAbgr64()
{
- long c = (ushort)Math.Round(a * 65535);
+ ulong c = (ushort)Math.Round(a * 65535);
c <<= 16;
c |= (ushort)Math.Round(b * 65535);
c <<= 16;
@@ -344,9 +344,9 @@ namespace Godot
return c;
}
- public int ToArgb32()
+ public uint ToArgb32()
{
- int c = (byte)Math.Round(a * 255);
+ uint c = (byte)Math.Round(a * 255);
c <<= 8;
c |= (byte)Math.Round(r * 255);
c <<= 8;
@@ -357,9 +357,9 @@ namespace Godot
return c;
}
- public long ToArgb64()
+ public ulong ToArgb64()
{
- long c = (ushort)Math.Round(a * 65535);
+ ulong c = (ushort)Math.Round(a * 65535);
c <<= 16;
c |= (ushort)Math.Round(r * 65535);
c <<= 16;
@@ -370,9 +370,9 @@ namespace Godot
return c;
}
- public int ToRgba32()
+ public uint ToRgba32()
{
- int c = (byte)Math.Round(r * 255);
+ uint c = (byte)Math.Round(r * 255);
c <<= 8;
c |= (byte)Math.Round(g * 255);
c <<= 8;
@@ -383,9 +383,9 @@ namespace Godot
return c;
}
- public long ToRgba64()
+ public ulong ToRgba64()
{
- long c = (ushort)Math.Round(r * 65535);
+ ulong c = (ushort)Math.Round(r * 65535);
c <<= 16;
c |= (ushort)Math.Round(g * 65535);
c <<= 16;
@@ -419,7 +419,7 @@ namespace Godot
this.a = a;
}
- public Color(int rgba)
+ public Color(uint rgba)
{
a = (rgba & 0xFF) / 255.0f;
rgba >>= 8;
@@ -430,7 +430,7 @@ namespace Godot
r = (rgba & 0xFF) / 255.0f;
}
- public Color(long rgba)
+ public Color(ulong rgba)
{
a = (rgba & 0xFFFF) / 65535.0f;
rgba >>= 16;
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/NodeExtensions.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/NodeExtensions.cs
index 5023725f17..5d16260f5d 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/NodeExtensions.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Extensions/NodeExtensions.cs
@@ -9,7 +9,7 @@ namespace Godot
public T GetNodeOrNull<T>(NodePath path) where T : class
{
- return GetNode(path) as T;
+ return GetNodeOrNull(path) as T;
}
public T GetChild<T>(int idx) where T : class
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs
index b926037e5a..e096d37a6f 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs
+++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs
@@ -474,7 +474,7 @@ namespace Godot
int source = 0;
int target = 0;
- while (instance[source] != 0 && text[target] != 0)
+ while (source < len && target < text.Length)
{
bool match;
@@ -491,7 +491,7 @@ namespace Godot
if (match)
{
source++;
- if (instance[source] == 0)
+ if (source >= len)
return true;
}
diff --git a/modules/mono/glue/gd_glue.cpp b/modules/mono/glue/gd_glue.cpp
index 9bea625450..17483c4457 100644
--- a/modules/mono/glue/gd_glue.cpp
+++ b/modules/mono/glue/gd_glue.cpp
@@ -235,7 +235,7 @@ MonoObject *godot_icall_GD_str2var(MonoString *p_str) {
Error err = VariantParser::parse(&ss, ret, errs, line);
if (err != OK) {
String err_str = "Parse error at line " + itos(line) + ": " + errs + ".";
- ERR_PRINTS(err_str);
+ ERR_PRINT(err_str);
ret = err_str;
}
@@ -247,11 +247,11 @@ MonoBoolean godot_icall_GD_type_exists(MonoString *p_type) {
}
void godot_icall_GD_pusherror(MonoString *p_str) {
- ERR_PRINTS(GDMonoMarshal::mono_string_to_godot(p_str));
+ ERR_PRINT(GDMonoMarshal::mono_string_to_godot(p_str));
}
void godot_icall_GD_pushwarning(MonoString *p_str) {
- WARN_PRINTS(GDMonoMarshal::mono_string_to_godot(p_str));
+ WARN_PRINT(GDMonoMarshal::mono_string_to_godot(p_str));
}
MonoArray *godot_icall_GD_var2bytes(MonoObject *p_var, MonoBoolean p_full_objects) {
diff --git a/modules/mono/mono_gd/gd_mono.cpp b/modules/mono/mono_gd/gd_mono.cpp
index 60008f8fab..895393537f 100644
--- a/modules/mono/mono_gd/gd_mono.cpp
+++ b/modules/mono/mono_gd/gd_mono.cpp
@@ -621,7 +621,7 @@ bool GDMono::copy_prebuilt_api_assembly(ApiAssemblyInfo::Type p_api_type, const
memdelete(da);
if (err != OK) {
- ERR_PRINTS("Failed to create destination directory for the API assemblies. Error: " + itos(err) + ".");
+ ERR_PRINT("Failed to create destination directory for the API assemblies. Error: " + itos(err) + ".");
return false;
}
}
@@ -630,15 +630,15 @@ bool GDMono::copy_prebuilt_api_assembly(ApiAssemblyInfo::Type p_api_type, const
String xml_file = assembly_name + ".xml";
if (da->copy(src_dir.plus_file(xml_file), dst_dir.plus_file(xml_file)) != OK)
- WARN_PRINTS("Failed to copy '" + xml_file + "'.");
+ WARN_PRINT("Failed to copy '" + xml_file + "'.");
String pdb_file = assembly_name + ".pdb";
if (da->copy(src_dir.plus_file(pdb_file), dst_dir.plus_file(pdb_file)) != OK)
- WARN_PRINTS("Failed to copy '" + pdb_file + "'.");
+ WARN_PRINT("Failed to copy '" + pdb_file + "'.");
String assembly_file = assembly_name + ".dll";
if (da->copy(src_dir.plus_file(assembly_file), dst_dir.plus_file(assembly_file)) != OK) {
- ERR_PRINTS("Failed to copy '" + assembly_file + "'.");
+ ERR_PRINT("Failed to copy '" + assembly_file + "'.");
return false;
}
@@ -1115,7 +1115,7 @@ Error GDMono::finalize_and_unload_domain(MonoDomain *p_domain) {
mono_domain_try_unload(p_domain, (MonoObject **)&exc);
if (exc) {
- ERR_PRINTS("Exception thrown when unloading domain '" + domain_name + "'.");
+ ERR_PRINT("Exception thrown when unloading domain '" + domain_name + "'.");
GDMonoUtils::debug_print_unhandled_exception(exc);
return FAILED;
}
diff --git a/modules/mono/mono_gd/gd_mono_android.cpp b/modules/mono/mono_gd/gd_mono_android.cpp
index 27f394fae0..761368878f 100644
--- a/modules/mono/mono_gd/gd_mono_android.cpp
+++ b/modules/mono/mono_gd/gd_mono_android.cpp
@@ -315,7 +315,7 @@ MonoArray *_gd_mono_android_cert_store_lookup(MonoString *p_alias) {
char *alias_utf8 = mono_string_to_utf8_checked(p_alias, &mono_error);
if (!mono_error_ok(&mono_error)) {
- ERR_PRINTS(String() + "Failed to convert MonoString* to UTF-8: '" + mono_error_get_message(&mono_error) + "'.");
+ ERR_PRINT(String() + "Failed to convert MonoString* to UTF-8: '" + mono_error_get_message(&mono_error) + "'.");
mono_error_cleanup(&mono_error);
return NULL;
}
diff --git a/modules/mono/mono_gd/gd_mono_class.cpp b/modules/mono/mono_gd/gd_mono_class.cpp
index 2132fd36f7..648f5f6c6b 100644
--- a/modules/mono/mono_gd/gd_mono_class.cpp
+++ b/modules/mono/mono_gd/gd_mono_class.cpp
@@ -166,8 +166,8 @@ void GDMonoClass::fetch_methods_with_godot_api_checks(GDMonoClass *p_native_base
#ifdef DEBUG_ENABLED
String fullname = method->get_ret_type_full_name() + " " + name + "(" + method->get_signature_desc(true) + ")";
- WARN_PRINTS("Method '" + fullname + "' is hidden by Godot API method. Should be '" +
- method->get_full_name_no_class() + "'. In class '" + namespace_name + "." + class_name + "'.");
+ WARN_PRINT("Method '" + fullname + "' is hidden by Godot API method. Should be '" +
+ method->get_full_name_no_class() + "'. In class '" + namespace_name + "." + class_name + "'.");
#endif
continue;
}
@@ -185,8 +185,8 @@ void GDMonoClass::fetch_methods_with_godot_api_checks(GDMonoClass *p_native_base
if (m && m->get_name() != name) {
// found
String fullname = m->get_ret_type_full_name() + " " + name + "(" + m->get_signature_desc(true) + ")";
- WARN_PRINTS("Method '" + fullname + "' should be '" + m->get_full_name_no_class() +
- "'. In class '" + namespace_name + "." + class_name + "'.");
+ WARN_PRINT("Method '" + fullname + "' should be '" + m->get_full_name_no_class() +
+ "'. In class '" + namespace_name + "." + class_name + "'.");
break;
}
diff --git a/modules/mono/mono_gd/gd_mono_field.cpp b/modules/mono/mono_gd/gd_mono_field.cpp
index 3e0f9a3f15..178647b968 100644
--- a/modules/mono/mono_gd/gd_mono_field.cpp
+++ b/modules/mono/mono_gd/gd_mono_field.cpp
@@ -512,7 +512,7 @@ void GDMonoField::set_value_from_variant(MonoObject *p_object, const Variant &p_
} break;
default: {
- ERR_PRINTS("Attempted to set the value of a field of unexpected type encoding: " + itos(type.type_encoding) + ".");
+ ERR_PRINT("Attempted to set the value of a field of unexpected type encoding: " + itos(type.type_encoding) + ".");
} break;
}
diff --git a/modules/mono/mono_gd/gd_mono_log.cpp b/modules/mono/mono_gd/gd_mono_log.cpp
index ad68a4d90e..76828a66e0 100644
--- a/modules/mono/mono_gd/gd_mono_log.cpp
+++ b/modules/mono/mono_gd/gd_mono_log.cpp
@@ -83,7 +83,7 @@ void GDMonoLog::mono_log_callback(const char *log_domain, const char *log_level,
}
if (fatal) {
- ERR_PRINTS("Mono: FATAL ERROR, ABORTING! Logfile: '" + GDMonoLog::get_singleton()->log_file_path + "'.");
+ ERR_PRINT("Mono: FATAL ERROR, ABORTING! Logfile: '" + GDMonoLog::get_singleton()->log_file_path + "'.");
// Make sure to flush before aborting
f->flush();
f->close();
@@ -139,7 +139,7 @@ void GDMonoLog::initialize() {
CharString log_level = OS::get_singleton()->get_environment("GODOT_MONO_LOG_LEVEL").utf8();
if (log_level.length() != 0 && get_log_level_id(log_level.get_data()) == -1) {
- ERR_PRINTS(String() + "Mono: Ignoring invalid log level (GODOT_MONO_LOG_LEVEL): '" + log_level.get_data() + "'.");
+ ERR_PRINT(String() + "Mono: Ignoring invalid log level (GODOT_MONO_LOG_LEVEL): '" + log_level.get_data() + "'.");
log_level = CharString();
}
@@ -167,7 +167,7 @@ void GDMonoLog::initialize() {
log_file = FileAccess::open(log_file_path, FileAccess::WRITE);
if (!log_file) {
- ERR_PRINTS("Mono: Cannot create log file at: " + log_file_path);
+ ERR_PRINT("Mono: Cannot create log file at: " + log_file_path);
}
}
diff --git a/modules/mono/mono_gd/gd_mono_marshal.cpp b/modules/mono/mono_gd/gd_mono_marshal.cpp
index b81c20348d..19d627218e 100644
--- a/modules/mono/mono_gd/gd_mono_marshal.cpp
+++ b/modules/mono/mono_gd/gd_mono_marshal.cpp
@@ -277,7 +277,7 @@ String mono_to_utf8_string(MonoString *p_mono_string) {
char *utf8 = mono_string_to_utf8_checked(p_mono_string, &error);
if (!mono_error_ok(&error)) {
- ERR_PRINTS(String() + "Failed to convert MonoString* to UTF-8: '" + mono_error_get_message(&error) + "'.");
+ ERR_PRINT(String() + "Failed to convert MonoString* to UTF-8: '" + mono_error_get_message(&error) + "'.");
mono_error_cleanup(&error);
return String();
}
diff --git a/modules/mono/mono_gd/gd_mono_utils.cpp b/modules/mono/mono_gd/gd_mono_utils.cpp
index 4e7f590a69..05077a00c4 100644
--- a/modules/mono/mono_gd/gd_mono_utils.cpp
+++ b/modules/mono/mono_gd/gd_mono_utils.cpp
@@ -354,7 +354,7 @@ void debug_send_unhandled_exception_error(MonoException *p_exc) {
if (!ScriptDebugger::get_singleton()) {
#ifdef TOOLS_ENABLED
if (Engine::get_singleton()->is_editor_hint()) {
- ERR_PRINTS(GDMonoUtils::get_exception_name_and_message(p_exc));
+ ERR_PRINT(GDMonoUtils::get_exception_name_and_message(p_exc));
}
#endif
return;
@@ -431,7 +431,7 @@ void set_pending_exception(MonoException *p_exc) {
}
if (!mono_runtime_set_pending_exception(p_exc, false)) {
- ERR_PRINTS("Exception thrown from managed code, but it could not be set as pending:");
+ ERR_PRINT("Exception thrown from managed code, but it could not be set as pending:");
GDMonoUtils::debug_print_unhandled_exception(p_exc);
}
#endif
diff --git a/modules/opensimplex/doc_classes/NoiseTexture.xml b/modules/opensimplex/doc_classes/NoiseTexture.xml
index 07d5eb27d6..0790cde557 100644
--- a/modules/opensimplex/doc_classes/NoiseTexture.xml
+++ b/modules/opensimplex/doc_classes/NoiseTexture.xml
@@ -1,11 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NoiseTexture" inherits="Texture" category="Core" version="3.2">
+<class name="NoiseTexture" inherits="Texture" version="4.0">
<brief_description>
[OpenSimplexNoise] filled texture.
</brief_description>
<description>
Uses an [OpenSimplexNoise] to fill the texture data. You can specify the texture size but keep in mind that larger textures will take longer to generate and seamless noise only works with square sized textures.
NoiseTexture can also generate normalmap textures.
+ The class uses [Thread]s to generate the texture data internally, so [method Texture.get_data] may return [code]null[/code] if the generation process has not completed yet. In that case, you need to wait for the texture to be generated before accessing the data:
+ [codeblock]
+ var texture = preload("res://noise.tres")
+ yield(texture, "changed")
+ var image = texture.get_data()
+ [/codeblock]
</description>
<tutorials>
</tutorials>
@@ -16,6 +22,7 @@
If [code]true[/code], the resulting texture contains a normal map created from the original noise interpreted as a bump map.
</member>
<member name="bump_strength" type="float" setter="set_bump_strength" getter="get_bump_strength" default="8.0">
+ Strength of the bump maps used in this texture. A higher value will make the bump maps appear larger while a lower value will make them appear softer.
</member>
<member name="flags" type="int" setter="set_flags" getter="get_flags" override="true" default="7" />
<member name="height" type="int" setter="set_height" getter="get_height" default="512">
diff --git a/modules/opensimplex/doc_classes/OpenSimplexNoise.xml b/modules/opensimplex/doc_classes/OpenSimplexNoise.xml
index f3fbbab3da..d89828037f 100644
--- a/modules/opensimplex/doc_classes/OpenSimplexNoise.xml
+++ b/modules/opensimplex/doc_classes/OpenSimplexNoise.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="OpenSimplexNoise" inherits="Resource" category="Core" version="3.2">
+<class name="OpenSimplexNoise" inherits="Resource" version="4.0">
<brief_description>
Noise generator based on Open Simplex.
</brief_description>
@@ -117,7 +117,8 @@
Difference in period between [member octaves].
</member>
<member name="octaves" type="int" setter="set_octaves" getter="get_octaves" default="3">
- Number of OpenSimplex noise layers that are sampled to get the fractal noise.
+ Number of OpenSimplex noise layers that are sampled to get the fractal noise. Higher values result in more detailed noise but take more time to generate.
+ [b]Note:[/b] The maximum allowed value is 9.
</member>
<member name="period" type="float" setter="set_period" getter="get_period" default="64.0">
Period of the base octave. A lower period results in a higher-frequency noise (more value changes across the same distance).
diff --git a/modules/opensimplex/open_simplex_noise.cpp b/modules/opensimplex/open_simplex_noise.cpp
index c99588aefa..bd187e6b5b 100644
--- a/modules/opensimplex/open_simplex_noise.cpp
+++ b/modules/opensimplex/open_simplex_noise.cpp
@@ -47,7 +47,7 @@ OpenSimplexNoise::~OpenSimplexNoise() {
}
void OpenSimplexNoise::_init_seeds() {
- for (int i = 0; i < 6; ++i) {
+ for (int i = 0; i < MAX_OCTAVES; ++i) {
open_simplex_noise(seed + i * 2, &(contexts[i]));
}
}
@@ -71,7 +71,10 @@ int OpenSimplexNoise::get_seed() {
void OpenSimplexNoise::set_octaves(int p_octaves) {
if (p_octaves == octaves) return;
- octaves = CLAMP(p_octaves, 1, 6);
+
+ ERR_FAIL_COND_MSG(p_octaves > MAX_OCTAVES, vformat("The number of OpenSimplexNoise octaves is limited to %d; ignoring the new value.", MAX_OCTAVES));
+
+ octaves = CLAMP(p_octaves, 1, MAX_OCTAVES);
emit_changed();
}
@@ -182,7 +185,7 @@ void OpenSimplexNoise::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_noise_3dv", "pos"), &OpenSimplexNoise::get_noise_3dv);
ADD_PROPERTY(PropertyInfo(Variant::INT, "seed"), "set_seed", "get_seed");
- ADD_PROPERTY(PropertyInfo(Variant::INT, "octaves", PROPERTY_HINT_RANGE, "1,6,1"), "set_octaves", "get_octaves");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "octaves", PROPERTY_HINT_RANGE, vformat("1,%d,1", MAX_OCTAVES)), "set_octaves", "get_octaves");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "period", PROPERTY_HINT_RANGE, "0.1,256.0,0.1"), "set_period", "get_period");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "persistence", PROPERTY_HINT_RANGE, "0.0,1.0,0.001"), "set_persistence", "get_persistence");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "lacunarity", PROPERTY_HINT_RANGE, "0.1,4.0,0.01"), "set_lacunarity", "get_lacunarity");
diff --git a/modules/opensimplex/open_simplex_noise.h b/modules/opensimplex/open_simplex_noise.h
index 89b12253b9..dce62bc1f9 100644
--- a/modules/opensimplex/open_simplex_noise.h
+++ b/modules/opensimplex/open_simplex_noise.h
@@ -37,11 +37,16 @@
#include "thirdparty/misc/open-simplex-noise.h"
+// The maximum number of octaves allowed. Note that these are statically allocated.
+// Higher values become exponentially slower, so this shouldn't be set too high
+// to avoid freezing the editor for long periods of time.
+#define MAX_OCTAVES 9
+
class OpenSimplexNoise : public Resource {
GDCLASS(OpenSimplexNoise, Resource);
OBJ_SAVE_TYPE(OpenSimplexNoise);
- osn_context contexts[6];
+ osn_context contexts[MAX_OCTAVES];
int seed;
float persistence; // Controls details, value in [0,1]. Higher increases grain, lower increases smoothness.
diff --git a/modules/recast/navigation_mesh_generator.cpp b/modules/recast/navigation_mesh_generator.cpp
index c67136b814..b6f5b38038 100644
--- a/modules/recast/navigation_mesh_generator.cpp
+++ b/modules/recast/navigation_mesh_generator.cpp
@@ -29,6 +29,7 @@
/*************************************************************************/
#include "navigation_mesh_generator.h"
+
#include "core/math/quick_hull.h"
#include "core/os/thread.h"
#include "editor/editor_settings.h"
@@ -45,10 +46,10 @@
#include "scene/resources/shape.h"
#include "scene/resources/sphere_shape.h"
+#include "modules/modules_enabled.gen.h"
#ifdef MODULE_CSG_ENABLED
#include "modules/csg/csg_shape.h"
#endif
-
#ifdef MODULE_GRIDMAP_ENABLED
#include "modules/gridmap/grid_map.h"
#endif
diff --git a/modules/regex/doc_classes/RegEx.xml b/modules/regex/doc_classes/RegEx.xml
index 0ce2acacbe..e9f46b9853 100644
--- a/modules/regex/doc_classes/RegEx.xml
+++ b/modules/regex/doc_classes/RegEx.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RegEx" inherits="Reference" category="Core" version="3.2">
+<class name="RegEx" inherits="Reference" version="4.0">
<brief_description>
Class for searching text for patterns using regular expressions.
</brief_description>
diff --git a/modules/regex/doc_classes/RegExMatch.xml b/modules/regex/doc_classes/RegExMatch.xml
index 6dec9fc516..151e881b6f 100644
--- a/modules/regex/doc_classes/RegExMatch.xml
+++ b/modules/regex/doc_classes/RegExMatch.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="RegExMatch" inherits="Reference" category="Core" version="3.2">
+<class name="RegExMatch" inherits="Reference" version="4.0">
<brief_description>
Contains the results of a [RegEx] search.
</brief_description>
diff --git a/modules/register_module_types.h b/modules/register_module_types.h
index a8eb68b929..b410457201 100644
--- a/modules/register_module_types.h
+++ b/modules/register_module_types.h
@@ -31,9 +31,7 @@
#ifndef REGISTER_MODULE_TYPES_H
#define REGISTER_MODULE_TYPES_H
-//
-
void register_module_types();
void unregister_module_types();
-#endif
+#endif // REGISTER_MODULE_TYPES_H
diff --git a/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp b/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp
index b80b126bde..f2d0f5c9a6 100644
--- a/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp
+++ b/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp
@@ -57,7 +57,7 @@ void AudioStreamPlaybackOGGVorbis::_mix_internal(AudioFrame *p_buffer, int p_fra
if (todo) {
//end of file!
- if (vorbis_stream->loop) {
+ if (vorbis_stream->loop && mixed > 0) {
//loop
seek(vorbis_stream->loop_offset);
loops++;
diff --git a/modules/stb_vorbis/audio_stream_ogg_vorbis.h b/modules/stb_vorbis/audio_stream_ogg_vorbis.h
index cfa5e97faa..e909759acb 100644
--- a/modules/stb_vorbis/audio_stream_ogg_vorbis.h
+++ b/modules/stb_vorbis/audio_stream_ogg_vorbis.h
@@ -73,7 +73,7 @@ public:
class AudioStreamOGGVorbis : public AudioStream {
GDCLASS(AudioStreamOGGVorbis, AudioStream);
- OBJ_SAVE_TYPE(AudioStream) //children are all saved as AudioStream, so they can be exchanged
+ OBJ_SAVE_TYPE(AudioStream); // Saves derived classes with common type so they can be interchanged.
RES_BASE_EXTENSION("oggstr");
friend class AudioStreamPlaybackOGGVorbis;
diff --git a/modules/stb_vorbis/doc_classes/AudioStreamOGGVorbis.xml b/modules/stb_vorbis/doc_classes/AudioStreamOGGVorbis.xml
index 102a9b4236..38d3bd5468 100644
--- a/modules/stb_vorbis/doc_classes/AudioStreamOGGVorbis.xml
+++ b/modules/stb_vorbis/doc_classes/AudioStreamOGGVorbis.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="AudioStreamOGGVorbis" inherits="AudioStream" category="Core" version="3.2">
+<class name="AudioStreamOGGVorbis" inherits="AudioStream" version="4.0">
<brief_description>
OGG Vorbis audio stream driver.
</brief_description>
diff --git a/modules/svg/SCsub b/modules/svg/SCsub
index 9324c1634b..7961d1f33e 100644
--- a/modules/svg/SCsub
+++ b/modules/svg/SCsub
@@ -13,10 +13,6 @@ thirdparty_sources = [
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
env_svg.Prepend(CPPPATH=[thirdparty_dir])
-# FIXME: Needed in editor/editor_themes.cpp for now, but ideally there
-# shouldn't be a dependency on modules/ and its own 3rd party deps.
-env.Prepend(CPPPATH=[thirdparty_dir])
-env.Append(CPPDEFINES=["SVG_ENABLED"])
env_thirdparty = env_svg.Clone()
env_thirdparty.disable_warnings()
diff --git a/modules/svg/image_loader_svg.cpp b/modules/svg/image_loader_svg.cpp
index 57097aaa06..7f91908a33 100644
--- a/modules/svg/image_loader_svg.cpp
+++ b/modules/svg/image_loader_svg.cpp
@@ -30,9 +30,8 @@
#include "image_loader_svg.h"
-#include "core/os/os.h"
-#include "core/print_string.h"
-#include "core/ustring.h"
+#include <nanosvg.h>
+#include <nanosvgrast.h>
void SVGRasterizer::rasterize(NSVGimage *p_image, float p_tx, float p_ty, float p_scale, unsigned char *p_dst, int p_w, int p_h, int p_stride) {
nsvgRasterize(rasterizer, p_image, p_tx, p_ty, p_scale, p_dst, p_w, p_h, p_stride);
@@ -103,15 +102,17 @@ Error ImageLoaderSVG::_create_image(Ref<Image> p_image, const PoolVector<uint8_t
ERR_PRINT("SVG Corrupted");
return ERR_FILE_CORRUPT;
}
- if (convert_colors)
+
+ if (convert_colors) {
_convert_colors(svg_image);
+ }
- float upscale = upsample ? 2.0 : 1.0;
+ const float upscale = upsample ? 2.0 : 1.0;
- int w = (int)(svg_image->width * p_scale * upscale);
+ const int w = (int)(svg_image->width * p_scale * upscale);
ERR_FAIL_COND_V_MSG(w > Image::MAX_WIDTH, ERR_PARAMETER_RANGE_ERROR, vformat("Can't create image from SVG with scale %s, the resulting image size exceeds max width.", rtos(p_scale)));
- int h = (int)(svg_image->height * p_scale * upscale);
+ const int h = (int)(svg_image->height * p_scale * upscale);
ERR_FAIL_COND_V_MSG(h > Image::MAX_HEIGHT, ERR_PARAMETER_RANGE_ERROR, vformat("Can't create image from SVG with scale %s, the resulting image size exceeds max height.", rtos(p_scale)));
PoolVector<uint8_t> dst_image;
@@ -123,8 +124,9 @@ Error ImageLoaderSVG::_create_image(Ref<Image> p_image, const PoolVector<uint8_t
dw.release();
p_image->create(w, h, false, Image::FORMAT_RGBA8, dst_image);
- if (upsample)
+ if (upsample) {
p_image->shrink_x2();
+ }
nsvgDelete(svg_image);
diff --git a/modules/svg/image_loader_svg.h b/modules/svg/image_loader_svg.h
index 9e9366e91b..24cee82480 100644
--- a/modules/svg/image_loader_svg.h
+++ b/modules/svg/image_loader_svg.h
@@ -34,13 +34,14 @@
#include "core/io/image_loader.h"
#include "core/ustring.h"
-#include <nanosvg.h>
-#include <nanosvgrast.h>
-
/**
@author Daniel Ramirez <djrmuv@gmail.com>
*/
+// Forward declare and include thirdparty headers in .cpp.
+struct NSVGrasterizer;
+struct NSVGimage;
+
class SVGRasterizer {
NSVGrasterizer *rasterizer;
diff --git a/modules/theora/doc_classes/VideoStreamTheora.xml b/modules/theora/doc_classes/VideoStreamTheora.xml
index 696101e252..92244a4d28 100644
--- a/modules/theora/doc_classes/VideoStreamTheora.xml
+++ b/modules/theora/doc_classes/VideoStreamTheora.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VideoStreamTheora" inherits="VideoStream" category="Core" version="3.2">
+<class name="VideoStreamTheora" inherits="VideoStream" version="4.0">
<brief_description>
+ [VideoStream] resource for Ogg Theora videos.
</brief_description>
<description>
+ [VideoStream] resource handling the [url=https://www.theora.org/]Ogg Theora[/url] video format with [code].ogv[/code] extension.
</description>
<tutorials>
</tutorials>
@@ -11,6 +13,7 @@
<return type="String">
</return>
<description>
+ Returns the Ogg Theora video file handled by this [VideoStreamTheora].
</description>
</method>
<method name="set_file">
@@ -19,6 +22,7 @@
<argument index="0" name="file" type="String">
</argument>
<description>
+ Sets the Ogg Theora video file that this [VideoStreamTheora] resource handles. The [code]file[/code] name should have the [code].o[/code] extension.
</description>
</method>
</methods>
diff --git a/modules/theora/video_stream_theora.cpp b/modules/theora/video_stream_theora.cpp
index 9ba77d3c77..00c7e87568 100644
--- a/modules/theora/video_stream_theora.cpp
+++ b/modules/theora/video_stream_theora.cpp
@@ -147,7 +147,6 @@ void VideoStreamPlaybackTheora::clear() {
thread = NULL;
ring_buffer.clear();
#endif
- //file_name = "";
theora_p = 0;
vorbis_p = 0;
@@ -364,8 +363,10 @@ void VideoStreamPlaybackTheora::set_file(const String &p_file) {
};
float VideoStreamPlaybackTheora::get_time() const {
-
- return time - AudioServer::get_singleton()->get_output_latency() - delay_compensation; //-((get_total())/(float)vi.rate);
+ // FIXME: AudioServer output latency was fixed in af9bb0e, previously it used to
+ // systematically return 0. Now that it gives a proper latency, it broke this
+ // code where the delay compensation likely never really worked.
+ return time - /* AudioServer::get_singleton()->get_output_latency() - */ delay_compensation;
};
Ref<Texture> VideoStreamPlaybackTheora::get_texture() const {
diff --git a/modules/tinyexr/image_loader_tinyexr.cpp b/modules/tinyexr/image_loader_tinyexr.cpp
index bca3b749e3..79cb135abb 100644
--- a/modules/tinyexr/image_loader_tinyexr.cpp
+++ b/modules/tinyexr/image_loader_tinyexr.cpp
@@ -69,7 +69,7 @@ Error ImageLoaderTinyEXR::load_image(Ref<Image> p_image, FileAccess *f, bool p_f
ret = ParseEXRHeaderFromMemory(&exr_header, &exr_version, w.ptr(), src_image_len, &err);
if (ret != TINYEXR_SUCCESS) {
if (err) {
- ERR_PRINTS(String(err));
+ ERR_PRINT(String(err));
}
return ERR_FILE_CORRUPT;
}
@@ -85,7 +85,7 @@ Error ImageLoaderTinyEXR::load_image(Ref<Image> p_image, FileAccess *f, bool p_f
ret = LoadEXRImageFromMemory(&exr_image, &exr_header, w.ptr(), src_image_len, &err);
if (ret != TINYEXR_SUCCESS) {
if (err) {
- ERR_PRINTS(String(err));
+ ERR_PRINT(String(err));
}
return ERR_FILE_CORRUPT;
}
diff --git a/modules/upnp/doc_classes/UPNP.xml b/modules/upnp/doc_classes/UPNP.xml
index aac0932995..8549c173db 100644
--- a/modules/upnp/doc_classes/UPNP.xml
+++ b/modules/upnp/doc_classes/UPNP.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="UPNP" inherits="Reference" category="Core" version="3.2">
+<class name="UPNP" inherits="Reference" version="4.0">
<brief_description>
UPNP network functions.
</brief_description>
diff --git a/modules/upnp/doc_classes/UPNPDevice.xml b/modules/upnp/doc_classes/UPNPDevice.xml
index 4d3a0f4f1d..f3b96bb89d 100644
--- a/modules/upnp/doc_classes/UPNPDevice.xml
+++ b/modules/upnp/doc_classes/UPNPDevice.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="UPNPDevice" inherits="Reference" category="Core" version="3.2">
+<class name="UPNPDevice" inherits="Reference" version="4.0">
<brief_description>
UPNP device.
</brief_description>
diff --git a/modules/visual_script/doc_classes/@VisualScript.xml b/modules/visual_script/doc_classes/@VisualScript.xml
index 8d9408e6d4..a2b966bfbb 100644
--- a/modules/visual_script/doc_classes/@VisualScript.xml
+++ b/modules/visual_script/doc_classes/@VisualScript.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="@VisualScript" category="Core" version="3.2">
+<class name="@VisualScript" version="4.0">
<brief_description>
Built-in visual script functions.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScript.xml b/modules/visual_script/doc_classes/VisualScript.xml
index 0d95075152..9cd79aa781 100644
--- a/modules/visual_script/doc_classes/VisualScript.xml
+++ b/modules/visual_script/doc_classes/VisualScript.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScript" inherits="Script" category="Core" version="3.2">
+<class name="VisualScript" inherits="Script" version="4.0">
<brief_description>
A script implemented in the Visual Script programming environment.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml b/modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml
index 6dc54dbc03..c8e391c4a1 100644
--- a/modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml
+++ b/modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptBasicTypeConstant" inherits="VisualScriptNode" category="Core" version="3.2">
+<class name="VisualScriptBasicTypeConstant" inherits="VisualScriptNode" version="4.0">
<brief_description>
A Visual Script node representing a constant from the base types.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml b/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml
index a6febb0b1c..95085d9652 100644
--- a/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml
+++ b/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptBuiltinFunc" inherits="VisualScriptNode" category="Core" version="3.2">
+<class name="VisualScriptBuiltinFunc" inherits="VisualScriptNode" version="4.0">
<brief_description>
A Visual Script node used to call built-in functions.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptClassConstant.xml b/modules/visual_script/doc_classes/VisualScriptClassConstant.xml
index 49ea7850ef..cf35808823 100644
--- a/modules/visual_script/doc_classes/VisualScriptClassConstant.xml
+++ b/modules/visual_script/doc_classes/VisualScriptClassConstant.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptClassConstant" inherits="VisualScriptNode" category="Core" version="3.2">
+<class name="VisualScriptClassConstant" inherits="VisualScriptNode" version="4.0">
<brief_description>
Gets a constant from a given class.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptComment.xml b/modules/visual_script/doc_classes/VisualScriptComment.xml
index 2538bc8356..243338ea52 100644
--- a/modules/visual_script/doc_classes/VisualScriptComment.xml
+++ b/modules/visual_script/doc_classes/VisualScriptComment.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptComment" inherits="VisualScriptNode" category="Core" version="3.2">
+<class name="VisualScriptComment" inherits="VisualScriptNode" version="4.0">
<brief_description>
A Visual Script node used to annotate the script.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptComposeArray.xml b/modules/visual_script/doc_classes/VisualScriptComposeArray.xml
index 92efbc51d1..dec182abf6 100644
--- a/modules/visual_script/doc_classes/VisualScriptComposeArray.xml
+++ b/modules/visual_script/doc_classes/VisualScriptComposeArray.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptComposeArray" inherits="VisualScriptLists" category="Core" version="3.2">
+<class name="VisualScriptComposeArray" inherits="VisualScriptLists" version="4.0">
<brief_description>
A Visual Script Node used to create array from a list of items.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptCondition.xml b/modules/visual_script/doc_classes/VisualScriptCondition.xml
index 12d85429cf..a9981c1f57 100644
--- a/modules/visual_script/doc_classes/VisualScriptCondition.xml
+++ b/modules/visual_script/doc_classes/VisualScriptCondition.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptCondition" inherits="VisualScriptNode" category="Core" version="3.2">
+<class name="VisualScriptCondition" inherits="VisualScriptNode" version="4.0">
<brief_description>
A Visual Script node which branches the flow.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptConstant.xml b/modules/visual_script/doc_classes/VisualScriptConstant.xml
index eb12fc3731..69676c4bba 100644
--- a/modules/visual_script/doc_classes/VisualScriptConstant.xml
+++ b/modules/visual_script/doc_classes/VisualScriptConstant.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptConstant" inherits="VisualScriptNode" category="Core" version="3.2">
+<class name="VisualScriptConstant" inherits="VisualScriptNode" version="4.0">
<brief_description>
Gets a contant's value.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptConstructor.xml b/modules/visual_script/doc_classes/VisualScriptConstructor.xml
index 8da5055d83..2f162e78b6 100644
--- a/modules/visual_script/doc_classes/VisualScriptConstructor.xml
+++ b/modules/visual_script/doc_classes/VisualScriptConstructor.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptConstructor" inherits="VisualScriptNode" category="Core" version="3.2">
+<class name="VisualScriptConstructor" inherits="VisualScriptNode" version="4.0">
<brief_description>
A Visual Script node which calls a base type constructor.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptCustomNode.xml b/modules/visual_script/doc_classes/VisualScriptCustomNode.xml
index f70e22c7d0..1c23b58507 100644
--- a/modules/visual_script/doc_classes/VisualScriptCustomNode.xml
+++ b/modules/visual_script/doc_classes/VisualScriptCustomNode.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptCustomNode" inherits="VisualScriptNode" category="Core" version="3.2">
+<class name="VisualScriptCustomNode" inherits="VisualScriptNode" version="4.0">
<brief_description>
A scripted Visual Script node.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptDeconstruct.xml b/modules/visual_script/doc_classes/VisualScriptDeconstruct.xml
index c8543287b4..530c80530e 100644
--- a/modules/visual_script/doc_classes/VisualScriptDeconstruct.xml
+++ b/modules/visual_script/doc_classes/VisualScriptDeconstruct.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptDeconstruct" inherits="VisualScriptNode" category="Core" version="3.2">
+<class name="VisualScriptDeconstruct" inherits="VisualScriptNode" version="4.0">
<brief_description>
A Visual Script node which deconstructs a base type instance into its parts.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptEditor.xml b/modules/visual_script/doc_classes/VisualScriptEditor.xml
index add2eb2275..186cd21239 100644
--- a/modules/visual_script/doc_classes/VisualScriptEditor.xml
+++ b/modules/visual_script/doc_classes/VisualScriptEditor.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptEditor" inherits="Object" category="Core" version="3.2">
+<class name="VisualScriptEditor" inherits="Object" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptEmitSignal.xml b/modules/visual_script/doc_classes/VisualScriptEmitSignal.xml
index 1a567905a9..60a19ac7a7 100644
--- a/modules/visual_script/doc_classes/VisualScriptEmitSignal.xml
+++ b/modules/visual_script/doc_classes/VisualScriptEmitSignal.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptEmitSignal" inherits="VisualScriptNode" category="Core" version="3.2">
+<class name="VisualScriptEmitSignal" inherits="VisualScriptNode" version="4.0">
<brief_description>
Emits a specified signal.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptEngineSingleton.xml b/modules/visual_script/doc_classes/VisualScriptEngineSingleton.xml
index 836eef93ab..8b7fd3a612 100644
--- a/modules/visual_script/doc_classes/VisualScriptEngineSingleton.xml
+++ b/modules/visual_script/doc_classes/VisualScriptEngineSingleton.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptEngineSingleton" inherits="VisualScriptNode" category="Core" version="3.2">
+<class name="VisualScriptEngineSingleton" inherits="VisualScriptNode" version="4.0">
<brief_description>
A Visual Script node returning a singleton from [@GlobalScope].
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptExpression.xml b/modules/visual_script/doc_classes/VisualScriptExpression.xml
index eb6cdbb302..5253f7bc7d 100644
--- a/modules/visual_script/doc_classes/VisualScriptExpression.xml
+++ b/modules/visual_script/doc_classes/VisualScriptExpression.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptExpression" inherits="VisualScriptNode" category="Core" version="3.2">
+<class name="VisualScriptExpression" inherits="VisualScriptNode" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptFunction.xml b/modules/visual_script/doc_classes/VisualScriptFunction.xml
index 152b48ca89..873d26a5be 100644
--- a/modules/visual_script/doc_classes/VisualScriptFunction.xml
+++ b/modules/visual_script/doc_classes/VisualScriptFunction.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptFunction" inherits="VisualScriptNode" category="Core" version="3.2">
+<class name="VisualScriptFunction" inherits="VisualScriptNode" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptFunctionCall.xml b/modules/visual_script/doc_classes/VisualScriptFunctionCall.xml
index f7f86e8c80..16c3af7ab2 100644
--- a/modules/visual_script/doc_classes/VisualScriptFunctionCall.xml
+++ b/modules/visual_script/doc_classes/VisualScriptFunctionCall.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptFunctionCall" inherits="VisualScriptNode" category="Core" version="3.2">
+<class name="VisualScriptFunctionCall" inherits="VisualScriptNode" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptFunctionState.xml b/modules/visual_script/doc_classes/VisualScriptFunctionState.xml
index a8e820e6ea..68083614a6 100644
--- a/modules/visual_script/doc_classes/VisualScriptFunctionState.xml
+++ b/modules/visual_script/doc_classes/VisualScriptFunctionState.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptFunctionState" inherits="Reference" category="Core" version="3.2">
+<class name="VisualScriptFunctionState" inherits="Reference" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptGlobalConstant.xml b/modules/visual_script/doc_classes/VisualScriptGlobalConstant.xml
index 6c70dc7dc4..ef17bd8a28 100644
--- a/modules/visual_script/doc_classes/VisualScriptGlobalConstant.xml
+++ b/modules/visual_script/doc_classes/VisualScriptGlobalConstant.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptGlobalConstant" inherits="VisualScriptNode" category="Core" version="3.2">
+<class name="VisualScriptGlobalConstant" inherits="VisualScriptNode" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptIndexGet.xml b/modules/visual_script/doc_classes/VisualScriptIndexGet.xml
index ba0dc1a3d0..bb1618a655 100644
--- a/modules/visual_script/doc_classes/VisualScriptIndexGet.xml
+++ b/modules/visual_script/doc_classes/VisualScriptIndexGet.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptIndexGet" inherits="VisualScriptNode" category="Core" version="3.2">
+<class name="VisualScriptIndexGet" inherits="VisualScriptNode" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptIndexSet.xml b/modules/visual_script/doc_classes/VisualScriptIndexSet.xml
index 09a8f2c8ad..4ff96f7211 100644
--- a/modules/visual_script/doc_classes/VisualScriptIndexSet.xml
+++ b/modules/visual_script/doc_classes/VisualScriptIndexSet.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptIndexSet" inherits="VisualScriptNode" category="Core" version="3.2">
+<class name="VisualScriptIndexSet" inherits="VisualScriptNode" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptInputAction.xml b/modules/visual_script/doc_classes/VisualScriptInputAction.xml
index 8c942813b2..0b6325bf0a 100644
--- a/modules/visual_script/doc_classes/VisualScriptInputAction.xml
+++ b/modules/visual_script/doc_classes/VisualScriptInputAction.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptInputAction" inherits="VisualScriptNode" category="Core" version="3.2">
+<class name="VisualScriptInputAction" inherits="VisualScriptNode" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptIterator.xml b/modules/visual_script/doc_classes/VisualScriptIterator.xml
index 782bbfae20..1d4ab4daa9 100644
--- a/modules/visual_script/doc_classes/VisualScriptIterator.xml
+++ b/modules/visual_script/doc_classes/VisualScriptIterator.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptIterator" inherits="VisualScriptNode" category="Core" version="3.2">
+<class name="VisualScriptIterator" inherits="VisualScriptNode" version="4.0">
<brief_description>
Steps through items in a given input.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptLists.xml b/modules/visual_script/doc_classes/VisualScriptLists.xml
index 8cf3eb1d38..5b64d8438b 100644
--- a/modules/visual_script/doc_classes/VisualScriptLists.xml
+++ b/modules/visual_script/doc_classes/VisualScriptLists.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptLists" inherits="VisualScriptNode" category="Core" version="3.2">
+<class name="VisualScriptLists" inherits="VisualScriptNode" version="4.0">
<brief_description>
A Visual Script virtual class for in-graph editable nodes.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptLocalVar.xml b/modules/visual_script/doc_classes/VisualScriptLocalVar.xml
index 8c21c3f0bc..6c31ae1a30 100644
--- a/modules/visual_script/doc_classes/VisualScriptLocalVar.xml
+++ b/modules/visual_script/doc_classes/VisualScriptLocalVar.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptLocalVar" inherits="VisualScriptNode" category="Core" version="3.2">
+<class name="VisualScriptLocalVar" inherits="VisualScriptNode" version="4.0">
<brief_description>
Gets a local variable's value.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptLocalVarSet.xml b/modules/visual_script/doc_classes/VisualScriptLocalVarSet.xml
index a981432cdb..0a9a509958 100644
--- a/modules/visual_script/doc_classes/VisualScriptLocalVarSet.xml
+++ b/modules/visual_script/doc_classes/VisualScriptLocalVarSet.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptLocalVarSet" inherits="VisualScriptNode" category="Core" version="3.2">
+<class name="VisualScriptLocalVarSet" inherits="VisualScriptNode" version="4.0">
<brief_description>
Changes a local variable's value.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptMathConstant.xml b/modules/visual_script/doc_classes/VisualScriptMathConstant.xml
index 7f926f17bf..18a1f030bc 100644
--- a/modules/visual_script/doc_classes/VisualScriptMathConstant.xml
+++ b/modules/visual_script/doc_classes/VisualScriptMathConstant.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptMathConstant" inherits="VisualScriptNode" category="Core" version="3.2">
+<class name="VisualScriptMathConstant" inherits="VisualScriptNode" version="4.0">
<brief_description>
Commonly used mathematical constants.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptNode.xml b/modules/visual_script/doc_classes/VisualScriptNode.xml
index 89fb5c81f8..82a023f3e4 100644
--- a/modules/visual_script/doc_classes/VisualScriptNode.xml
+++ b/modules/visual_script/doc_classes/VisualScriptNode.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptNode" inherits="Resource" category="Core" version="3.2">
+<class name="VisualScriptNode" inherits="Resource" version="4.0">
<brief_description>
A node which is part of a [VisualScript].
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptOperator.xml b/modules/visual_script/doc_classes/VisualScriptOperator.xml
index 80449ac521..c8ce0f2732 100644
--- a/modules/visual_script/doc_classes/VisualScriptOperator.xml
+++ b/modules/visual_script/doc_classes/VisualScriptOperator.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptOperator" inherits="VisualScriptNode" category="Core" version="3.2">
+<class name="VisualScriptOperator" inherits="VisualScriptNode" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptPreload.xml b/modules/visual_script/doc_classes/VisualScriptPreload.xml
index b3b39691c9..e11af6c805 100644
--- a/modules/visual_script/doc_classes/VisualScriptPreload.xml
+++ b/modules/visual_script/doc_classes/VisualScriptPreload.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptPreload" inherits="VisualScriptNode" category="Core" version="3.2">
+<class name="VisualScriptPreload" inherits="VisualScriptNode" version="4.0">
<brief_description>
Creates a new [Resource] or loads one from the filesystem.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptPropertyGet.xml b/modules/visual_script/doc_classes/VisualScriptPropertyGet.xml
index af1e8e68e8..cf436116b8 100644
--- a/modules/visual_script/doc_classes/VisualScriptPropertyGet.xml
+++ b/modules/visual_script/doc_classes/VisualScriptPropertyGet.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptPropertyGet" inherits="VisualScriptNode" category="Core" version="3.2">
+<class name="VisualScriptPropertyGet" inherits="VisualScriptNode" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptPropertySet.xml b/modules/visual_script/doc_classes/VisualScriptPropertySet.xml
index 380c196caf..357b4b9f5c 100644
--- a/modules/visual_script/doc_classes/VisualScriptPropertySet.xml
+++ b/modules/visual_script/doc_classes/VisualScriptPropertySet.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptPropertySet" inherits="VisualScriptNode" category="Core" version="3.2">
+<class name="VisualScriptPropertySet" inherits="VisualScriptNode" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptResourcePath.xml b/modules/visual_script/doc_classes/VisualScriptResourcePath.xml
index da37bbbb2c..ea891be05f 100644
--- a/modules/visual_script/doc_classes/VisualScriptResourcePath.xml
+++ b/modules/visual_script/doc_classes/VisualScriptResourcePath.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptResourcePath" inherits="VisualScriptNode" category="Core" version="3.2">
+<class name="VisualScriptResourcePath" inherits="VisualScriptNode" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptReturn.xml b/modules/visual_script/doc_classes/VisualScriptReturn.xml
index 9a81c671d4..502628925d 100644
--- a/modules/visual_script/doc_classes/VisualScriptReturn.xml
+++ b/modules/visual_script/doc_classes/VisualScriptReturn.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptReturn" inherits="VisualScriptNode" category="Core" version="3.2">
+<class name="VisualScriptReturn" inherits="VisualScriptNode" version="4.0">
<brief_description>
Exits a function and returns an optional value.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptSceneNode.xml b/modules/visual_script/doc_classes/VisualScriptSceneNode.xml
index 99f4acbd27..ffe187a00e 100644
--- a/modules/visual_script/doc_classes/VisualScriptSceneNode.xml
+++ b/modules/visual_script/doc_classes/VisualScriptSceneNode.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptSceneNode" inherits="VisualScriptNode" category="Core" version="3.2">
+<class name="VisualScriptSceneNode" inherits="VisualScriptNode" version="4.0">
<brief_description>
Node reference.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptSceneTree.xml b/modules/visual_script/doc_classes/VisualScriptSceneTree.xml
index 84718ba119..191d4b6977 100644
--- a/modules/visual_script/doc_classes/VisualScriptSceneTree.xml
+++ b/modules/visual_script/doc_classes/VisualScriptSceneTree.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptSceneTree" inherits="VisualScriptNode" category="Core" version="3.2">
+<class name="VisualScriptSceneTree" inherits="VisualScriptNode" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptSelect.xml b/modules/visual_script/doc_classes/VisualScriptSelect.xml
index e6a6cd5a48..1dbc066e32 100644
--- a/modules/visual_script/doc_classes/VisualScriptSelect.xml
+++ b/modules/visual_script/doc_classes/VisualScriptSelect.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptSelect" inherits="VisualScriptNode" category="Core" version="3.2">
+<class name="VisualScriptSelect" inherits="VisualScriptNode" version="4.0">
<brief_description>
Chooses between two input values.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptSelf.xml b/modules/visual_script/doc_classes/VisualScriptSelf.xml
index 231e7d8f0d..bb24f158c1 100644
--- a/modules/visual_script/doc_classes/VisualScriptSelf.xml
+++ b/modules/visual_script/doc_classes/VisualScriptSelf.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptSelf" inherits="VisualScriptNode" category="Core" version="3.2">
+<class name="VisualScriptSelf" inherits="VisualScriptNode" version="4.0">
<brief_description>
Outputs a reference to the current instance.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptSequence.xml b/modules/visual_script/doc_classes/VisualScriptSequence.xml
index 2ceceb199f..664722574d 100644
--- a/modules/visual_script/doc_classes/VisualScriptSequence.xml
+++ b/modules/visual_script/doc_classes/VisualScriptSequence.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptSequence" inherits="VisualScriptNode" category="Core" version="3.2">
+<class name="VisualScriptSequence" inherits="VisualScriptNode" version="4.0">
<brief_description>
Executes a series of Sequence ports.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptSubCall.xml b/modules/visual_script/doc_classes/VisualScriptSubCall.xml
index 51b0093209..cb3b04b583 100644
--- a/modules/visual_script/doc_classes/VisualScriptSubCall.xml
+++ b/modules/visual_script/doc_classes/VisualScriptSubCall.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptSubCall" inherits="VisualScriptNode" category="Core" version="3.2">
+<class name="VisualScriptSubCall" inherits="VisualScriptNode" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptSwitch.xml b/modules/visual_script/doc_classes/VisualScriptSwitch.xml
index 3e3b88ebe0..74504948f0 100644
--- a/modules/visual_script/doc_classes/VisualScriptSwitch.xml
+++ b/modules/visual_script/doc_classes/VisualScriptSwitch.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptSwitch" inherits="VisualScriptNode" category="Core" version="3.2">
+<class name="VisualScriptSwitch" inherits="VisualScriptNode" version="4.0">
<brief_description>
Branches program flow based on a given input's value.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptTypeCast.xml b/modules/visual_script/doc_classes/VisualScriptTypeCast.xml
index 999a190a9a..43fe9d16ea 100644
--- a/modules/visual_script/doc_classes/VisualScriptTypeCast.xml
+++ b/modules/visual_script/doc_classes/VisualScriptTypeCast.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptTypeCast" inherits="VisualScriptNode" category="Core" version="3.2">
+<class name="VisualScriptTypeCast" inherits="VisualScriptNode" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptVariableGet.xml b/modules/visual_script/doc_classes/VisualScriptVariableGet.xml
index 40e461294b..0746ab293e 100644
--- a/modules/visual_script/doc_classes/VisualScriptVariableGet.xml
+++ b/modules/visual_script/doc_classes/VisualScriptVariableGet.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptVariableGet" inherits="VisualScriptNode" category="Core" version="3.2">
+<class name="VisualScriptVariableGet" inherits="VisualScriptNode" version="4.0">
<brief_description>
Gets a variable's value.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptVariableSet.xml b/modules/visual_script/doc_classes/VisualScriptVariableSet.xml
index 6c53ad61b4..e7d83e60ab 100644
--- a/modules/visual_script/doc_classes/VisualScriptVariableSet.xml
+++ b/modules/visual_script/doc_classes/VisualScriptVariableSet.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptVariableSet" inherits="VisualScriptNode" category="Core" version="3.2">
+<class name="VisualScriptVariableSet" inherits="VisualScriptNode" version="4.0">
<brief_description>
Changes a variable's value.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptWhile.xml b/modules/visual_script/doc_classes/VisualScriptWhile.xml
index 77211fa088..f187957ad2 100644
--- a/modules/visual_script/doc_classes/VisualScriptWhile.xml
+++ b/modules/visual_script/doc_classes/VisualScriptWhile.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptWhile" inherits="VisualScriptNode" category="Core" version="3.2">
+<class name="VisualScriptWhile" inherits="VisualScriptNode" version="4.0">
<brief_description>
Conditional loop.
</brief_description>
diff --git a/modules/visual_script/doc_classes/VisualScriptYield.xml b/modules/visual_script/doc_classes/VisualScriptYield.xml
index c506e6db01..0a8d529a48 100644
--- a/modules/visual_script/doc_classes/VisualScriptYield.xml
+++ b/modules/visual_script/doc_classes/VisualScriptYield.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptYield" inherits="VisualScriptNode" category="Core" version="3.2">
+<class name="VisualScriptYield" inherits="VisualScriptNode" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/doc_classes/VisualScriptYieldSignal.xml b/modules/visual_script/doc_classes/VisualScriptYieldSignal.xml
index b9d7aedaab..8f6941ce1e 100644
--- a/modules/visual_script/doc_classes/VisualScriptYieldSignal.xml
+++ b/modules/visual_script/doc_classes/VisualScriptYieldSignal.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VisualScriptYieldSignal" inherits="VisualScriptNode" category="Core" version="3.2">
+<class name="VisualScriptYieldSignal" inherits="VisualScriptNode" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/modules/visual_script/visual_script_nodes.cpp b/modules/visual_script/visual_script_nodes.cpp
index 86c1080182..36cafeec73 100644
--- a/modules/visual_script/visual_script_nodes.cpp
+++ b/modules/visual_script/visual_script_nodes.cpp
@@ -1842,7 +1842,7 @@ PropertyInfo VisualScriptGlobalConstant::get_input_value_port_info(int p_idx) co
PropertyInfo VisualScriptGlobalConstant::get_output_value_port_info(int p_idx) const {
String name = GlobalConstants::get_global_constant_name(index);
- return PropertyInfo(Variant::REAL, name);
+ return PropertyInfo(Variant::INT, name);
}
String VisualScriptGlobalConstant::get_caption() const {
@@ -2060,7 +2060,7 @@ PropertyInfo VisualScriptBasicTypeConstant::get_input_value_port_info(int p_idx)
PropertyInfo VisualScriptBasicTypeConstant::get_output_value_port_info(int p_idx) const {
- return PropertyInfo(Variant::INT, "value");
+ return PropertyInfo(type, "value");
}
String VisualScriptBasicTypeConstant::get_caption() const {
@@ -2069,8 +2069,11 @@ String VisualScriptBasicTypeConstant::get_caption() const {
}
String VisualScriptBasicTypeConstant::get_text() const {
-
- return Variant::get_type_name(type) + "." + String(name);
+ if (name == "") {
+ return Variant::get_type_name(type);
+ } else {
+ return Variant::get_type_name(type) + "." + String(name);
+ }
}
void VisualScriptBasicTypeConstant::set_basic_type_constant(const StringName &p_which) {
@@ -2087,6 +2090,23 @@ StringName VisualScriptBasicTypeConstant::get_basic_type_constant() const {
void VisualScriptBasicTypeConstant::set_basic_type(Variant::Type p_which) {
type = p_which;
+
+ List<StringName> constants;
+ Variant::get_constants_for_type(type, &constants);
+ if (constants.size() > 0) {
+ bool found_name = false;
+ for (List<StringName>::Element *E = constants.front(); E; E = E->next()) {
+ if (E->get() == name) {
+ found_name = true;
+ break;
+ }
+ }
+ if (!found_name) {
+ name = constants[0];
+ }
+ } else {
+ name = "";
+ }
_change_notify();
ports_changed_notify();
}
diff --git a/modules/webm/doc_classes/VideoStreamWebm.xml b/modules/webm/doc_classes/VideoStreamWebm.xml
index ff11bbb37d..dfa04720cf 100644
--- a/modules/webm/doc_classes/VideoStreamWebm.xml
+++ b/modules/webm/doc_classes/VideoStreamWebm.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="VideoStreamWebm" inherits="VideoStream" category="Core" version="3.2">
+<class name="VideoStreamWebm" inherits="VideoStream" version="4.0">
<brief_description>
+ [VideoStream] resource for WebM videos.
</brief_description>
<description>
+ [VideoStream] resource handling the [url=https://www.webmproject.org/]WebM[/url] video format with [code].webm[/code] extension.
</description>
<tutorials>
</tutorials>
@@ -11,6 +13,7 @@
<return type="String">
</return>
<description>
+ Returns the WebM video file handled by this [VideoStreamWebm].
</description>
</method>
<method name="set_file">
@@ -19,6 +22,7 @@
<argument index="0" name="file" type="String">
</argument>
<description>
+ Sets the WebM video file that this [VideoStreamWebm] resource handles. The [code]file[/code] name should have the [code].webm[/code] extension.
</description>
</method>
</methods>
diff --git a/modules/webm/video_stream_webm.cpp b/modules/webm/video_stream_webm.cpp
index 6e2527595b..2763d30bb5 100644
--- a/modules/webm/video_stream_webm.cpp
+++ b/modules/webm/video_stream_webm.cpp
@@ -30,21 +30,22 @@
#include "video_stream_webm.h"
-#include "OpusVorbisDecoder.hpp"
-#include "VPXDecoder.hpp"
-#include <vpx/vpx_image.h>
-
-#include "mkvparser/mkvparser.h"
-
#include "core/os/file_access.h"
#include "core/os/os.h"
#include "core/project_settings.h"
+#include "servers/audio_server.h"
#include "thirdparty/misc/yuv2rgb.h"
-#include "servers/audio_server.h"
+// libsimplewebm
+#include <OpusVorbisDecoder.hpp>
+#include <VPXDecoder.hpp>
+
+// libvpx
+#include <vpx/vpx_image.h>
-#include <string.h>
+// libwebm
+#include <mkvparser/mkvparser.h>
class MkvReader : public mkvparser::IMkvReader {
@@ -335,22 +336,22 @@ void VideoStreamPlaybackWebm::update(float p_delta) {
} else if (image.chromaShiftW == 1 && image.chromaShiftH == 1) {
yuv420_2_rgb8888(w.ptr(), image.planes[0], image.planes[1], image.planes[2], image.w, image.h, image.linesize[0], image.linesize[1], image.w << 2);
- // libyuv::I420ToARGB(image.planes[0], image.linesize[0], image.planes[2], image.linesize[2], image.planes[1], image.linesize[1], w.ptr(), image.w << 2, image.w, image.h);
+ //libyuv::I420ToARGB(image.planes[0], image.linesize[0], image.planes[2], image.linesize[2], image.planes[1], image.linesize[1], w.ptr(), image.w << 2, image.w, image.h);
converted = true;
} else if (image.chromaShiftW == 1 && image.chromaShiftH == 0) {
yuv422_2_rgb8888(w.ptr(), image.planes[0], image.planes[1], image.planes[2], image.w, image.h, image.linesize[0], image.linesize[1], image.w << 2);
- // libyuv::I422ToARGB(image.planes[0], image.linesize[0], image.planes[2], image.linesize[2], image.planes[1], image.linesize[1], w.ptr(), image.w << 2, image.w, image.h);
+ //libyuv::I422ToARGB(image.planes[0], image.linesize[0], image.planes[2], image.linesize[2], image.planes[1], image.linesize[1], w.ptr(), image.w << 2, image.w, image.h);
converted = true;
} else if (image.chromaShiftW == 0 && image.chromaShiftH == 0) {
yuv444_2_rgb8888(w.ptr(), image.planes[0], image.planes[1], image.planes[2], image.w, image.h, image.linesize[0], image.linesize[1], image.w << 2);
- // libyuv::I444ToARGB(image.planes[0], image.linesize[0], image.planes[2], image.linesize[2], image.planes[1], image.linesize[1], w.ptr(), image.w << 2, image.w, image.h);
+ //libyuv::I444ToARGB(image.planes[0], image.linesize[0], image.planes[2], image.linesize[2], image.planes[1], image.linesize[1], w.ptr(), image.w << 2, image.w, image.h);
converted = true;
} else if (image.chromaShiftW == 2 && image.chromaShiftH == 0) {
- // libyuv::I411ToARGB(image.planes[0], image.linesize[0], image.planes[2], image.linesize[2], image.planes[1], image.linesize[1], w.ptr(), image.w << 2, image.w, image.h);
- // converted = true;
+ //libyuv::I411ToARGB(image.planes[0], image.linesize[0], image.planes[2], image.linesize[2] image.planes[1], image.linesize[1], w.ptr(), image.w << 2, image.w, image.h);
+ //converted = true;
}
if (converted) {
@@ -392,17 +393,22 @@ int VideoStreamPlaybackWebm::get_mix_rate() const {
inline bool VideoStreamPlaybackWebm::has_enough_video_frames() const {
if (video_frames_pos > 0) {
-
- const double audio_delay = AudioServer::get_singleton()->get_output_latency();
+ // FIXME: AudioServer output latency was fixed in af9bb0e, previously it used to
+ // systematically return 0. Now that it gives a proper latency, it broke this
+ // code where the delay compensation likely never really worked.
+ //const double audio_delay = AudioServer::get_singleton()->get_output_latency();
const double video_time = video_frames[video_frames_pos - 1]->time;
- return video_time >= time + audio_delay + delay_compensation;
+ return video_time >= time + /* audio_delay + */ delay_compensation;
}
return false;
}
bool VideoStreamPlaybackWebm::should_process(WebMFrame &video_frame) {
- const double audio_delay = AudioServer::get_singleton()->get_output_latency();
- return video_frame.time >= time + audio_delay + delay_compensation;
+ // FIXME: AudioServer output latency was fixed in af9bb0e, previously it used to
+ // systematically return 0. Now that it gives a proper latency, it broke this
+ // code where the delay compensation likely never really worked.
+ //const double audio_delay = AudioServer::get_singleton()->get_output_latency();
+ return video_frame.time >= time + /* audio_delay + */ delay_compensation;
}
void VideoStreamPlaybackWebm::delete_pointers() {
diff --git a/modules/webrtc/doc_classes/WebRTCDataChannel.xml b/modules/webrtc/doc_classes/WebRTCDataChannel.xml
index 98715ee99b..5c90038b9a 100644
--- a/modules/webrtc/doc_classes/WebRTCDataChannel.xml
+++ b/modules/webrtc/doc_classes/WebRTCDataChannel.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="WebRTCDataChannel" inherits="PacketPeer" category="Core" version="3.2">
+<class name="WebRTCDataChannel" inherits="PacketPeer" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/modules/webrtc/doc_classes/WebRTCMultiplayer.xml b/modules/webrtc/doc_classes/WebRTCMultiplayer.xml
index f9403dac54..5b9459bc27 100644
--- a/modules/webrtc/doc_classes/WebRTCMultiplayer.xml
+++ b/modules/webrtc/doc_classes/WebRTCMultiplayer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="WebRTCMultiplayer" inherits="NetworkedMultiplayerPeer" category="Core" version="3.2">
+<class name="WebRTCMultiplayer" inherits="NetworkedMultiplayerPeer" version="4.0">
<brief_description>
A simple interface to create a peer-to-peer mesh network composed of [WebRTCPeerConnection] that is compatible with the [MultiplayerAPI].
</brief_description>
diff --git a/modules/webrtc/doc_classes/WebRTCPeerConnection.xml b/modules/webrtc/doc_classes/WebRTCPeerConnection.xml
index 19d13dcc66..504b4705d8 100644
--- a/modules/webrtc/doc_classes/WebRTCPeerConnection.xml
+++ b/modules/webrtc/doc_classes/WebRTCPeerConnection.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="WebRTCPeerConnection" inherits="Reference" category="Core" version="3.2">
+<class name="WebRTCPeerConnection" inherits="Reference" version="4.0">
<brief_description>
Interface to a WebRTC peer connection.
</brief_description>
diff --git a/modules/websocket/doc_classes/WebSocketClient.xml b/modules/websocket/doc_classes/WebSocketClient.xml
index 52a98d8c32..2549321db3 100644
--- a/modules/websocket/doc_classes/WebSocketClient.xml
+++ b/modules/websocket/doc_classes/WebSocketClient.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="WebSocketClient" inherits="WebSocketMultiplayerPeer" category="Core" version="3.2">
+<class name="WebSocketClient" inherits="WebSocketMultiplayerPeer" version="4.0">
<brief_description>
A WebSocket client implementation.
</brief_description>
diff --git a/modules/websocket/doc_classes/WebSocketMultiplayerPeer.xml b/modules/websocket/doc_classes/WebSocketMultiplayerPeer.xml
index 7070cfbdab..0679acf78a 100644
--- a/modules/websocket/doc_classes/WebSocketMultiplayerPeer.xml
+++ b/modules/websocket/doc_classes/WebSocketMultiplayerPeer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="WebSocketMultiplayerPeer" inherits="NetworkedMultiplayerPeer" category="Core" version="3.2">
+<class name="WebSocketMultiplayerPeer" inherits="NetworkedMultiplayerPeer" version="4.0">
<brief_description>
Base class for WebSocket server and client.
</brief_description>
diff --git a/modules/websocket/doc_classes/WebSocketPeer.xml b/modules/websocket/doc_classes/WebSocketPeer.xml
index 3c943ccd24..5125956416 100644
--- a/modules/websocket/doc_classes/WebSocketPeer.xml
+++ b/modules/websocket/doc_classes/WebSocketPeer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="WebSocketPeer" inherits="PacketPeer" category="Core" version="3.2">
+<class name="WebSocketPeer" inherits="PacketPeer" version="4.0">
<brief_description>
A class representing a specific WebSocket connection.
</brief_description>
@@ -53,6 +53,16 @@
Returns [code]true[/code] if this peer is currently connected.
</description>
</method>
+ <method name="set_no_delay">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ Disable Nagle's algorithm on the underling TCP socket (default). See [method StreamPeerTCP.set_no_delay] for more information.
+ [b]Note:[/b] Not available in the HTML5 export.
+ </description>
+ </method>
<method name="set_write_mode">
<return type="void">
</return>
diff --git a/modules/websocket/doc_classes/WebSocketServer.xml b/modules/websocket/doc_classes/WebSocketServer.xml
index 2074a10fa9..f66e1bf54b 100644
--- a/modules/websocket/doc_classes/WebSocketServer.xml
+++ b/modules/websocket/doc_classes/WebSocketServer.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="WebSocketServer" inherits="WebSocketMultiplayerPeer" category="Core" version="3.2">
+<class name="WebSocketServer" inherits="WebSocketMultiplayerPeer" version="4.0">
<brief_description>
A WebSocket server implementation.
</brief_description>
diff --git a/modules/websocket/emws_peer.cpp b/modules/websocket/emws_peer.cpp
index d07360c525..effed8e4d9 100644
--- a/modules/websocket/emws_peer.cpp
+++ b/modules/websocket/emws_peer.cpp
@@ -139,6 +139,11 @@ uint16_t EMWSPeer::get_connected_port() const {
ERR_FAIL_V_MSG(0, "Not supported in HTML5 export.");
};
+void EMWSPeer::set_no_delay(bool p_enabled) {
+
+ ERR_FAIL_MSG("'set_no_delay' is not supported in HTML5 export.");
+}
+
EMWSPeer::EMWSPeer() {
peer_sock = -1;
write_mode = WRITE_MODE_BINARY;
diff --git a/modules/websocket/emws_peer.h b/modules/websocket/emws_peer.h
index 9fe7fb8edc..43b42f9be6 100644
--- a/modules/websocket/emws_peer.h
+++ b/modules/websocket/emws_peer.h
@@ -68,6 +68,7 @@ public:
virtual WriteMode get_write_mode() const;
virtual void set_write_mode(WriteMode p_mode);
virtual bool was_string_packet() const;
+ virtual void set_no_delay(bool p_enabled);
EMWSPeer();
~EMWSPeer();
diff --git a/modules/websocket/websocket_peer.cpp b/modules/websocket/websocket_peer.cpp
index 474b11f012..30a5972330 100644
--- a/modules/websocket/websocket_peer.cpp
+++ b/modules/websocket/websocket_peer.cpp
@@ -46,6 +46,7 @@ void WebSocketPeer::_bind_methods() {
ClassDB::bind_method(D_METHOD("close", "code", "reason"), &WebSocketPeer::close, DEFVAL(1000), DEFVAL(""));
ClassDB::bind_method(D_METHOD("get_connected_host"), &WebSocketPeer::get_connected_host);
ClassDB::bind_method(D_METHOD("get_connected_port"), &WebSocketPeer::get_connected_port);
+ ClassDB::bind_method(D_METHOD("set_no_delay", "enabled"), &WebSocketPeer::set_no_delay);
BIND_ENUM_CONSTANT(WRITE_MODE_TEXT);
BIND_ENUM_CONSTANT(WRITE_MODE_BINARY);
diff --git a/modules/websocket/websocket_peer.h b/modules/websocket/websocket_peer.h
index c4e1984aa0..d4173600ec 100644
--- a/modules/websocket/websocket_peer.h
+++ b/modules/websocket/websocket_peer.h
@@ -64,6 +64,7 @@ public:
virtual IP_Address get_connected_host() const = 0;
virtual uint16_t get_connected_port() const = 0;
virtual bool was_string_packet() const = 0;
+ virtual void set_no_delay(bool p_enabled) = 0;
WebSocketPeer();
~WebSocketPeer();
diff --git a/modules/websocket/websocket_server.cpp b/modules/websocket/websocket_server.cpp
index 76e88d72b9..a7ced65543 100644
--- a/modules/websocket/websocket_server.cpp
+++ b/modules/websocket/websocket_server.cpp
@@ -114,7 +114,7 @@ NetworkedMultiplayerPeer::ConnectionStatus WebSocketServer::get_connection_statu
return CONNECTION_CONNECTED;
return CONNECTION_DISCONNECTED;
-};
+}
bool WebSocketServer::is_server() const {
diff --git a/modules/websocket/wsl_client.cpp b/modules/websocket/wsl_client.cpp
index 88a306c7f5..088f266f18 100644
--- a/modules/websocket/wsl_client.cpp
+++ b/modules/websocket/wsl_client.cpp
@@ -90,6 +90,7 @@ void WSLClient::_do_handshake() {
data->is_server = false;
data->id = 1;
_peer->make_context(data, _in_buf_size, _in_pkt_size, _out_buf_size, _out_pkt_size);
+ _peer->set_no_delay(true);
_on_connect(protocol);
break;
}
diff --git a/modules/websocket/wsl_peer.cpp b/modules/websocket/wsl_peer.cpp
index 2f7f84c893..08079145e4 100644
--- a/modules/websocket/wsl_peer.cpp
+++ b/modules/websocket/wsl_peer.cpp
@@ -243,6 +243,10 @@ Error WSLPeer::put_packet(const uint8_t *p_buffer, int p_buffer_size) {
msg.msg_length = p_buffer_size;
wslay_event_queue_msg(_data->ctx, &msg);
+ if (wslay_event_send(_data->ctx) < 0) {
+ close_now();
+ return FAILED;
+ }
return OK;
}
@@ -314,6 +318,12 @@ uint16_t WSLPeer::get_connected_port() const {
return _data->tcp->get_connected_port();
}
+void WSLPeer::set_no_delay(bool p_enabled) {
+
+ ERR_FAIL_COND(!is_connected_to_host() || _data->tcp.is_null());
+ _data->tcp->set_no_delay(p_enabled);
+}
+
void WSLPeer::invalidate() {
if (_data)
_data->valid = false;
diff --git a/modules/websocket/wsl_peer.h b/modules/websocket/wsl_peer.h
index 2fbb7aeec3..f1c45ee859 100644
--- a/modules/websocket/wsl_peer.h
+++ b/modules/websocket/wsl_peer.h
@@ -109,6 +109,7 @@ public:
virtual WriteMode get_write_mode() const;
virtual void set_write_mode(WriteMode p_mode);
virtual bool was_string_packet() const;
+ virtual void set_no_delay(bool p_enabled);
void make_context(PeerData *p_data, unsigned int p_in_buf_size, unsigned int p_in_pkt_size, unsigned int p_out_buf_size, unsigned int p_out_pkt_size);
Error parse_message(const wslay_event_on_msg_recv_arg *arg);
diff --git a/modules/websocket/wsl_server.cpp b/modules/websocket/wsl_server.cpp
index c3dd79a89c..4db650a0c1 100644
--- a/modules/websocket/wsl_server.cpp
+++ b/modules/websocket/wsl_server.cpp
@@ -165,9 +165,7 @@ Error WSLServer::listen(int p_port, const Vector<String> p_protocols, bool gd_mp
for (int i = 0; i < p_protocols.size(); i++) {
pw[i] = p_protocols[i].strip_edges();
}
- _server->listen(p_port, bind_ip);
-
- return OK;
+ return _server->listen(p_port, bind_ip);
}
void WSLServer::poll() {
@@ -208,6 +206,7 @@ void WSLServer::poll() {
Ref<WSLPeer> ws_peer = memnew(WSLPeer);
ws_peer->make_context(data, _in_buf_size, _in_pkt_size, _out_buf_size, _out_pkt_size);
+ ws_peer->set_no_delay(true);
_peer_map[id] = ws_peer;
remove_peers.push_back(ppeer);