diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index c0387ec59f5f..27112747a1a9 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -2564,6 +2564,8 @@ void _Directory::_bind_methods() { _Directory::_Directory() { d = DirAccess::create(DirAccess::ACCESS_RESOURCES); + _list_skip_hidden = false; + _list_skip_navigational = false; } _Directory::~_Directory() { diff --git a/core/class_db.cpp b/core/class_db.cpp index 08c4d4b80b44..8e6a7a3b2ddb 100644 --- a/core/class_db.cpp +++ b/core/class_db.cpp @@ -265,6 +265,7 @@ ClassDB::ClassInfo::ClassInfo() { inherits_ptr = NULL; disabled = false; exposed = false; + class_ptr = NULL; } ClassDB::ClassInfo::~ClassInfo() { diff --git a/core/crypto/hashing_context.cpp b/core/crypto/hashing_context.cpp index e7e13b600546..50cfaac53186 100644 --- a/core/crypto/hashing_context.cpp +++ b/core/crypto/hashing_context.cpp @@ -129,6 +129,7 @@ void HashingContext::_bind_methods() { } HashingContext::HashingContext() { + type = HASH_MD5; ctx = NULL; } diff --git a/core/engine.cpp b/core/engine.cpp index 5dc10295bb12..63aa5f137421 100644 --- a/core/engine.cpp +++ b/core/engine.cpp @@ -234,6 +234,7 @@ Engine::Engine() { _in_physics = false; _frame_ticks = 0; _frame_step = 0; + _snap_2d_viewports = false; editor_hint = false; } diff --git a/core/io/file_access_compressed.cpp b/core/io/file_access_compressed.cpp index 1479f60d012e..dd1d0650811a 100644 --- a/core/io/file_access_compressed.cpp +++ b/core/io/file_access_compressed.cpp @@ -392,6 +392,7 @@ Error FileAccessCompressed::_set_unix_permissions(const String &p_file, uint32_t FileAccessCompressed::FileAccessCompressed() : cmode(Compression::MODE_ZSTD), writing(false), + write_pos(0), write_ptr(0), write_buffer_size(0), write_max(0), diff --git a/core/io/file_access_encrypted.cpp b/core/io/file_access_encrypted.cpp index fe08e76744d9..61b734197b8f 100644 --- a/core/io/file_access_encrypted.cpp +++ b/core/io/file_access_encrypted.cpp @@ -324,6 +324,8 @@ FileAccessEncrypted::FileAccessEncrypted() { eofed = false; mode = MODE_MAX; writing = false; + base = 0; + length = 0; } FileAccessEncrypted::~FileAccessEncrypted() { diff --git a/core/io/file_access_memory.cpp b/core/io/file_access_memory.cpp index a60b643d0e7e..d8bf5fbd5bd5 100644 --- a/core/io/file_access_memory.cpp +++ b/core/io/file_access_memory.cpp @@ -197,4 +197,6 @@ void FileAccessMemory::store_buffer(const uint8_t *p_src, int p_length) { FileAccessMemory::FileAccessMemory() { data = NULL; + length = 0; + pos = 0; } diff --git a/core/io/http_client.cpp b/core/io/http_client.cpp index 3954f50f7a51..25fc2943baa4 100644 --- a/core/io/http_client.cpp +++ b/core/io/http_client.cpp @@ -781,6 +781,7 @@ HTTPClient::HTTPClient() { handshaking = false; // 64 KiB by default (favors fast download speeds at the cost of memory usage). read_chunk_size = 65536; + ssl_verify_host = false; } HTTPClient::~HTTPClient() { diff --git a/core/io/pck_packer.cpp b/core/io/pck_packer.cpp index 45e29ca35441..6c4cce6a9629 100644 --- a/core/io/pck_packer.cpp +++ b/core/io/pck_packer.cpp @@ -181,7 +181,7 @@ Error PCKPacker::flush(bool p_verbose) { }; PCKPacker::PCKPacker() { - + alignment = 0; file = NULL; }; diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp index 91691a48d19d..7cb2ed6ac535 100644 --- a/core/io/resource_format_binary.cpp +++ b/core/io/resource_format_binary.cpp @@ -980,6 +980,8 @@ ResourceInteractiveLoaderBinary::ResourceInteractiveLoaderBinary() : f(NULL), error(OK), stage(0) { + ver_format = 0; + importmd_ofs = 0; } ResourceInteractiveLoaderBinary::~ResourceInteractiveLoaderBinary() { diff --git a/core/math/a_star.h b/core/math/a_star.h index 01b9ff954012..df6416c3ab7f 100644 --- a/core/math/a_star.h +++ b/core/math/a_star.h @@ -48,8 +48,13 @@ class AStar : public Reference { struct Point { Point() : + id(0), + enabled(false), neighbours(4u), - unlinked_neighbours(4u) {} + unlinked_neighbours(4u), + prev_point(NULL), + open_pass(0), + closed_pass(0) {} int id; Vector3 pos; diff --git a/core/math/expression.cpp b/core/math/expression.cpp index e53538aad8c5..bfd020c1ad15 100644 --- a/core/math/expression.cpp +++ b/core/math/expression.cpp @@ -2230,6 +2230,8 @@ Expression::Expression() : root(NULL), nodes(NULL), execution_error(false) { + str_ofs = 0; + expression_dirty = false; } Expression::~Expression() { diff --git a/core/math/expression.h b/core/math/expression.h index 0b0cec60c4f1..815450b3db68 100644 --- a/core/math/expression.h +++ b/core/math/expression.h @@ -220,7 +220,10 @@ class Expression : public Reference { Type type; - ENode() { next = NULL; } + ENode() { + type = TYPE_INPUT; + next = NULL; + } virtual ~ENode() { if (next) { memdelete(next); @@ -243,6 +246,7 @@ class Expression : public Reference { int index; InputNode() { + index = 0; type = TYPE_INPUT; } }; @@ -262,6 +266,8 @@ class Expression : public Reference { ENode *nodes[2]; OperatorNode() { + nodes[0] = nullptr; + nodes[1] = nullptr; type = TYPE_OPERATOR; } }; @@ -278,6 +284,8 @@ class Expression : public Reference { ENode *index; IndexNode() { + base = nullptr; + index = nullptr; type = TYPE_INDEX; } }; @@ -287,6 +295,7 @@ class Expression : public Reference { StringName name; NamedIndexNode() { + base = nullptr; type = TYPE_NAMED_INDEX; } }; @@ -306,6 +315,7 @@ class Expression : public Reference { Vector arguments; CallNode() { + base = nullptr; type = TYPE_CALL; } }; @@ -328,6 +338,7 @@ class Expression : public Reference { BuiltinFunc func; Vector arguments; BuiltinFuncNode() { + func = BuiltinFunc::BYTES_TO_VAR; type = TYPE_BUILTIN_FUNC; } }; diff --git a/core/object.h b/core/object.h index b0d1e9505b83..ea32cf644f18 100644 --- a/core/object.h +++ b/core/object.h @@ -465,7 +465,10 @@ class Object { int reference_count; Connection conn; List::Element *cE; - Slot() { reference_count = 0; } + Slot() { + cE = nullptr; + reference_count = 0; + } }; MethodInfo user; diff --git a/core/os/dir_access.cpp b/core/os/dir_access.cpp index 2f40cf34c6b0..2d63a8bd45c7 100644 --- a/core/os/dir_access.cpp +++ b/core/os/dir_access.cpp @@ -446,7 +446,7 @@ bool DirAccess::exists(String p_dir) { } DirAccess::DirAccess() { - + next_is_dir = false; _access_type = ACCESS_FILESYSTEM; } diff --git a/core/packed_data_container.cpp b/core/packed_data_container.cpp index 3fcdf37b806f..baa14b6452aa 100644 --- a/core/packed_data_container.cpp +++ b/core/packed_data_container.cpp @@ -428,4 +428,5 @@ int PackedDataContainerRef::size() const { }; PackedDataContainerRef::PackedDataContainerRef() { + offset = 0; } diff --git a/core/script_debugger_local.cpp b/core/script_debugger_local.cpp index 3cc14daf4c21..27c1d2b51ae9 100644 --- a/core/script_debugger_local.cpp +++ b/core/script_debugger_local.cpp @@ -418,6 +418,10 @@ void ScriptDebuggerLocal::send_error(const String &p_func, const String &p_file, ScriptDebuggerLocal::ScriptDebuggerLocal() { + frame_time = 0; + idle_time = 0; + physics_time = 0; + physics_frame_time = 0; profiling = false; idle_accum = OS::get_singleton()->get_ticks_usec(); options["variable_prefix"] = ""; diff --git a/drivers/alsa/audio_driver_alsa.cpp b/drivers/alsa/audio_driver_alsa.cpp index 9f310fcae2aa..d0270aa5941b 100644 --- a/drivers/alsa/audio_driver_alsa.cpp +++ b/drivers/alsa/audio_driver_alsa.cpp @@ -343,6 +343,11 @@ AudioDriverALSA::AudioDriverALSA() : pcm_handle(NULL), device_name("Default"), new_device("Default") { + mix_rate = 0; + channels = 0; + active = 0; + thread_exited = false; + exit_thread = false; } AudioDriverALSA::~AudioDriverALSA() { diff --git a/drivers/gles2/rasterizer_storage_gles2.h b/drivers/gles2/rasterizer_storage_gles2.h index 85ade9f21ca4..0f911f6a517d 100644 --- a/drivers/gles2/rasterizer_storage_gles2.h +++ b/drivers/gles2/rasterizer_storage_gles2.h @@ -172,6 +172,7 @@ class RasterizerStorageGLES2 : public RasterizerStorage { vertex_mem(0) { render.reset(); render_final.reset(); + snap.reset(); } } info; @@ -229,6 +230,7 @@ class RasterizerStorageGLES2 : public RasterizerStorage { virtual void material_changed_notify() {} Geometry() { + type = GEOMETRY_INVALID; last_pass = 0; index = 0; } @@ -296,6 +298,7 @@ class RasterizerStorageGLES2 : public RasterizerStorage { flags(0), width(0), height(0), + depth(0), alloc_width(0), alloc_height(0), format(Image::FORMAT_L8), @@ -305,6 +308,7 @@ class RasterizerStorageGLES2 : public RasterizerStorage { total_data_size(0), ignore_mipmaps(false), compressed(false), + srgb(false), mipmaps(0), resize_to_po2(false), active(false), @@ -532,6 +536,10 @@ class RasterizerStorageGLES2 : public RasterizerStorage { custom_code_id = 0; version = 1; last_pass = 0; + texture_count = 0; + index = 0; + uses_vertex_time = false; + uses_fragment_time = false; } }; @@ -588,6 +596,7 @@ class RasterizerStorageGLES2 : public RasterizerStorage { line_width = 1.0; last_pass = 0; render_priority = 0; + index = 0; } }; @@ -688,6 +697,8 @@ class RasterizerStorageGLES2 : public RasterizerStorage { primitive(VS::PRIMITIVE_POINTS), active(false), total_data_size(0) { + format = 0; + max_bone = 0; } }; @@ -720,6 +731,8 @@ class RasterizerStorageGLES2 : public RasterizerStorage { Mesh() : blend_shape_count(0), blend_shape_mode(VS::BLEND_SHAPE_MODE_NORMALIZED) { + active = false; + last_pass = 0; } }; @@ -859,6 +872,7 @@ class RasterizerStorageGLES2 : public RasterizerStorage { Immediate() { type = GEOMETRY_IMMEDIATE; building = false; + mask = 0; } }; diff --git a/drivers/gles3/rasterizer_storage_gles3.h b/drivers/gles3/rasterizer_storage_gles3.h index 1101d25ee0c8..d2efcbd18806 100644 --- a/drivers/gles3/rasterizer_storage_gles3.h +++ b/drivers/gles3/rasterizer_storage_gles3.h @@ -182,6 +182,7 @@ class RasterizerStorageGLES3 : public RasterizerStorage { vertex_mem = 0; render.reset(); render_final.reset(); + snap.reset(); } } info; @@ -240,6 +241,7 @@ class RasterizerStorageGLES3 : public RasterizerStorage { virtual void material_changed_notify() {} Geometry() { + type = GEOMETRY_INVALID; last_pass = 0; index = 0; } @@ -326,6 +328,11 @@ class RasterizerStorageGLES3 : public RasterizerStorage { detect_srgb_ud(NULL), detect_normal(NULL), detect_normal_ud(NULL) { + depth = 0; + alloc_width = 0; + alloc_height = 0; + alloc_depth = 0; + is_npot_repeat_mipmap = false; } _ALWAYS_INLINE_ Texture *get_ptr() { @@ -544,6 +551,9 @@ class RasterizerStorageGLES3 : public RasterizerStorage { valid = false; custom_code_id = 0; version = 1; + texture_count = 0; + uses_fragment_time = false; + uses_vertex_time = false; } }; @@ -606,6 +616,7 @@ class RasterizerStorageGLES3 : public RasterizerStorage { last_pass(0), can_cast_shadow_cache(false), is_animated_cache(false) { + index = 0; } }; @@ -724,6 +735,7 @@ class RasterizerStorageGLES3 : public RasterizerStorage { active(false), total_data_size(0) { type = GEOMETRY_SURFACE; + max_bone = 0; } ~Surface() { @@ -1129,6 +1141,10 @@ class RasterizerStorageGLES3 : public RasterizerStorage { GIProbeCompression compression; GIProbeData() { + width = 0; + height = 0; + depth = 0; + levels = 0; } }; @@ -1243,6 +1259,10 @@ class RasterizerStorageGLES3 : public RasterizerStorage { fractional_delta(false), frame_remainder(0), clear(true) { + phase = 0; + prev_phase = 0; + particle_valid_histories[0] = false; + particle_valid_histories[1] = false; particle_buffers[0] = 0; particle_buffers[1] = 0; glGenBuffers(2, particle_buffers); diff --git a/drivers/windows/dir_access_windows.cpp b/drivers/windows/dir_access_windows.cpp index aead8d865390..70f4f0819105 100644 --- a/drivers/windows/dir_access_windows.cpp +++ b/drivers/windows/dir_access_windows.cpp @@ -386,6 +386,9 @@ String DirAccessWindows::get_filesystem_type() const { DirAccessWindows::DirAccessWindows() { + _cisdir = false; + _cishidden = false; + p = memnew(DirAccessWindowsPrivate); p->h = INVALID_HANDLE_VALUE; current_dir = "."; diff --git a/drivers/windows/thread_windows.cpp b/drivers/windows/thread_windows.cpp index ec5ccbd3b5cf..d5fcc51ba1f3 100644 --- a/drivers/windows/thread_windows.cpp +++ b/drivers/windows/thread_windows.cpp @@ -92,6 +92,7 @@ void ThreadWindows::make_default() { ThreadWindows::ThreadWindows() : handle(NULL) { + user = NULL; } ThreadWindows::~ThreadWindows() { diff --git a/drivers/xaudio2/audio_driver_xaudio2.cpp b/drivers/xaudio2/audio_driver_xaudio2.cpp index 871b13de0e16..a02b5b9ffc44 100644 --- a/drivers/xaudio2/audio_driver_xaudio2.cpp +++ b/drivers/xaudio2/audio_driver_xaudio2.cpp @@ -203,6 +203,16 @@ AudioDriverXAudio2::AudioDriverXAudio2() : thread(NULL), mutex(NULL), current_buffer(0) { + samples_in = NULL; + buffer_size = 0; + mix_rate = 0; + channels = 0; + active = false; + thread_exited = false; + exit_thread = false; + pcm_open = false; + mastering_voice = NULL; + source_voice = NULL; wave_format = { 0 }; for (int i = 0; i < AUDIO_BUFFERS; i++) { xaudio_buffer[i] = { 0 }; diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index b5792034cfaf..21983ef60a55 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -694,6 +694,7 @@ class AnimationTrackKeyEdit : public Object { track = -1; setting = false; root_path = NULL; + undo_redo = NULL; } }; @@ -1393,6 +1394,7 @@ class AnimationMultiTrackKeyEdit : public Object { use_fps = false; setting = false; root_path = NULL; + undo_redo = NULL; } }; @@ -3242,6 +3244,8 @@ void AnimationTrackEditGroup::_bind_methods() { AnimationTrackEditGroup::AnimationTrackEditGroup() { set_mouse_filter(MOUSE_FILTER_PASS); + root = NULL; + timeline = NULL; } ////////////////////////////////////// diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index c3cbc841e4b1..e2276c0c1ee5 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -66,6 +66,8 @@ void GotoLineDialog::ok_pressed() { GotoLineDialog::GotoLineDialog() { + line_label = NULL; + set_title(TTR("Go to Line")); VBoxContainer *vbc = memnew(VBoxContainer); diff --git a/editor/collada/collada.h b/editor/collada/collada.h index 3151c179831e..79676bf67a3f 100644 --- a/editor/collada/collada.h +++ b/editor/collada/collada.h @@ -252,6 +252,9 @@ class Collada { Vector sets; Vector indices; int count; + Weights() { + count = 0; + } } weights; Map bone_rest_map; @@ -440,7 +443,10 @@ class Collada { Map material_map; Vector skeletons; - NodeGeometry() { type = TYPE_GEOMETRY; } + NodeGeometry() { + type = TYPE_GEOMETRY; + controller = false; + } }; struct NodeCamera : public Node { @@ -507,7 +513,10 @@ class Collada { Point2 out_tangent; InterpolationType interp_type; - Key() { interp_type = INTERP_LINEAR; } + Key() { + interp_type = INTERP_LINEAR; + time = 0; + } }; Vector get_value_at_time(float p_time) const; @@ -580,6 +589,7 @@ class Collada { unit_scale(1.0), up_axis(Vector3::AXIS_Y), animation_length(0) { + z_up = false; } } state; diff --git a/editor/dependency_editor.cpp b/editor/dependency_editor.cpp index da9e40998e1b..cd39a7f96e38 100644 --- a/editor/dependency_editor.cpp +++ b/editor/dependency_editor.cpp @@ -638,6 +638,8 @@ void DependencyErrorDialog::custom_action(const String &) { DependencyErrorDialog::DependencyErrorDialog() { + mode = Mode::MODE_RESOURCE; + VBoxContainer *vb = memnew(VBoxContainer); add_child(vb); diff --git a/editor/editor_autoload_settings.h b/editor/editor_autoload_settings.h index 3a6e249186b4..b55e27337cd9 100644 --- a/editor/editor_autoload_settings.h +++ b/editor/editor_autoload_settings.h @@ -64,6 +64,7 @@ class EditorAutoloadSettings : public VBoxContainer { is_singleton = false; in_editor = false; node = NULL; + order = 0; } }; diff --git a/editor/editor_help_search.cpp b/editor/editor_help_search.cpp index 6057edeedc2b..4aa6873b2bce 100644 --- a/editor/editor_help_search.cpp +++ b/editor/editor_help_search.cpp @@ -601,4 +601,8 @@ EditorHelpSearch::Runner::Runner(Control *p_icon_service, Tree *p_results_tree, search_flags(p_search_flags), empty_icon(ui_service->get_icon("ArrowRight", "EditorIcons")), disabled_color(ui_service->get_color("disabled_font_color", "Editor")) { + iterator_doc = NULL; + iterator_match = NULL; + root_item = NULL; + matched_item = NULL; } diff --git a/editor/editor_profiler.h b/editor/editor_profiler.h index c2a79a2159c1..5a90233bde9c 100644 --- a/editor/editor_profiler.h +++ b/editor/editor_profiler.h @@ -83,6 +83,10 @@ class EditorProfiler : public VBoxContainer { Metric() { valid = false; frame_number = 0; + frame_time = 0; + idle_time = 0; + physics_time = 0; + physics_frame_time = 0; } }; diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index eb611e71fe1a..fdc0872a5969 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -46,6 +46,7 @@ EditorPropertyNil::EditorPropertyNil() { Label *label = memnew(Label); label->set_text("[null]"); add_child(label); + text = NULL; } ///////////////////// TEXT ///////////////////////// diff --git a/editor/editor_sectioned_inspector.cpp b/editor/editor_sectioned_inspector.cpp index bfe3a5350167..7466b3933490 100644 --- a/editor/editor_sectioned_inspector.cpp +++ b/editor/editor_sectioned_inspector.cpp @@ -128,6 +128,7 @@ class SectionedInspectorFilter : public Object { SectionedInspectorFilter() { edited = NULL; + allow_sub = false; } }; diff --git a/editor/find_in_files.cpp b/editor/find_in_files.cpp index 50a5520b012c..d4b6c8653299 100644 --- a/editor/find_in_files.cpp +++ b/editor/find_in_files.cpp @@ -90,6 +90,7 @@ FindInFiles::FindInFiles() { _searching = false; _whole_words = true; _match_case = true; + _initial_files_count = 0; } void FindInFiles::set_search_text(String p_pattern) { diff --git a/editor/import/editor_import_collada.cpp b/editor/import/editor_import_collada.cpp index 06ac3e8812c3..f9cab33ad900 100644 --- a/editor/import/editor_import_collada.cpp +++ b/editor/import/editor_import_collada.cpp @@ -107,6 +107,8 @@ struct ColladaImport { force_make_tangents = false; apply_mesh_xform_to_vertices = true; bake_fps = 15; + scene = NULL; + use_mesh_builtin_materials = false; } }; diff --git a/editor/import/editor_scene_importer_gltf.h b/editor/import/editor_scene_importer_gltf.h index af195454035c..ce987bd8c1f4 100644 --- a/editor/import/editor_scene_importer_gltf.h +++ b/editor/import/editor_scene_importer_gltf.h @@ -182,6 +182,7 @@ class EditorSceneImporterGLTF : public EditorSceneImporter { sparse_indices_component_type = 0; sparse_values_buffer_view = 0; sparse_values_byte_offset = 0; + type = GLTFType::TYPE_MAT2; } }; struct GLTFTexture { diff --git a/editor/plugins/collision_shape_2d_editor_plugin.cpp b/editor/plugins/collision_shape_2d_editor_plugin.cpp index 82149f4b6213..51562634b032 100644 --- a/editor/plugins/collision_shape_2d_editor_plugin.cpp +++ b/editor/plugins/collision_shape_2d_editor_plugin.cpp @@ -583,6 +583,7 @@ CollisionShape2DEditor::CollisionShape2DEditor(EditorNode *p_editor) { edit_handle = -1; pressed = false; + shape_type = 0; } void CollisionShape2DEditorPlugin::edit(Object *p_obj) { diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp index 96a0cba48555..f65ceddc67a7 100644 --- a/editor/plugins/editor_preview_plugins.cpp +++ b/editor/plugins/editor_preview_plugins.cpp @@ -362,6 +362,8 @@ Ref EditorMaterialPreviewPlugin::generate(const RES &p_from, const Size EditorMaterialPreviewPlugin::EditorMaterialPreviewPlugin() { + preview_done = false; + scenario = VS::get_singleton()->scenario_create(); viewport = VS::get_singleton()->viewport_create(); @@ -769,6 +771,8 @@ Ref EditorMeshPreviewPlugin::generate(const RES &p_from, const Size2 &p EditorMeshPreviewPlugin::EditorMeshPreviewPlugin() { + preview_done = false; + scenario = VS::get_singleton()->scenario_create(); viewport = VS::get_singleton()->viewport_create(); @@ -904,6 +908,8 @@ Ref EditorFontPreviewPlugin::generate(const RES &p_from, const Size2 &p EditorFontPreviewPlugin::EditorFontPreviewPlugin() { + preview_done = false; + viewport = VS::get_singleton()->viewport_create(); VS::get_singleton()->viewport_set_update_mode(viewport, VS::VIEWPORT_UPDATE_DISABLED); VS::get_singleton()->viewport_set_vflip(viewport, true); diff --git a/editor/plugins/mesh_library_editor_plugin.cpp b/editor/plugins/mesh_library_editor_plugin.cpp index 8993b9258b7e..1ced98b4cdf7 100644 --- a/editor/plugins/mesh_library_editor_plugin.cpp +++ b/editor/plugins/mesh_library_editor_plugin.cpp @@ -317,6 +317,8 @@ void MeshLibraryEditorPlugin::make_visible(bool p_visible) { MeshLibraryEditorPlugin::MeshLibraryEditorPlugin(EditorNode *p_node) { + editor = NULL; + EDITOR_DEF("editors/grid_map/preview_size", 64); mesh_library_editor = memnew(MeshLibraryEditor(p_node)); diff --git a/editor/plugins/path_editor_plugin.cpp b/editor/plugins/path_editor_plugin.cpp index 35eef6102e72..2a8e4cfcdb4b 100644 --- a/editor/plugins/path_editor_plugin.cpp +++ b/editor/plugins/path_editor_plugin.cpp @@ -288,6 +288,8 @@ void PathSpatialGizmo::redraw() { PathSpatialGizmo::PathSpatialGizmo(Path *p_path) { + orig_in_length = 0; + orig_out_length = 0; path = p_path; set_spatial_node(p_path); } diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp index b42ef8a6cf04..f8a985029278 100644 --- a/editor/plugins/shader_editor_plugin.cpp +++ b/editor/plugins/shader_editor_plugin.cpp @@ -760,6 +760,7 @@ void ShaderEditorPlugin::apply_changes() { ShaderEditorPlugin::ShaderEditorPlugin(EditorNode *p_node) { + _2d = false; editor = p_node; shader_editor = memnew(ShaderEditor(p_node)); diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index 3e1a20f1c705..0428243c34ff 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -3432,6 +3432,8 @@ void VisualShaderNodePortPreview::_bind_methods() { } VisualShaderNodePortPreview::VisualShaderNodePortPreview() { + node = 0; + port = 0; } ////////////////////////////////// diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index f72700d17925..a82227b1e40e 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -2858,7 +2858,8 @@ void ProjectListFilter::set_filter_size(int h_size) { } ProjectListFilter::ProjectListFilter() { - + filter_option = NULL; + search_box = NULL; _current_filter = FILTER_NAME; has_search_box = false; } diff --git a/modules/bullet/generic_6dof_joint_bullet.cpp b/modules/bullet/generic_6dof_joint_bullet.cpp index ad1ec2b0d408..c566c372a9d3 100644 --- a/modules/bullet/generic_6dof_joint_bullet.cpp +++ b/modules/bullet/generic_6dof_joint_bullet.cpp @@ -43,6 +43,12 @@ Generic6DOFJointBullet::Generic6DOFJointBullet(RigidBodyBullet *rbA, RigidBodyBullet *rbB, const Transform &frameInA, const Transform &frameInB) : JointBullet() { + for (int i = 0; i < 3; i++) { + for (int j = 0; j < PhysicsServer::G6DOF_JOINT_FLAG_MAX; j++) { + flags[i][j] = false; + } + } + Transform scaled_AFrame(frameInA.scaled(rbA->get_body_scale())); scaled_AFrame.basis.rotref_posscale_decomposition(scaled_AFrame.basis); diff --git a/modules/bullet/godot_result_callbacks.h b/modules/bullet/godot_result_callbacks.h index 4d3531a5989b..42ee9e7954d4 100644 --- a/modules/bullet/godot_result_callbacks.h +++ b/modules/bullet/godot_result_callbacks.h @@ -204,7 +204,9 @@ struct GodotRestInfoContactResultCallback : public btCollisionWorld::ContactResu m_collided(false), m_min_distance(0), collide_with_bodies(p_collide_with_bodies), - collide_with_areas(p_collide_with_areas) {} + collide_with_areas(p_collide_with_areas) { + m_rest_info_collision_object = NULL; + } virtual bool needsCollision(btBroadphaseProxy *proxy0) const; diff --git a/modules/bullet/rigid_body_bullet.h b/modules/bullet/rigid_body_bullet.h index ef58e10a3c76..ace48571e177 100644 --- a/modules/bullet/rigid_body_bullet.h +++ b/modules/bullet/rigid_body_bullet.h @@ -85,7 +85,7 @@ class BulletPhysicsDirectBodyState : public PhysicsDirectBodyState { real_t deltaTime; private: - BulletPhysicsDirectBodyState() {} + BulletPhysicsDirectBodyState() { body = NULL; } public: virtual Vector3 get_total_gravity() const; diff --git a/modules/bullet/shape_bullet.cpp b/modules/bullet/shape_bullet.cpp index 97a3715e6c3c..2bd7d56ab2cc 100644 --- a/modules/bullet/shape_bullet.cpp +++ b/modules/bullet/shape_bullet.cpp @@ -445,7 +445,10 @@ btCollisionShape *ConcavePolygonShapeBullet::create_bt_shape(const btVector3 &p_ /* Height map shape */ HeightMapShapeBullet::HeightMapShapeBullet() : - ShapeBullet() {} + ShapeBullet() { + width = 0; + depth = 0; +} void HeightMapShapeBullet::set_data(const Variant &p_data) { ERR_FAIL_COND(p_data.get_type() != Variant::DICTIONARY); diff --git a/modules/bullet/soft_body_bullet.cpp b/modules/bullet/soft_body_bullet.cpp index b8ec18be7ffc..ca12be68a9b3 100644 --- a/modules/bullet/soft_body_bullet.cpp +++ b/modules/bullet/soft_body_bullet.cpp @@ -47,7 +47,9 @@ SoftBodyBullet::SoftBodyBullet() : pressure_coefficient(0.), pose_matching_coefficient(0.), damping_coefficient(0.01), - drag_coefficient(0.) {} + drag_coefficient(0.) { + mat0 = NULL; +} SoftBodyBullet::~SoftBodyBullet() { } diff --git a/modules/enet/networked_multiplayer_enet.cpp b/modules/enet/networked_multiplayer_enet.cpp index 1ca77ce0235c..8bf273805208 100644 --- a/modules/enet/networked_multiplayer_enet.cpp +++ b/modules/enet/networked_multiplayer_enet.cpp @@ -911,6 +911,8 @@ void NetworkedMultiplayerENet::_bind_methods() { NetworkedMultiplayerENet::NetworkedMultiplayerENet() { + peer = NULL; + host = NULL; active = false; server = false; refuse_connections = false; diff --git a/modules/gdnative/gdnative_library_editor_plugin.cpp b/modules/gdnative/gdnative_library_editor_plugin.cpp index 1eafabc32aa2..aa0e4efe431e 100644 --- a/modules/gdnative/gdnative_library_editor_plugin.cpp +++ b/modules/gdnative/gdnative_library_editor_plugin.cpp @@ -437,6 +437,7 @@ void GDNativeLibraryEditorPlugin::make_visible(bool p_visible) { GDNativeLibraryEditorPlugin::GDNativeLibraryEditorPlugin(EditorNode *p_node) { + editor = NULL; library_editor = memnew(GDNativeLibraryEditor); library_editor->set_custom_minimum_size(Size2(0, 250 * EDSCALE)); button = p_node->add_bottom_panel_item(TTR("GDNativeLibrary"), library_editor); diff --git a/modules/gdnative/nativescript/nativescript.h b/modules/gdnative/nativescript/nativescript.h index de0dfe56fdc3..77a8db5adf47 100644 --- a/modules/gdnative/nativescript/nativescript.h +++ b/modules/gdnative/nativescript/nativescript.h @@ -93,6 +93,8 @@ struct NativeScriptDesc { base_native_type(), documentation(), type_tag(NULL) { + base_data = NULL; + is_tool = false; zeromem(&create_func, sizeof(godot_instance_create_func)); zeromem(&destroy_func, sizeof(godot_instance_destroy_func)); } diff --git a/modules/gdnative/pluginscript/pluginscript_instance.cpp b/modules/gdnative/pluginscript/pluginscript_instance.cpp index f3c6f59573b7..5f622bf11481 100644 --- a/modules/gdnative/pluginscript/pluginscript_instance.cpp +++ b/modules/gdnative/pluginscript/pluginscript_instance.cpp @@ -118,6 +118,9 @@ bool PluginScriptInstance::refcount_decremented() { } PluginScriptInstance::PluginScriptInstance() { + _owner = NULL; + _data = NULL; + _desc = NULL; } bool PluginScriptInstance::init(PluginScript *p_script, Object *p_owner) { diff --git a/modules/gdnative/videodecoder/video_stream_gdnative.h b/modules/gdnative/videodecoder/video_stream_gdnative.h index d8aeb12ac6f5..59a7c2283dc6 100644 --- a/modules/gdnative/videodecoder/video_stream_gdnative.h +++ b/modules/gdnative/videodecoder/video_stream_gdnative.h @@ -194,7 +194,9 @@ class VideoStreamGDNative : public VideoStream { virtual void set_audio_track(int p_track); virtual Ref instance_playback(); - VideoStreamGDNative() {} + VideoStreamGDNative() { + audio_track = 0; + } }; class ResourceFormatLoaderVideoStreamGDNative : public ResourceFormatLoader { diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp index 09285b16f01a..7128dbbe6e95 100644 --- a/modules/gdscript/gdscript_compiler.cpp +++ b/modules/gdscript/gdscript_compiler.cpp @@ -2203,4 +2203,8 @@ int GDScriptCompiler::get_error_column() const { } GDScriptCompiler::GDScriptCompiler() { + parser = NULL; + main_script = NULL; + err_line = 0; + err_column = 0; } diff --git a/modules/gdscript/gdscript_function.cpp b/modules/gdscript/gdscript_function.cpp index 06bdfc3885d2..6aabd69686a5 100644 --- a/modules/gdscript/gdscript_function.cpp +++ b/modules/gdscript/gdscript_function.cpp @@ -1769,6 +1769,18 @@ void GDScriptFunction::debug_get_stack_member_state(int p_line, List arguments; CallNode() { + base = NULL; type = TYPE_CALL; } }; @@ -246,6 +256,7 @@ class VisualScriptExpression : public VisualScriptNode { VisualScriptBuiltinFunc::BuiltinFunc func; Vector arguments; BuiltinFuncNode() { + func = VisualScriptBuiltinFunc::BuiltinFunc::BYTES_TO_VAR; type = TYPE_BUILTIN_FUNC; } }; diff --git a/modules/webrtc/webrtc_multiplayer.cpp b/modules/webrtc/webrtc_multiplayer.cpp index 393d843b55eb..2b0b7d6c23d4 100644 --- a/modules/webrtc/webrtc_multiplayer.cpp +++ b/modules/webrtc/webrtc_multiplayer.cpp @@ -369,6 +369,7 @@ void WebRTCMultiplayer::close() { WebRTCMultiplayer::WebRTCMultiplayer() { unique_id = 0; + client_count = 0; next_packet_peer = 0; target_peer = 0; transfer_mode = TRANSFER_MODE_RELIABLE; diff --git a/platform/android/audio_driver_opensl.cpp b/platform/android/audio_driver_opensl.cpp index 44d5c7ca10e5..c206795ac99b 100644 --- a/platform/android/audio_driver_opensl.cpp +++ b/platform/android/audio_driver_opensl.cpp @@ -359,6 +359,9 @@ void AudioDriverOpenSL::set_pause(bool p_pause) { AudioDriverOpenSL::AudioDriverOpenSL() { s_ad = this; + buffer_size = 0; + mixdown_buffer = NULL; + last_free = 0; mutex = Mutex::create(); //NULL; pause = false; active = false; diff --git a/platform/android/file_access_android.cpp b/platform/android/file_access_android.cpp index f352900413a4..b820c67c67b9 100644 --- a/platform/android/file_access_android.cpp +++ b/platform/android/file_access_android.cpp @@ -177,6 +177,8 @@ bool FileAccessAndroid::file_exists(const String &p_path) { FileAccessAndroid::FileAccessAndroid() { a = NULL; eof = false; + len = 0; + pos = 0; } FileAccessAndroid::~FileAccessAndroid() { diff --git a/platform/android/os_android.cpp b/platform/android/os_android.cpp index c45774402efc..cfa4ce970bd2 100644 --- a/platform/android/os_android.cpp +++ b/platform/android/os_android.cpp @@ -925,6 +925,11 @@ bool OS_Android::_check_internal_feature_support(const String &p_feature) { OS_Android::OS_Android(GodotJavaWrapper *p_godot_java, GodotIOJavaWrapper *p_godot_io_java, bool p_use_apk_expansion) { + use_16bits_fbo = false; + visual_server = NULL; + input = NULL; + video_driver_index = 0; + use_apk_expansion = p_use_apk_expansion; default_videomode.width = 800; default_videomode.height = 600; diff --git a/platform/android/thread_jandroid.cpp b/platform/android/thread_jandroid.cpp index ab370e8317ee..a2e91548580a 100644 --- a/platform/android/thread_jandroid.cpp +++ b/platform/android/thread_jandroid.cpp @@ -149,6 +149,7 @@ JNIEnv *ThreadAndroid::get_env() { ThreadAndroid::ThreadAndroid() { + user = NULL; pthread = 0; } diff --git a/platform/iphone/export/export.cpp b/platform/iphone/export/export.cpp index af09b4d2e3f9..52458b33317c 100644 --- a/platform/iphone/export/export.cpp +++ b/platform/iphone/export/export.cpp @@ -1832,6 +1832,7 @@ bool EditorExportPlatformIOS::can_export(const Ref &p_preset EditorExportPlatformIOS::EditorExportPlatformIOS() { + version_code = 0; Ref img = memnew(Image(_iphone_logo)); logo.instance(); logo->create_from_image(img); diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp index 9b6942d930ce..fa5ef935f991 100644 --- a/platform/javascript/os_javascript.cpp +++ b/platform/javascript/os_javascript.cpp @@ -1218,6 +1218,9 @@ OS_JavaScript *OS_JavaScript::get_singleton() { } OS_JavaScript::OS_JavaScript() { + input = NULL; + video_driver_index = 0; + // Expose method for requesting quit. godot_js_os_request_quit_cb(&request_quit_callback); // Set canvas ID diff --git a/platform/osx/export/export.cpp b/platform/osx/export/export.cpp index acefd1db651b..d2cbc96d50f6 100644 --- a/platform/osx/export/export.cpp +++ b/platform/osx/export/export.cpp @@ -824,6 +824,8 @@ bool EditorExportPlatformOSX::can_export(const Ref &p_preset EditorExportPlatformOSX::EditorExportPlatformOSX() { + version_code = 0; + Ref img = memnew(Image(_osx_logo)); logo.instance(); logo->create_from_image(img); diff --git a/platform/server/os_server.cpp b/platform/server/os_server.cpp index 94bd81566551..ce3b1e31de52 100644 --- a/platform/server/os_server.cpp +++ b/platform/server/os_server.cpp @@ -327,6 +327,13 @@ bool OS_Server::is_disable_crash_handler() const { OS_Server::OS_Server() { + visual_server = NULL; + main_loop = NULL; + force_quit = false; + input = NULL; + power_manager = NULL; + video_driver_index = 0; + //adriver here grab = false; }; diff --git a/platform/uwp/context_egl_uwp.cpp b/platform/uwp/context_egl_uwp.cpp index f10736cf8549..e25483db5fb1 100644 --- a/platform/uwp/context_egl_uwp.cpp +++ b/platform/uwp/context_egl_uwp.cpp @@ -213,7 +213,9 @@ ContextEGL_UWP::ContextEGL_UWP(CoreWindow ^ p_window, Driver p_driver) : mEglContext(EGL_NO_CONTEXT), mEglSurface(EGL_NO_SURFACE), driver(p_driver), - window(p_window) {} + window(p_window) { + vsync = false; +} ContextEGL_UWP::~ContextEGL_UWP() { diff --git a/platform/uwp/export/export.cpp b/platform/uwp/export/export.cpp index 8ee19f5df23e..5b578c302472 100644 --- a/platform/uwp/export/export.cpp +++ b/platform/uwp/export/export.cpp @@ -644,7 +644,9 @@ void AppxPackager::finish() { package = NULL; } -AppxPackager::AppxPackager() {} +AppxPackager::AppxPackager() { + package = NULL; +} AppxPackager::~AppxPackager() {} diff --git a/platform/windows/context_gl_windows.cpp b/platform/windows/context_gl_windows.cpp index 86e39afb9da4..835339dc0fe7 100644 --- a/platform/windows/context_gl_windows.cpp +++ b/platform/windows/context_gl_windows.cpp @@ -230,6 +230,7 @@ ContextGL_Windows::ContextGL_Windows(HWND hwnd, bool p_opengl_3_context) { hWnd = hwnd; use_vsync = false; vsync_via_compositor = false; + pixel_format = 0; } ContextGL_Windows::~ContextGL_Windows() { diff --git a/platform/windows/joypad_windows.h b/platform/windows/joypad_windows.h index 92303acf474f..e0386d61fba4 100644 --- a/platform/windows/joypad_windows.h +++ b/platform/windows/joypad_windows.h @@ -108,6 +108,7 @@ class JoypadWindows { ff_timestamp = 0; ff_end_timestamp = 0; last_packet = 0; + id = 0; } }; diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index e077f32a55df..e8408da42153 100755 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -3737,6 +3737,32 @@ void OS_Windows::set_current_tablet_driver(const String &p_driver) { OS_Windows::OS_Windows(HINSTANCE _hInstance) { + min_pressure = 0; + max_pressure = 0; + tilt_supported = false; + last_pressure_update = 0; + last_pressure = 0; + ticks_per_second = 0; + ticks_start = 0; + outside = false; + old_x = 0; + old_y = 0; + visual_server = NULL; + move_timer_id = 0; + main_loop = NULL; + window_has_focus = false; + last_button_state = 0; + use_raw_input = false; + input = NULL; + joypad = NULL; + power_manager = NULL; + video_driver_index = 0; + process_map = NULL; + pre_fs_valid = false; + maximized = false; + borderless = false; + gl_context = NULL; + drop_events = false; key_event_pos = 0; layered_window = false; diff --git a/platform/x11/joypad_linux.cpp b/platform/x11/joypad_linux.cpp index 05d2e2b2dad9..17ce415d7512 100644 --- a/platform/x11/joypad_linux.cpp +++ b/platform/x11/joypad_linux.cpp @@ -54,6 +54,9 @@ JoypadLinux::Joypad::Joypad() { fd = -1; dpad = 0; devpath = ""; + force_feedback = false; + ff_effect_id = 0; + ff_effect_timestamp = 0; for (int i = 0; i < MAX_ABS; i++) { abs_info[i] = NULL; } diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index 8c864cd3700c..cfd8fd68de77 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -3966,6 +3966,34 @@ void OS_X11::update_real_mouse_position() { OS_X11::OS_X11() { + xdnd_version = 0; + visual_server = NULL; + main_loop = NULL; + x11_display = NULL; + xmbstring = NULL; + xmblen = 0; + last_timestamp = 0; + im_active = false; + last_mouse_pos_valid = false; + last_click_ms = 0; + last_click_button_index = 0; + last_button_state = 0; + events_mutex = NULL; + force_quit = false; + window_has_focus = false; + do_mouse_warp = false; + cursor_theme = NULL; + cursor_size = 0; + input = NULL; + power_manager = NULL; + video_driver_index = 0; + maximized = false; + xrr_free_monitors = NULL; + xrr_get_monitors = NULL; + xrandr_handle = NULL; + joypad = NULL; + context_gl = NULL; + #ifdef PULSEAUDIO_ENABLED AudioDriverManager::add_driver(&driver_pulseaudio); #endif diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp index 7db448ce921a..70478cfea97a 100644 --- a/scene/2d/camera_2d.cpp +++ b/scene/2d/camera_2d.cpp @@ -788,6 +788,8 @@ void Camera2D::_bind_methods() { Camera2D::Camera2D() { + viewport = NULL; + anchor_mode = ANCHOR_MODE_DRAG_CENTER; rotating = false; current = false; diff --git a/scene/2d/light_occluder_2d.cpp b/scene/2d/light_occluder_2d.cpp index 9b4109bb5e9c..0af19b933ebb 100644 --- a/scene/2d/light_occluder_2d.cpp +++ b/scene/2d/light_occluder_2d.cpp @@ -302,6 +302,7 @@ void LightOccluder2D::_bind_methods() { LightOccluder2D::LightOccluder2D() { + enabled = false; occluder = VS::get_singleton()->canvas_light_occluder_create(); mask = 1; set_notify_transform(true); diff --git a/scene/2d/line_builder.cpp b/scene/2d/line_builder.cpp index b9c004dfb9bc..49ab9c840ae8 100644 --- a/scene/2d/line_builder.cpp +++ b/scene/2d/line_builder.cpp @@ -93,6 +93,7 @@ static inline Vector2 interpolate(const Rect2 &r, const Vector2 &v) { //---------------------------------------------------------------------------- LineBuilder::LineBuilder() { + texture_mode = Line2D::LineTextureMode::LINE_TEXTURE_NONE; joint_mode = Line2D::LINE_JOINT_SHARP; width = 10; curve = NULL; diff --git a/scene/2d/physics_body_2d.h b/scene/2d/physics_body_2d.h index 1879b89da928..52e3abab2031 100644 --- a/scene/2d/physics_body_2d.h +++ b/scene/2d/physics_body_2d.h @@ -161,10 +161,15 @@ class RigidBody2D : public PhysicsBody2D { return body_shape < p_sp.body_shape; } - ShapePair() {} + ShapePair() { + body_shape = 0; + local_shape = 0; + tagged = false; + } ShapePair(int p_bs, int p_ls) { body_shape = p_bs; local_shape = p_ls; + tagged = false; } }; struct RigidBody2D_RemoveAction { diff --git a/scene/2d/tile_map.h b/scene/2d/tile_map.h index 13ffb08fae92..2bd714ef16c2 100644 --- a/scene/2d/tile_map.h +++ b/scene/2d/tile_map.h @@ -173,7 +173,7 @@ class TileMap : public Node2D { navpoly_ids = q.navpoly_ids; } Quadrant() : - dirty_list(this) {} + dirty_list(this) { shape_owner_id = 0; } }; Map quadrant_map; diff --git a/scene/3d/audio_stream_player_3d.h b/scene/3d/audio_stream_player_3d.h index 2fd66d4f37dc..b0f921ff00b3 100644 --- a/scene/3d/audio_stream_player_3d.h +++ b/scene/3d/audio_stream_player_3d.h @@ -81,6 +81,7 @@ class AudioStreamPlayer3D : public Spatial { Viewport *viewport; //pointer only used for reference to previous mix Output() { + pitch_scale = 0; filter_gain = 0; viewport = NULL; reverb_bus_index = -1; diff --git a/scene/3d/light.cpp b/scene/3d/light.cpp index 3e778aa0e241..0266dc0bc9b4 100644 --- a/scene/3d/light.cpp +++ b/scene/3d/light.cpp @@ -331,6 +331,12 @@ Light::Light(VisualServer::LightType p_type) { } Light::Light() { + shadow = false; + negative = false; + reverse_cull = false; + cull_mask = 0; + editor_only = false; + bake_mode = BakeMode::BAKE_ALL; type = VisualServer::LIGHT_DIRECTIONAL; ERR_PRINT("Light should not be instanced directly; use the DirectionalLight, OmniLight or SpotLight subtypes instead."); diff --git a/scene/3d/soft_body.cpp b/scene/3d/soft_body.cpp index bf3d6437ed81..5843e8e9d2eb 100644 --- a/scene/3d/soft_body.cpp +++ b/scene/3d/soft_body.cpp @@ -38,7 +38,12 @@ #include "scene/3d/skeleton.h" #include "servers/physics_server.h" -SoftBodyVisualServerHandler::SoftBodyVisualServerHandler() {} +SoftBodyVisualServerHandler::SoftBodyVisualServerHandler() { + surface = 0; + stride = 0; + offset_vertices = 0; + offset_normal = 0; +} void SoftBodyVisualServerHandler::prepare(RID p_mesh, int p_surface) { clear(); @@ -707,6 +712,8 @@ SoftBody::SoftBody() : pinned_points_cache_dirty(true), ray_pickable(true) { + debug_mesh = NULL; + capture_input_on_drag = false; PhysicsServer::get_singleton()->body_attach_object_instance_id(physics_rid, get_instance_id()); } diff --git a/scene/3d/sprite_3d.cpp b/scene/3d/sprite_3d.cpp index 60442346f34b..6013cf72c9dc 100644 --- a/scene/3d/sprite_3d.cpp +++ b/scene/3d/sprite_3d.cpp @@ -1255,6 +1255,9 @@ void AnimatedSprite3D::_bind_methods() { AnimatedSprite3D::AnimatedSprite3D() { + centered = false; + hflip = false; + vflip = false; frame = 0; playing = false; animation = "default"; diff --git a/scene/3d/vehicle_body.cpp b/scene/3d/vehicle_body.cpp index 75cd0f5a92f3..8b5630f16c9d 100644 --- a/scene/3d/vehicle_body.cpp +++ b/scene/3d/vehicle_body.cpp @@ -388,6 +388,9 @@ VehicleWheel::VehicleWheel() { m_suspensionRelativeVelocity = 0; m_clippedInvContactDotSuspension = 1.0; + + m_raycastInfo.m_suspensionLength = 0; + m_raycastInfo.m_groundObject = NULL; m_raycastInfo.m_isInContact = false; m_raycastInfo.m_suspensionLength = 0.0; diff --git a/scene/3d/voxel_light_baker.cpp b/scene/3d/voxel_light_baker.cpp index 0af8cbf20c18..c6a988311531 100644 --- a/scene/3d/voxel_light_baker.cpp +++ b/scene/3d/voxel_light_baker.cpp @@ -1610,6 +1610,17 @@ Transform VoxelLightBaker::get_to_cell_space_xform() const { return to_cell_space; } VoxelLightBaker::VoxelLightBaker() { + cell_subdiv = 0; + first_leaf = 0; + leaf_voxel_count = 0; + direct_lights_baked = false; + axis_cell_size[0] = 0; + axis_cell_size[1] = 0; + axis_cell_size[2] = 0; + cell_size = 0; + bake_quality = BakeQuality::BAKE_QUALITY_HIGH; + max_original_cells = 0; + color_scan_cell_width = 4; bake_texture_size = 128; propagation = 0.85; diff --git a/scene/animation/animation_tree.h b/scene/animation/animation_tree.h index 39e2e7732c3b..6f28f0e66498 100644 --- a/scene/animation/animation_tree.h +++ b/scene/animation/animation_tree.h @@ -202,6 +202,7 @@ class AnimationTree : public Node { Vector3 scale; TrackCacheTransform() { + rot_blend_accum = 0; type = Animation::TYPE_TRANSFORM; spatial = NULL; bone_idx = -1; diff --git a/scene/animation/animation_tree_player.h b/scene/animation/animation_tree_player.h index 53ef72275ea2..98a52a982c65 100644 --- a/scene/animation/animation_tree_player.h +++ b/scene/animation/animation_tree_player.h @@ -138,7 +138,10 @@ class AnimationTreePlayer : public Node { Vector inputs; - NodeBase() { cycletest = false; }; + NodeBase() { + type = NODE_MAX; + cycletest = false; + }; virtual ~NodeBase() { cycletest = false; } }; @@ -171,6 +174,8 @@ class AnimationTreePlayer : public Node { HashMap filter; AnimationNode() { + time = 0; + step = 0; type = NODE_ANIMATION; next = NULL; last_version = 0; @@ -197,6 +202,9 @@ class AnimationTreePlayer : public Node { HashMap filter; OneShotNode() { + autorestart_random_delay = 0; + time = 0; + remaining = 0; type = NODE_ONESHOT; fade_in = 0; fade_out = 0; @@ -214,6 +222,7 @@ class AnimationTreePlayer : public Node { float amount; MixNode() { + amount = 0; type = NODE_MIX; inputs.resize(2); } @@ -291,6 +300,7 @@ class AnimationTreePlayer : public Node { float xfade; TransitionNode() { + time = 0; type = NODE_TRANSITION; xfade = 0; inputs.resize(1); diff --git a/scene/animation/root_motion_view.cpp b/scene/animation/root_motion_view.cpp index 2c1ece2c8eb9..b7221f151a65 100644 --- a/scene/animation/root_motion_view.cpp +++ b/scene/animation/root_motion_view.cpp @@ -193,6 +193,8 @@ void RootMotionView::_bind_methods() { } RootMotionView::RootMotionView() { + use_in_game = false; + first = false; zero_y = true; radius = 10; cell_size = 1; diff --git a/scene/animation/skeleton_ik.h b/scene/animation/skeleton_ik.h index d646a883d3d5..bc0f700d922b 100644 --- a/scene/animation/skeleton_ik.h +++ b/scene/animation/skeleton_ik.h @@ -114,7 +114,8 @@ class FabrikInverseKinematic { skeleton(NULL), min_distance(0.01), max_iterations(10), - root_bone(-1) {} + root_bone(-1) { + } }; private: diff --git a/scene/animation/tween.h b/scene/animation/tween.h index 2033faf6c0d8..6dbc828e8482 100644 --- a/scene/animation/tween.h +++ b/scene/animation/tween.h @@ -102,6 +102,10 @@ class Tween : public Node { Variant arg[5]; int uid; InterpolateData() { + type = InterpolateType::FOLLOW_METHOD; + trans_type = TransitionType::TRANS_BACK; + ease_type = EaseType::EASE_COUNT; + args = 0; active = false; finish = false; call_deferred = false; diff --git a/scene/debugger/script_debugger_remote.cpp b/scene/debugger/script_debugger_remote.cpp index 2537e7850590..5eb3173f7a0f 100644 --- a/scene/debugger/script_debugger_remote.cpp +++ b/scene/debugger/script_debugger_remote.cpp @@ -1270,6 +1270,12 @@ ScriptDebuggerRemote::ScriptDebuggerRemote() : locking(false), poll_every(0), scene_tree(NULL) { + frame_time = 0; + idle_time = 0; + physics_time = 0; + physics_frame_time = 0; + n_warnings_dropped = 0; + skip_breakpoints = false; packet_peer_stream->set_stream_peer(tcp_client); packet_peer_stream->set_output_buffer_max_size((1024 * 1024 * 8) - 4); // 8 MiB should be way more than enough, minus 4 bytes for separator. diff --git a/scene/gui/popup_menu.h b/scene/gui/popup_menu.h index a6611299bbb9..40be31c071f9 100644 --- a/scene/gui/popup_menu.h +++ b/scene/gui/popup_menu.h @@ -63,6 +63,7 @@ class PopupMenu : public Popup { bool shortcut_is_disabled; Item() { + id = 0; checked = false; checkable_type = CHECKABLE_TYPE_NONE; separator = false; diff --git a/scene/gui/rich_text_label.h b/scene/gui/rich_text_label.h index 38299fb439c7..93bcfa3078d4 100644 --- a/scene/gui/rich_text_label.h +++ b/scene/gui/rich_text_label.h @@ -98,6 +98,10 @@ class RichTextLabel : public Control { int maximum_width; Line() { + height_cache = 0; + height_accum_cache = 0; + minimum_width = 0; + maximum_width = 0; from = NULL; char_count = 0; } @@ -119,6 +123,8 @@ class RichTextLabel : public Control { } Item() { + index = 0; + type = ItemType::ITEM_ALIGN; parent = NULL; E = NULL; line = 0; @@ -134,6 +140,7 @@ class RichTextLabel : public Control { ItemFrame *parent_frame; ItemFrame() { + first_invalid_line = 0; type = ITEM_FRAME; parent_frame = NULL; cell = false; @@ -177,17 +184,26 @@ class RichTextLabel : public Control { struct ItemAlign : public Item { Align align; - ItemAlign() { type = ITEM_ALIGN; } + ItemAlign() { + type = ITEM_ALIGN; + align = Align::ALIGN_CENTER; + } }; struct ItemIndent : public Item { int level; - ItemIndent() { type = ITEM_INDENT; } + ItemIndent() { + type = ITEM_INDENT; + level = 0; + } }; struct ItemList : public Item { ListType list_type; - ItemList() { type = ITEM_LIST; } + ItemList() { + type = ITEM_LIST; + list_type = ListType::LIST_DOTS; + } }; struct ItemNewline : public Item { @@ -205,14 +221,21 @@ class RichTextLabel : public Control { Vector columns; int total_width; - ItemTable() { type = ITEM_TABLE; } + ItemTable() { + total_width = 0; + type = ITEM_TABLE; + } }; struct ItemFade : public Item { int starting_index; int length; - ItemFade() { type = ITEM_FADE; } + ItemFade() { + type = ITEM_FADE; + starting_index = 0; + length = 0; + } }; struct ItemFX : public Item { @@ -230,6 +253,7 @@ class RichTextLabel : public Control { uint64_t _previous_rng; ItemShake() { + _previous_rng = 0; strength = 0; rate = 0.0f; _current_rng = 0; diff --git a/scene/gui/scroll_bar.cpp b/scene/gui/scroll_bar.cpp index 4ab41e9166ff..8f9648f9ef1e 100644 --- a/scene/gui/scroll_bar.cpp +++ b/scene/gui/scroll_bar.cpp @@ -668,6 +668,10 @@ void ScrollBar::_bind_methods() { ScrollBar::ScrollBar(Orientation p_orientation) { + last_drag_node_time = 0; + time_since_motion = 0; + click_handled = false; + orientation = p_orientation; highlight = HIGHLIGHT_NONE; custom_step = -1; diff --git a/scene/gui/split_container.cpp b/scene/gui/split_container.cpp index d88badf28730..4c18e9e0722c 100644 --- a/scene/gui/split_container.cpp +++ b/scene/gui/split_container.cpp @@ -360,6 +360,8 @@ void SplitContainer::_bind_methods() { SplitContainer::SplitContainer(bool p_vertical) { + drag_from = 0; + drag_ofs = 0; mouse_inside = false; split_offset = 0; should_clamp_split_offset = false; diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h index 344c690a3caa..5dfd307913b2 100644 --- a/scene/gui/text_edit.h +++ b/scene/gui/text_edit.h @@ -149,7 +149,10 @@ class TextEdit : public Control { void clear_wrap_cache(); void clear_info_icons(); _FORCE_INLINE_ const String &operator[](int p_line) const { return text[p_line].data; } - Text() { indent_size = 4; } + Text() { + indent_size = 4; + color_regions = NULL; + } }; private: diff --git a/scene/gui/tree.h b/scene/gui/tree.h index 6215e4a12545..b1c4aa9d4779 100644 --- a/scene/gui/tree.h +++ b/scene/gui/tree.h @@ -112,6 +112,7 @@ class TreeItem : public Object { Cell() { + custom_bg_outline = false; custom_draw_obj = 0; custom_button = false; mode = TreeItem::CELL_MODE_STRING; diff --git a/scene/main/node.h b/scene/main/node.h index 1f8ec7387963..8f4080dce14b 100644 --- a/scene/main/node.h +++ b/scene/main/node.h @@ -82,7 +82,10 @@ class Node : public Object { bool persistent; SceneTree::Group *group; - GroupData() { persistent = false; } + GroupData() { + persistent = false; + group = NULL; + } }; struct Data { diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index 07efa4973d6c..6fbb2940a12b 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -194,6 +194,15 @@ class TooltipLabel : public Label { Viewport::GUI::GUI() { + key_event_accepted = false; + last_mouse_focus = NULL; + drag_attempted = false; + drag_preview = NULL; + tooltip_timer = 0; + tooltip_delay = 0; + roots_order_dirty = false; + canvas_sort_index = 0; + dragging = false; mouse_focus = NULL; mouse_click_grabber = NULL; diff --git a/scene/resources/animation.h b/scene/resources/animation.h index 0f8aa08f2b68..7500847f52a6 100644 --- a/scene/resources/animation.h +++ b/scene/resources/animation.h @@ -72,6 +72,7 @@ class Animation : public Resource { bool imported; bool enabled; Track() { + type = TrackType::TYPE_ANIMATION; interpolation = INTERPOLATION_LINEAR; imported = false; loop_wrap = true; @@ -84,7 +85,10 @@ class Animation : public Resource { float transition; float time; // time in secs - Key() { transition = 1; } + Key() { + transition = 1; + time = 0; + } }; // transform key holds either Vector3 or Quaternion @@ -121,6 +125,7 @@ class Animation : public Resource { ValueTrack() { type = TYPE_VALUE; update_mode = UPDATE_CONTINUOUS; + update_on_seek = false; } }; diff --git a/scene/resources/dynamic_font.cpp b/scene/resources/dynamic_font.cpp index 2f5a2131e904..1b8f18c49933 100644 --- a/scene/resources/dynamic_font.cpp +++ b/scene/resources/dynamic_font.cpp @@ -1042,6 +1042,7 @@ SelfList::List *DynamicFont::dynamic_fonts = NULL; DynamicFont::DynamicFont() : font_list(this) { + valid = false; cache_id.size = 16; outline_cache_id.size = 16; spacing_top = 0; diff --git a/scene/resources/dynamic_font.h b/scene/resources/dynamic_font.h index 05509451cc1e..50a9262b5c89 100644 --- a/scene/resources/dynamic_font.h +++ b/scene/resources/dynamic_font.h @@ -151,6 +151,9 @@ class DynamicFontAtSize : public Reference { float advance; Character() { + found = false; + h_align = 0; + advance = 0; texture_idx = 0; v_align = 0; } diff --git a/scene/resources/font.h b/scene/resources/font.h index c2451e3f6de0..cab21b972659 100644 --- a/scene/resources/font.h +++ b/scene/resources/font.h @@ -122,6 +122,8 @@ class BitmapFont : public Font { Character() { texture_idx = 0; v_align = 0; + h_align = 0; + advance = 0; } }; diff --git a/scene/resources/resource_format_text.cpp b/scene/resources/resource_format_text.cpp index 709366444c3e..b30c20052861 100644 --- a/scene/resources/resource_format_text.cpp +++ b/scene/resources/resource_format_text.cpp @@ -665,6 +665,12 @@ void ResourceInteractiveLoaderText::set_translation_remapped(bool p_remapped) { } ResourceInteractiveLoaderText::ResourceInteractiveLoaderText() { + f = NULL; + is_scene = false; + ignore_resource_parsing = false; + resources_total = 0; + resource_current = 0; + lines = 0; translation_remapped = false; } diff --git a/scene/resources/visual_shader.cpp b/scene/resources/visual_shader.cpp index 47db5e677a29..0cdc4a61ffe8 100644 --- a/scene/resources/visual_shader.cpp +++ b/scene/resources/visual_shader.cpp @@ -2296,6 +2296,7 @@ String VisualShaderNodeOutput::generate_code(Shader::Mode p_mode, VisualShader:: } VisualShaderNodeOutput::VisualShaderNodeOutput() { + shader_type = VisualShader::Type::TYPE_MAX; } /////////////////////////// diff --git a/servers/arvr_server.cpp b/servers/arvr_server.cpp index 641d23f93507..d6dab63b401d 100644 --- a/servers/arvr_server.cpp +++ b/servers/arvr_server.cpp @@ -368,6 +368,9 @@ void ARVRServer::_mark_commit() { ARVRServer::ARVRServer() { singleton = this; + last_process_usec = 0; + last_commit_usec = 0; + last_frame_usec = 0; world_scale = 1.0; }; diff --git a/servers/audio/audio_driver_dummy.cpp b/servers/audio/audio_driver_dummy.cpp index 6bdede0cc860..1c43e97ca126 100644 --- a/servers/audio/audio_driver_dummy.cpp +++ b/servers/audio/audio_driver_dummy.cpp @@ -127,6 +127,13 @@ void AudioDriverDummy::finish() { AudioDriverDummy::AudioDriverDummy() { + samples_in = NULL; + buffer_frames = 0; + mix_rate = 0; + channels = 0; + active = false; + thread_exited = false; + exit_thread = false; mutex = NULL; thread = NULL; }; diff --git a/servers/audio/audio_stream.cpp b/servers/audio/audio_stream.cpp index def5f0d1642f..4183781af8c1 100644 --- a/servers/audio/audio_stream.cpp +++ b/servers/audio/audio_stream.cpp @@ -234,6 +234,8 @@ AudioStreamPlaybackMicrophone::~AudioStreamPlaybackMicrophone() { } AudioStreamPlaybackMicrophone::AudioStreamPlaybackMicrophone() { + active = false; + input_ofs = 0; } //////////////////////////////// diff --git a/servers/audio/effects/audio_effect_pitch_shift.cpp b/servers/audio/effects/audio_effect_pitch_shift.cpp index 8dc88ddff0b0..f3fdd4e1e33c 100644 --- a/servers/audio/effects/audio_effect_pitch_shift.cpp +++ b/servers/audio/effects/audio_effect_pitch_shift.cpp @@ -360,6 +360,9 @@ void AudioEffectPitchShift::_bind_methods() { } AudioEffectPitchShift::AudioEffectPitchShift() { + wet = 0; + dry = 0; + filter = false; pitch_scale = 1.0; oversampling = 4; fft_size = FFT_SIZE_2048; diff --git a/servers/audio/effects/audio_effect_record.cpp b/servers/audio/effects/audio_effect_record.cpp index 22392ec02bad..f14b4fbf501a 100644 --- a/servers/audio/effects/audio_effect_record.cpp +++ b/servers/audio/effects/audio_effect_record.cpp @@ -136,6 +136,11 @@ void AudioEffectRecordInstance::finish() { AudioEffectRecordInstance::~AudioEffectRecordInstance() { + is_recording = false; + io_thread = NULL; + ring_buffer_pos = 0; + ring_buffer_mask = 0; + ring_buffer_read_pos = 0; finish(); } diff --git a/servers/audio/effects/audio_effect_record.h b/servers/audio/effects/audio_effect_record.h index 7fc046440e3c..b9b124bc38ba 100644 --- a/servers/audio/effects/audio_effect_record.h +++ b/servers/audio/effects/audio_effect_record.h @@ -72,7 +72,13 @@ class AudioEffectRecordInstance : public AudioEffectInstance { virtual bool process_silence() const; AudioEffectRecordInstance() : - thread_active(false) {} + thread_active(false) { + is_recording = false; + io_thread = NULL; + ring_buffer_pos = 0; + ring_buffer_mask = 0; + ring_buffer_read_pos = 0; + } ~AudioEffectRecordInstance(); }; diff --git a/servers/audio/effects/audio_effect_stereo_enhance.cpp b/servers/audio/effects/audio_effect_stereo_enhance.cpp index a17ffc33e3b1..f357151fddfc 100644 --- a/servers/audio/effects/audio_effect_stereo_enhance.cpp +++ b/servers/audio/effects/audio_effect_stereo_enhance.cpp @@ -152,6 +152,7 @@ void AudioEffectStereoEnhance::_bind_methods() { } AudioEffectStereoEnhance::AudioEffectStereoEnhance() { + volume_db = 0; pan_pullout = 1; time_pullout = 0; surround = 0; diff --git a/servers/audio/effects/reverb.h b/servers/audio/effects/reverb.h index 22ae59385ab7..1cd0dea13ee3 100644 --- a/servers/audio/effects/reverb.h +++ b/servers/audio/effects/reverb.h @@ -67,6 +67,8 @@ class Reverb { int extra_spread_frames; Comb() { + damp = 0; + extra_spread_frames = 0; size = 0; buffer = 0; feedback = 0; @@ -85,6 +87,7 @@ class Reverb { size = 0; buffer = 0; pos = 0; + extra_spread_frames = 0; } }; diff --git a/servers/camera/camera_feed.cpp b/servers/camera/camera_feed.cpp index 65f876e4fd35..8d06e68fd4cb 100644 --- a/servers/camera/camera_feed.cpp +++ b/servers/camera/camera_feed.cpp @@ -136,6 +136,8 @@ RID CameraFeed::get_texture(CameraServer::FeedImage p_which) { CameraFeed::CameraFeed() { // initialize our feed id = CameraServer::get_singleton()->get_free_id(); + base_height = 0; + base_width = 0; name = "???"; active = false; datatype = CameraFeed::FEED_RGB; diff --git a/servers/physics/collision_object_sw.h b/servers/physics/collision_object_sw.h index e352ccc99d80..63f689d9d990 100644 --- a/servers/physics/collision_object_sw.h +++ b/servers/physics/collision_object_sw.h @@ -68,7 +68,11 @@ class CollisionObjectSW : public ShapeOwnerSW { ShapeSW *shape; bool disabled; - Shape() { disabled = false; } + Shape() { + disabled = false; + bpid = 0; + shape = NULL; + } }; Vector shapes; diff --git a/servers/physics/constraint_sw.h b/servers/physics/constraint_sw.h index 0588cbc4518a..a89ecaaba36e 100644 --- a/servers/physics/constraint_sw.h +++ b/servers/physics/constraint_sw.h @@ -47,6 +47,8 @@ class ConstraintSW : public RID_Data { protected: ConstraintSW(BodySW **p_body_ptr = NULL, int p_body_count = 0) { + island_next = NULL; + island_list_next = NULL; _body_ptr = p_body_ptr; _body_count = p_body_count; island_step = 0; diff --git a/servers/physics/gjk_epa.cpp b/servers/physics/gjk_epa.cpp index ac747101c9f6..47a319eb85f8 100644 --- a/servers/physics/gjk_epa.cpp +++ b/servers/physics/gjk_epa.cpp @@ -169,6 +169,7 @@ struct GJK } void Initialize() { + m_simplex = nullptr; m_ray = Vector3(0,0,0); m_nfree = 0; m_status = eStatus::Failed; diff --git a/servers/physics/physics_server_sw.cpp b/servers/physics/physics_server_sw.cpp index 0e20a597993e..40cbd438cf30 100644 --- a/servers/physics/physics_server_sw.cpp +++ b/servers/physics/physics_server_sw.cpp @@ -1580,6 +1580,10 @@ PhysicsServerSW::PhysicsServerSW() { active_objects = 0; collision_pairs = 0; + iterations = 0; + stepper = NULL; + direct_state = NULL; + active = true; flushing_queries = false; }; diff --git a/servers/physics/shape_sw.h b/servers/physics/shape_sw.h index 9f39a5f0b45f..9cc5e47884ce 100644 --- a/servers/physics/shape_sw.h +++ b/servers/physics/shape_sw.h @@ -465,7 +465,10 @@ struct MotionShapeSW : public ShapeSW { virtual void set_data(const Variant &p_data) {} virtual Variant get_data() const { return Variant(); } - MotionShapeSW() { configure(AABB()); } + MotionShapeSW() { + configure(AABB()); + shape = NULL; + } }; struct _ShapeTestConvexBSPSW { diff --git a/servers/physics_2d/broad_phase_2d_hash_grid.cpp b/servers/physics_2d/broad_phase_2d_hash_grid.cpp index be73d908deed..c0686f7b2e01 100644 --- a/servers/physics_2d/broad_phase_2d_hash_grid.cpp +++ b/servers/physics_2d/broad_phase_2d_hash_grid.cpp @@ -633,6 +633,9 @@ BroadPhase2DSW *BroadPhase2DHashGrid::_create() { BroadPhase2DHashGrid::BroadPhase2DHashGrid() { + pair_userdata = NULL; + unpair_userdata = NULL; + hash_table_size = GLOBAL_DEF("physics/2d/bp_hash_table_size", 4096); ProjectSettings::get_singleton()->set_custom_property_info("physics/2d/bp_hash_table_size", PropertyInfo(Variant::INT, "physics/2d/bp_hash_table_size", PROPERTY_HINT_RANGE, "0,8192,1,or_greater")); hash_table_size = Math::larger_prime(hash_table_size); diff --git a/servers/physics_2d/collision_solver_2d_sat.cpp b/servers/physics_2d/collision_solver_2d_sat.cpp index 75390e74e81f..0fccac7a8c85 100644 --- a/servers/physics_2d/collision_solver_2d_sat.cpp +++ b/servers/physics_2d/collision_solver_2d_sat.cpp @@ -189,8 +189,10 @@ class SeparatorAxisTest2D { const Transform2D *transform_B; real_t best_depth; Vector2 best_axis; +#ifdef DEBUG_ENABLED int best_axis_count; int best_axis_index; +#endif Vector2 motion_A; Vector2 motion_B; real_t margin_A; diff --git a/servers/physics_2d/constraint_2d_sw.h b/servers/physics_2d/constraint_2d_sw.h index f9e872bc7827..b783a787f7ae 100644 --- a/servers/physics_2d/constraint_2d_sw.h +++ b/servers/physics_2d/constraint_2d_sw.h @@ -46,6 +46,8 @@ class Constraint2DSW : public RID_Data { protected: Constraint2DSW(Body2DSW **p_body_ptr = NULL, int p_body_count = 0) { + island_list_next = NULL; + island_next = NULL; _body_ptr = p_body_ptr; _body_count = p_body_count; island_step = 0; diff --git a/servers/physics_2d/physics_2d_server_sw.cpp b/servers/physics_2d/physics_2d_server_sw.cpp index dd1e78d094e6..740cb303e938 100644 --- a/servers/physics_2d/physics_2d_server_sw.cpp +++ b/servers/physics_2d/physics_2d_server_sw.cpp @@ -1439,6 +1439,11 @@ Physics2DServerSW *Physics2DServerSW::singletonsw = NULL; Physics2DServerSW::Physics2DServerSW() { + iterations = 0; + doing_sync = false; + stepper = NULL; + direct_state = NULL; + singletonsw = this; BroadPhase2DSW::create_func = BroadPhase2DHashGrid::_create; //BroadPhase2DSW::create_func=BroadPhase2DBasic::_create; diff --git a/servers/physics_2d/shape_2d_sw.h b/servers/physics_2d/shape_2d_sw.h index 1114934d3271..d20e18d1d320 100644 --- a/servers/physics_2d/shape_2d_sw.h +++ b/servers/physics_2d/shape_2d_sw.h @@ -227,8 +227,14 @@ class RayShape2DSW : public Shape2DSW { DEFAULT_PROJECT_RANGE_CAST - _FORCE_INLINE_ RayShape2DSW() {} - _FORCE_INLINE_ RayShape2DSW(real_t p_length) { length = p_length; } + _FORCE_INLINE_ RayShape2DSW() { + slips_on_slope = false; + length = 0; + } + _FORCE_INLINE_ RayShape2DSW(real_t p_length) { + length = p_length; + slips_on_slope = false; + } }; class SegmentShape2DSW : public Shape2DSW { diff --git a/servers/visual/rasterizer.h b/servers/visual/rasterizer.h index 894b782f5b38..5a08ebbb8f9f 100644 --- a/servers/visual/rasterizer.h +++ b/servers/visual/rasterizer.h @@ -128,6 +128,8 @@ class RasterizerScene { InstanceBase() : dependency_item(this) { + mirror = false; + depth = 0; base_type = VS::INSTANCE_NONE; cast_shadows = VS::SHADOW_CASTING_SETTING_ON; receive_shadows = true; @@ -664,6 +666,8 @@ class RasterizerCanvas { RID light_internal; Light() { + radius_cache = 0; + shadows_next_ptr = NULL; enabled = true; color = Color(1, 1, 1); shadow_color = Color(0, 0, 0, 0); @@ -722,7 +726,11 @@ class RasterizerCanvas { Color color; float width; bool antialiased; - CommandLine() { type = TYPE_LINE; } + CommandLine() { + type = TYPE_LINE; + width = 0; + antialiased = false; + } }; struct CommandPolyLine : public Command { @@ -768,6 +776,9 @@ class RasterizerCanvas { CommandNinePatch() { draw_center = true; type = TYPE_NINEPATCH; + for (int i = 0; i < 4; i++) { + margin[i] = 0; + } } }; @@ -803,6 +814,8 @@ class RasterizerCanvas { CommandPolygon() { type = TYPE_POLYGON; count = 0; + antialiased = false; + antialiasing_use_indices = false; } }; @@ -837,7 +850,10 @@ class RasterizerCanvas { Point2 pos; float radius; Color color; - CommandCircle() { type = TYPE_CIRCLE; } + CommandCircle() { + type = TYPE_CIRCLE; + radius = 0; + } }; struct CommandTransform : public Command { diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp index 3f6f99938ff7..b88173cce2fd 100644 --- a/servers/visual/shader_language.cpp +++ b/servers/visual/shader_language.cpp @@ -5926,6 +5926,16 @@ ShaderLanguage::ShaderNode *ShaderLanguage::get_shader() { ShaderLanguage::ShaderLanguage() { + error_set = false; + error_line = 0; + char_idx = 0; + tk_line = 0; + shader = NULL; + completion_type = CompletionType::COMPLETION_CALL_ARGUMENTS; + completion_line = 0; + completion_block = NULL; + completion_base = DataType::TYPE_BOOL; + completion_argument = 0; nodes = NULL; completion_class = TAG_GLOBAL; } diff --git a/servers/visual/visual_server_scene.cpp b/servers/visual/visual_server_scene.cpp index c4c2a3186996..40446ad4189e 100644 --- a/servers/visual/visual_server_scene.cpp +++ b/servers/visual/visual_server_scene.cpp @@ -3672,6 +3672,14 @@ bool VisualServerScene::free(RID p_rid) { VisualServerScene *VisualServerScene::singleton = NULL; VisualServerScene::VisualServerScene() { + instance_cull_count = 0; + light_cull_count = 0; + directional_light_count = 0; + reflection_probe_cull_count = 0; + probe_bake_mutex = NULL; + probe_bake_sem = NULL; + probe_bake_thread = NULL; + probe_bake_thread_exit = false; #ifndef NO_THREADS probe_bake_sem = Semaphore::create(); diff --git a/servers/visual/visual_server_scene.h b/servers/visual/visual_server_scene.h index 6c4798b609ce..8bab3e485768 100644 --- a/servers/visual/visual_server_scene.h +++ b/servers/visual/visual_server_scene.h @@ -346,6 +346,7 @@ class VisualServerScene { InstanceReflectionProbeData() : update_list(this) { + owner = NULL; reflection_dirty = true; render_step = -1; } @@ -479,6 +480,7 @@ class VisualServerScene { InstanceGIProbeData() : update_element(this) { + owner = NULL; invalid = true; base_version = 0; dynamic.updating_stage = GI_UPDATE_STAGE_CHECK; diff --git a/servers/visual/visual_server_viewport.h b/servers/visual/visual_server_viewport.h index 7cab3a4bba0e..c609dd6151f7 100644 --- a/servers/visual/visual_server_viewport.h +++ b/servers/visual/visual_server_viewport.h @@ -110,6 +110,9 @@ class VisualServerViewport { Map canvas_map; Viewport() { + viewport_render_direct_to_screen = false; + hide_canvas = false; + hide_scenario = false; update_mode = VS::VIEWPORT_UPDATE_WHEN_VISIBLE; clear_mode = VS::VIEWPORT_CLEAR_ALWAYS; transparent_bg = false; diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp index f022651a8ad5..6f564e90414d 100644 --- a/servers/visual_server.cpp +++ b/servers/visual_server.cpp @@ -2389,6 +2389,8 @@ void VisualServer::set_render_loop_enabled(bool p_enabled) { VisualServer::VisualServer() { + mm_policy = 0; + //ERR_FAIL_COND(singleton); singleton = this;