summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--DONORS.md64
-rw-r--r--core/math/triangulate.cpp2
-rw-r--r--core/os/file_access.cpp3
-rw-r--r--core/safe_refcount.cpp8
-rw-r--r--core/script_debugger_local.cpp3
-rw-r--r--core/variant_call.cpp2
-rw-r--r--doc/classes/Control.xml6
-rw-r--r--doc/classes/Image.xml2
-rw-r--r--doc/classes/KinematicBody.xml2
-rw-r--r--doc/classes/Vector3.xml2
-rw-r--r--drivers/windows/file_access_windows.cpp3
-rw-r--r--editor/editor_file_dialog.cpp19
-rw-r--r--editor/editor_file_dialog.h1
-rw-r--r--editor/editor_settings.h2
-rw-r--r--editor/editor_sub_scene.cpp8
-rw-r--r--editor/editor_sub_scene.h2
-rw-r--r--editor/filesystem_dock.cpp10
-rw-r--r--editor/filesystem_dock.h2
-rw-r--r--editor/plugins/texture_editor_plugin.cpp3
-rw-r--r--editor/spatial_editor_gizmos.h10
-rw-r--r--modules/bullet/bullet_physics_server.h4
-rw-r--r--modules/bullet/godot_ray_world_algorithm.h2
-rw-r--r--modules/bullet/godot_result_callbacks.h2
-rw-r--r--modules/bullet/rigid_body_bullet.h4
-rw-r--r--modules/bullet/shape_bullet.h16
-rw-r--r--modules/bullet/space_bullet.cpp4
-rw-r--r--modules/bullet/space_bullet.h6
-rw-r--r--modules/gdnative/gdnative_library_editor_plugin.h2
-rw-r--r--modules/gdnative/pluginscript/pluginscript_script.h2
-rw-r--r--modules/gdscript/gdscript_parser.cpp2
-rw-r--r--modules/gridmap/grid_map.h2
-rw-r--r--modules/mono/csharp_script.cpp39
-rw-r--r--modules/mono/csharp_script.h2
-rw-r--r--modules/mono/editor/bindings_generator.h8
-rw-r--r--modules/mono/editor/monodevelop_instance.h2
-rw-r--r--modules/mono/glue/cs_files/Mathf.cs2
-rw-r--r--modules/mono/mono_gd/gd_mono_assembly.cpp31
-rw-r--r--modules/mono/mono_gd/gd_mono_assembly.h2
-rw-r--r--modules/mono/mono_gd/gd_mono_class.h2
-rw-r--r--platform/x11/os_x11.h2
-rw-r--r--scene/2d/audio_stream_player_2d.cpp14
-rw-r--r--scene/2d/audio_stream_player_2d.h4
-rw-r--r--scene/3d/audio_stream_player_3d.cpp22
-rw-r--r--scene/3d/audio_stream_player_3d.h4
-rw-r--r--scene/3d/camera.h2
-rw-r--r--scene/audio/audio_player.cpp16
-rw-r--r--scene/audio/audio_player.h4
-rw-r--r--scene/gui/item_list.cpp2
-rw-r--r--scene/gui/text_edit.cpp14
-rw-r--r--scene/resources/animation.cpp22
-rw-r--r--scene/resources/color_ramp.cpp4
-rw-r--r--scene/resources/style_box.cpp4
-rw-r--r--scene/resources/texture.cpp2
-rw-r--r--servers/audio/audio_stream.cpp4
-rw-r--r--servers/physics/physics_server_sw.cpp4
-rw-r--r--servers/physics_2d_server.cpp4
-rw-r--r--servers/physics_server.h2
-rw-r--r--servers/visual/visual_server_scene.h2
58 files changed, 273 insertions, 147 deletions
diff --git a/DONORS.md b/DONORS.md
index 64d13fb3f9..6756b2c15a 100644
--- a/DONORS.md
+++ b/DONORS.md
@@ -24,10 +24,12 @@ generous deed immortalized in the next stable release of Godot Engine.
Andreas
Brandon Lamb
Christian Uldall Pedersen
+ Christopher Igoe
Christoph Woinke
E Hewert
Hein-Pieter van Braam
Jamal Alyafei
+ Jay Sistar
Jordan M Lucas
Matthieu Huvé
Nathan Warden
@@ -36,6 +38,7 @@ generous deed immortalized in the next stable release of Godot Engine.
Ruslan Mustakov
Slobodan Milnovic
Stephan Lanfermann
+ Stoney Meyerhoeffer
Thomas Mathews
## Gold donors
@@ -50,33 +53,35 @@ generous deed immortalized in the next stable release of Godot Engine.
Rémi Verschelde
Zaven Muradyan
+ Allen Schade
Andreas Schüle
Austen McRae
Benjamin Botwin
Bernhard Liebl
- Cody Brocious
- Gerald E Butler
- Jahn Johansen
Johannes Wuensch
+ Josep G. Camarasa
Kris Michael
Libre-Dépanne
Ranoller
Svenne Krap
+ Timothy Hagberg
BanjoNode2D
+ Brandon
Chris Serino
Conrad Curry
Craig Smith
David Churchill
Dean Harmon
+ Dexter Miguel
+ Garrett Dockins
Guilherme Felipe de C. G. da Silva
- Henrique Alves
+ Harman Bains
+ Karsten Bock
Laurence Bannister
- Przemysław Gołąb (n-pigeon)
Robert Willes
Robin Arys
ScottMakesGames
- summerblind
Testus Maximus
Thomas Bjarnelöf
Xavier Tan
@@ -86,25 +91,31 @@ generous deed immortalized in the next stable release of Godot Engine.
Andreas Haas
Arnaud Verstuyf
Chris Brown
+ Chris Wilson
Cody Parker
D
Daniel Eliasinski
- Daniel Langegger
Eric Monson
Ezra Theunissen
flesk
François Cantin
- Giovanni Solimeno
+ GGGames.org
+ Heath Hayes
Jeppe Zapp
+ Jeremi Biernacki
joe513
+ Juraj Móza
Justin Arnold
Justo Delgado Baudí
Leandro Voltolino
- Lucien Boudy
+ Lisandro Lorea
Markus Wiesner
+ Nick Nikitin
Pablo Cholaky
+ Paolo Munoz
Patrick Schnorbus
Pete Goodwin
+ Rami
Ryan Estes
Ted
Travis Womack
@@ -113,24 +124,31 @@ generous deed immortalized in the next stable release of Godot Engine.
## Silver donors
1D_Inc
+ Adam Carr
Alder Stefano
Alessandro Senese
- Alex Barsukov
Álvaro Domínguez López
- Andres Cuevas
+ Andrea Badii
+ Andrew Thomas
Anthony Bongiovanni
+ Arda Erol
+ Arthur S. Muszynski
Avencherus
Bastian Böhm
+ Benedikt
+ Benjamin Beshara
Ben Vercammen
Blair Allen
Bryanna M
Bryan Stevenson
+ Carwyn Edwards
Casey Foote
Christian Baune
Christian Winter
Collin Shooltz
Daniel Egger
Daniel Kaplan
+ Daniel Langegger
Daniel Mircea
David Cravens
David May
@@ -146,52 +164,57 @@ generous deed immortalized in the next stable release of Godot Engine.
Gerrit Großkopf
Gilberto K. Otubo
Guldoman
- HardRound
HeartBeast
Heribert Hirth
Hunter Jones
Jaime Ruiz-Borau Vizárraga
+ Jed Rose
Jeff Hungerford
- Jerry Chen
- Jesse Liles
+ Jonas Yamazaki
+ Jonathan Nieto
Jonathon
Josh 'Cheeseness' Bush
Juan Negrier
+ Judd
JuDelCo
Julian Murgia
- Juraj Móza
- Karonis
KC Chan
Kevin Boyer
Kevin Kamper Meejach Petersen
Klavdij Voncina
+ Lars pfeffer
Linus Lind Lundgren
- Lisandro Lorea
magodev
+ Martin Eigel
Martin Novák
Matthew Fitzpatrick
Matthias Hölzl
+ Maurice Meysel
Max R.R. Collada
memoryruins
mhilbrunner
+ Michael Dürwald
Michael Gringauz
- Mikael Olsson
MoM
monokrome
Moritz Laass
nee
Neil Blakey-Milner
+ Niclas Eriksen
Nik Lee
Niko Leopold
+ Noi Sek
Oleg Tyshchenko
Pablo Seibelt
Pan Ip
Pat LaBine
Patrick Nafarrete
+ Patric Vormstein
Paul Mason
Paweł Kowal
Pierre-Igor Berthet
Pietro Vertechi
+ Piotr Kaczmarski
Richman Stewart
Rodolfo Baeza
Roger Burgess
@@ -202,11 +225,12 @@ generous deed immortalized in the next stable release of Godot Engine.
Sootstone
Stephen Traskal
Theo Cranmore
- Thomas Norman
+ Thomas Bell
+ Thomas Herzog & Xananax
Tom Larrow
UltyX
Wout Standaert
- Xananax & karroffel
+ Yu He
## Bronze donors
diff --git a/core/math/triangulate.cpp b/core/math/triangulate.cpp
index 957e16f92c..5bae74ac7e 100644
--- a/core/math/triangulate.cpp
+++ b/core/math/triangulate.cpp
@@ -74,7 +74,7 @@ bool Triangulate::is_inside_triangle(real_t Ax, real_t Ay,
cCROSSap = cx * apy - cy * apx;
bCROSScp = bx * cpy - by * cpx;
- return ((aCROSSbp >= 0.0) && (bCROSScp >= 0.0) && (cCROSSap >= 0.0));
+ return ((aCROSSbp > 0.0) && (bCROSScp > 0.0) && (cCROSSap > 0.0));
};
bool Triangulate::snip(const Vector<Vector2> &p_contour, int u, int v, int w, int n, const Vector<int> &V) {
diff --git a/core/os/file_access.cpp b/core/os/file_access.cpp
index 368b4ad09d..033b4b12b9 100644
--- a/core/os/file_access.cpp
+++ b/core/os/file_access.cpp
@@ -479,6 +479,9 @@ void FileAccess::store_double(double p_dest) {
uint64_t FileAccess::get_modified_time(const String &p_file) {
+ if (PackedData::get_singleton() && !PackedData::get_singleton()->is_disabled() && PackedData::get_singleton()->has_path(p_file))
+ return 0;
+
FileAccess *fa = create_for_path(p_file);
ERR_FAIL_COND_V(!fa, 0);
diff --git a/core/safe_refcount.cpp b/core/safe_refcount.cpp
index ff2f17103c..3b203f6977 100644
--- a/core/safe_refcount.cpp
+++ b/core/safe_refcount.cpp
@@ -119,8 +119,8 @@ _ALWAYS_INLINE_ uint64_t _atomic_exchange_if_greater_impl(register uint64_t *pw,
// The actual advertised functions; they'll call the right implementation
-uint32_t atomic_conditional_increment(register uint32_t *counter) {
- return _atomic_conditional_increment_impl(counter);
+uint32_t atomic_conditional_increment(register uint32_t *pw) {
+ return _atomic_conditional_increment_impl(pw);
}
uint32_t atomic_decrement(register uint32_t *pw) {
@@ -143,8 +143,8 @@ uint32_t atomic_exchange_if_greater(register uint32_t *pw, register uint32_t val
return _atomic_exchange_if_greater_impl(pw, val);
}
-uint64_t atomic_conditional_increment(register uint64_t *counter) {
- return _atomic_conditional_increment_impl(counter);
+uint64_t atomic_conditional_increment(register uint64_t *pw) {
+ return _atomic_conditional_increment_impl(pw);
}
uint64_t atomic_decrement(register uint64_t *pw) {
diff --git a/core/script_debugger_local.cpp b/core/script_debugger_local.cpp
index 0da377453e..c0e115e300 100644
--- a/core/script_debugger_local.cpp
+++ b/core/script_debugger_local.cpp
@@ -291,7 +291,8 @@ void ScriptDebuggerLocal::profiling_end() {
void ScriptDebuggerLocal::send_message(const String &p_message, const Array &p_args) {
- print_line("MESSAGE: '" + p_message + "' - " + String(Variant(p_args)));
+ // This needs to be cleaned up entirely.
+ // print_line("MESSAGE: '" + p_message + "' - " + String(Variant(p_args)));
}
void ScriptDebuggerLocal::send_error(const String &p_func, const String &p_file, int p_line, const String &p_err, const String &p_descr, ErrorHandlerType p_type, const Vector<ScriptLanguage::StackInfo> &p_stack_info) {
diff --git a/core/variant_call.cpp b/core/variant_call.cpp
index 2ca435611b..5607751a27 100644
--- a/core/variant_call.cpp
+++ b/core/variant_call.cpp
@@ -1539,7 +1539,7 @@ void register_variant_methods() {
ADDFUNC0R(VECTOR3, BOOL, Vector3, is_normalized, varray());
ADDFUNC0R(VECTOR3, VECTOR3, Vector3, normalized, varray());
ADDFUNC0R(VECTOR3, VECTOR3, Vector3, inverse, varray());
- ADDFUNC1R(VECTOR3, VECTOR3, Vector3, snapped, REAL, "by", varray());
+ ADDFUNC1R(VECTOR3, VECTOR3, Vector3, snapped, VECTOR3, "by", varray());
ADDFUNC2R(VECTOR3, VECTOR3, Vector3, rotated, VECTOR3, "axis", REAL, "phi", varray());
ADDFUNC2R(VECTOR3, VECTOR3, Vector3, linear_interpolate, VECTOR3, "b", REAL, "t", varray());
ADDFUNC4R(VECTOR3, VECTOR3, Vector3, cubic_interpolate, VECTOR3, "b", VECTOR3, "pre_a", VECTOR3, "post_b", REAL, "t", varray());
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index 603faf6beb..9db93bb6a9 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -8,13 +8,13 @@
For more information on Godot's UI system, anchors, margins, and containers, see the related tutorials in the manual. To build flexible UIs, you'll need a mix of UI elements that inherit from [code]Control[/code] and [Container] nodes.
[b]User Interface nodes and input[/b]
Godot sends input events to the scene's root node first, by calling [method Node._input]. [method Node._input] forwards the event down the node tree to the nodes under the mouse cursor, or on keyboard focus. To do so, it calls [method MainLoop._input_event]. Call [method accept_event] so no other node receives the event. Once you accepted an input, it becomes handled so [method Node._unhandled_input] will not process it.
- Only one [code]Control[/code] node can be in keyboard focus. Only the node in focus will receive keyboard events. To get the focus, call [method set_focus_mode]. [code]Control[/code] nodes lose focus when another node grabs it, or if you hide the node in focus.
- Call [method set_ignore_mouse] to tell a [code]Control[/code] node to ignore mouse or touch events. You'll need it if you place an icon on top of a button.
+ Only one [code]Control[/code] node can be in keyboard focus. Only the node in focus will receive keyboard events. To get the focus, call [method grab_focus]. [code]Control[/code] nodes lose focus when another node grabs it, or if you hide the node in focus.
+ Set [member mouse_filter] to MOUSE_FILTER_IGNORE to tell a [code]Control[/code] node to ignore mouse or touch events. You'll need it if you place an icon on top of a button.
[Theme] resources change the Control's appearance. If you change the [Theme] on a [code]Control[/code] node, it affects all of its children. To override some of the theme's parameters, call one of the [code]add_*_override[/code] methods, like [method add_font_override]. You can override the theme with the inspector.
</description>
<tutorials>
http://docs.godotengine.org/en/3.0/tutorials/gui/index.html
- http://docs.godotengine.org/en/3.0/tutorials/2d/custom_drawing_in_2d.html
+ http://docs.godotengine.org/en/3.0/tutorials/2d/custom_drawing_in_2d.html
</tutorials>
<demos>
</demos>
diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml
index 20e41847ce..a38bfeb35e 100644
--- a/doc/classes/Image.xml
+++ b/doc/classes/Image.xml
@@ -217,7 +217,7 @@
<return type="int" enum="Image.Format">
</return>
<description>
- Returns the image's raw data.
+ Returns the image’s format. See [code]FORMAT_*[/code] constants.
</description>
</method>
<method name="get_height" qualifiers="const">
diff --git a/doc/classes/KinematicBody.xml b/doc/classes/KinematicBody.xml
index 2c22ae4f93..1735501a47 100644
--- a/doc/classes/KinematicBody.xml
+++ b/doc/classes/KinematicBody.xml
@@ -85,7 +85,7 @@
[code]linear_velocity[/code] is a value in pixels per second. Unlike in for example [method move_and_collide], you should [i]not[/i] multiply it with [code]delta[/code] — this is done by the method.
[code]floor_normal[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector3(0, 0, 0)[/code], everything is considered a wall. This is useful for topdown games.
If the body is standing on a slope and the horizontal speed (relative to the floor's speed) goes below [code]slope_stop_min_velocity[/code], the body will stop completely. This prevents the body from sliding down slopes when you include gravity in [code]linear_velocity[/code]. When set to lower values, the body will not be able to stand still on steep slopes.
- If the body collides, it will change direction a maximum of [code]max_bounces[/code] times before it stops.
+ If the body collides, it will change direction a maximum of [code]max_slides[/code] times before it stops.
[code]floor_max_angle[/code] is the maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall. The default value equals 45 degrees.
Returns the movement that remained when the body stopped. To get more detailed information about collisions that occurred, use [method get_slide_collision].
</description>
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml
index 050285af02..0dc808329f 100644
--- a/doc/classes/Vector3.xml
+++ b/doc/classes/Vector3.xml
@@ -216,7 +216,7 @@
<method name="snapped">
<return type="Vector3">
</return>
- <argument index="0" name="by" type="float">
+ <argument index="0" name="by" type="Vector3">
</argument>
<description>
Returns a copy of the vector, snapped to the lowest neared multiple.
diff --git a/drivers/windows/file_access_windows.cpp b/drivers/windows/file_access_windows.cpp
index 832d75b17d..613dc8c406 100644
--- a/drivers/windows/file_access_windows.cpp
+++ b/drivers/windows/file_access_windows.cpp
@@ -148,6 +148,9 @@ void FileAccessWindows::close() {
}
save_path = "";
+ if (rename_error) {
+ ERR_EXPLAIN("Safe save failed. This may be a permissions problem, but also may happen because you are running a paranoid antivirus. If this is the case, please switch to Windows Defender or disable the 'safe save' option in editor settings. This makes it work, but increases the risk of file corruption in a crash.");
+ }
ERR_FAIL_COND(rename_error);
}
}
diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp
index f356c16827..22b33cc98f 100644
--- a/editor/editor_file_dialog.cpp
+++ b/editor/editor_file_dialog.cpp
@@ -458,6 +458,23 @@ void EditorFileDialog::_item_selected(int p_item) {
get_ok()->set_disabled(_is_open_should_be_disabled());
}
+void EditorFileDialog::_multi_selected(int p_item, bool p_selected) {
+
+ int current = p_item;
+ if (current < 0 || current >= item_list->get_item_count())
+ return;
+
+ Dictionary d = item_list->get_item_metadata(current);
+
+ if (!d["dir"] && p_selected) {
+
+ file->set_text(d["name"]);
+ _request_single_thumbnail(get_current_dir().plus_file(get_current_file()));
+ }
+
+ get_ok()->set_disabled(_is_open_should_be_disabled());
+}
+
void EditorFileDialog::_items_clear_selection() {
item_list->unselect_all();
@@ -1290,6 +1307,7 @@ void EditorFileDialog::_bind_methods() {
ClassDB::bind_method(D_METHOD("_unhandled_input"), &EditorFileDialog::_unhandled_input);
ClassDB::bind_method(D_METHOD("_item_selected"), &EditorFileDialog::_item_selected);
+ ClassDB::bind_method(D_METHOD("_multi_selected"), &EditorFileDialog::_multi_selected);
ClassDB::bind_method(D_METHOD("_items_clear_selection"), &EditorFileDialog::_items_clear_selection);
ClassDB::bind_method(D_METHOD("_item_list_item_rmb_selected"), &EditorFileDialog::_item_list_item_rmb_selected);
ClassDB::bind_method(D_METHOD("_item_list_rmb_clicked"), &EditorFileDialog::_item_list_rmb_clicked);
@@ -1598,6 +1616,7 @@ EditorFileDialog::EditorFileDialog() {
connect("confirmed", this, "_action_pressed");
item_list->connect("item_selected", this, "_item_selected", varray(), CONNECT_DEFERRED);
+ item_list->connect("multi_selected", this, "_multi_selected", varray(), CONNECT_DEFERRED);
item_list->connect("item_activated", this, "_item_db_selected", varray());
item_list->connect("nothing_selected", this, "_items_clear_selection");
dir->connect("text_entered", this, "_dir_entered");
diff --git a/editor/editor_file_dialog.h b/editor/editor_file_dialog.h
index 05f66eadbf..b1f8f1108c 100644
--- a/editor/editor_file_dialog.h
+++ b/editor/editor_file_dialog.h
@@ -159,6 +159,7 @@ private:
void _recent_selected(int p_idx);
void _item_selected(int p_item);
+ void _multi_selected(int p_item, bool p_selected);
void _items_clear_selection();
void _item_dc_selected(int p_item);
diff --git a/editor/editor_settings.h b/editor/editor_settings.h
index 914316ee61..8bcb599a67 100644
--- a/editor/editor_settings.h
+++ b/editor/editor_settings.h
@@ -145,7 +145,7 @@ public:
bool has_setting(const String &p_setting) const;
void erase(const String &p_setting);
void raise_order(const String &p_setting);
- void set_initial_value(const StringName &p_setting, const Variant &p_value, bool update_current = false);
+ void set_initial_value(const StringName &p_setting, const Variant &p_value, bool p_update_current = false);
void set_manually(const StringName &p_setting, const Variant &p_value, bool p_emit_signal = false) {
if (p_emit_signal)
_set(p_setting, p_value);
diff --git a/editor/editor_sub_scene.cpp b/editor/editor_sub_scene.cpp
index 7527b198b8..056ee59860 100644
--- a/editor/editor_sub_scene.cpp
+++ b/editor/editor_sub_scene.cpp
@@ -121,10 +121,10 @@ void EditorSubScene::_item_multi_selected(Object *p_object, int p_cell, bool p_s
}
}
-void EditorSubScene::_remove_selection_child(Node *n) {
- if (n->get_child_count() > 0) {
- for (int i = 0; i < n->get_child_count(); i++) {
- Node *c = n->get_child(i);
+void EditorSubScene::_remove_selection_child(Node *p_node) {
+ if (p_node->get_child_count() > 0) {
+ for (int i = 0; i < p_node->get_child_count(); i++) {
+ Node *c = p_node->get_child(i);
List<Node *>::Element *E = selection.find(c);
if (E) {
selection.move_to_back(E);
diff --git a/editor/editor_sub_scene.h b/editor/editor_sub_scene.h
index cf4d6fd5b9..202ba03cea 100644
--- a/editor/editor_sub_scene.h
+++ b/editor/editor_sub_scene.h
@@ -50,7 +50,7 @@ class EditorSubScene : public ConfirmationDialog {
void _fill_tree(Node *p_node, TreeItem *p_parent);
void _selected_changed();
void _item_multi_selected(Object *p_object, int p_cell, bool p_selected);
- void _remove_selection_child(Node *c);
+ void _remove_selection_child(Node *p_node);
void _reown(Node *p_node, List<Node *> *p_to_reown);
void ok_pressed();
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index cc9c9a11d7..8ead8d3982 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -77,7 +77,7 @@ bool FileSystemDock::_create_tree(TreeItem *p_parent, EditorFileSystemDirectory
return true;
}
-void FileSystemDock::_update_tree(bool keep_collapse_state) {
+void FileSystemDock::_update_tree(bool keep_collapse_state, bool p_uncollapse_root) {
Vector<String> uncollapsed_paths;
if (keep_collapse_state) {
@@ -129,6 +129,10 @@ void FileSystemDock::_update_tree(bool keep_collapse_state) {
ti->set_metadata(0, fave);
}
+ if (p_uncollapse_root) {
+ uncollapsed_paths.push_back("res://");
+ }
+
_create_tree(root, EditorFileSystem::get_singleton()->get_filesystem(), uncollapsed_paths);
tree->ensure_cursor_is_visible();
updating_tree = false;
@@ -154,6 +158,7 @@ void FileSystemDock::_notification(int p_what) {
} else {
tree->set_v_size_flags(SIZE_FILL);
+ button_tree->hide();
if (!tree->is_visible()) {
tree->show();
button_favorite->show();
@@ -163,7 +168,6 @@ void FileSystemDock::_notification(int p_what) {
if (!file_list_vb->is_visible()) {
file_list_vb->show();
- button_tree->hide();
_update_files(true);
}
}
@@ -204,7 +208,7 @@ void FileSystemDock::_notification(int p_what) {
if (EditorFileSystem::get_singleton()->is_scanning()) {
_set_scanning_mode();
} else {
- _update_tree(false);
+ _update_tree(false, true);
}
} break;
diff --git a/editor/filesystem_dock.h b/editor/filesystem_dock.h
index af80557465..2e86b83efc 100644
--- a/editor/filesystem_dock.h
+++ b/editor/filesystem_dock.h
@@ -157,7 +157,7 @@ private:
bool import_dock_needs_update;
bool _create_tree(TreeItem *p_parent, EditorFileSystemDirectory *p_dir, Vector<String> &uncollapsed_paths);
- void _update_tree(bool keep_collapse_state);
+ void _update_tree(bool keep_collapse_state, bool p_uncollapse_root = false);
void _update_files(bool p_keep_selection);
void _update_file_display_toggle_button();
diff --git a/editor/plugins/texture_editor_plugin.cpp b/editor/plugins/texture_editor_plugin.cpp
index 36a578037e..e891850870 100644
--- a/editor/plugins/texture_editor_plugin.cpp
+++ b/editor/plugins/texture_editor_plugin.cpp
@@ -75,6 +75,9 @@ void TextureEditor::_notification(int p_what) {
// In the case of CurveTextures we know they are 1 in height, so fill the preview to see the gradient
ofs_y = 0;
tex_height = size.height;
+ } else if (Object::cast_to<GradientTexture>(*texture)) {
+ ofs_y = size.height / 4.0;
+ tex_height = size.height / 2.0;
}
draw_texture_rect(texture, Rect2(ofs_x, ofs_y, tex_width, tex_height));
diff --git a/editor/spatial_editor_gizmos.h b/editor/spatial_editor_gizmos.h
index cb483ed653..eedab7fdef 100644
--- a/editor/spatial_editor_gizmos.h
+++ b/editor/spatial_editor_gizmos.h
@@ -105,7 +105,7 @@ protected:
void add_collision_triangles(const Ref<TriangleMesh> &p_tmesh, const AABB &p_bounds = AABB());
void add_unscaled_billboard(const Ref<Material> &p_material, float p_scale = 1);
void add_handles(const Vector<Vector3> &p_handles, bool p_billboard = false, bool p_secondary = false);
- void add_solid_box(Ref<Material> &p_material, Vector3 size);
+ void add_solid_box(Ref<Material> &p_material, Vector3 p_size);
void set_spatial_node(Spatial *p_node);
const Spatial *get_spatial_node() const { return spatial_node; }
@@ -376,13 +376,13 @@ public:
class JointGizmosDrawer {
public:
- static Basis look_body(const Transform &joint_transform, const Transform &body_transform);
+ static Basis look_body(const Transform &p_joint_transform, const Transform &p_body_transform);
static Basis look_body_toward(Vector3::Axis p_axis, const Transform &joint_transform, const Transform &body_transform);
- static Basis look_body_toward_x(const Transform &joint_transform, const Transform &body_transform);
- static Basis look_body_toward_y(const Transform &joint_transform, const Transform &body_transform);
+ static Basis look_body_toward_x(const Transform &p_joint_transform, const Transform &p_body_transform);
+ static Basis look_body_toward_y(const Transform &p_joint_transform, const Transform &p_body_transform);
/// Special function just used for physics joints, it that returns a basis constrained toward Joint Z axis
/// with axis X and Y that are looking toward the body and oriented toward up
- static Basis look_body_toward_z(const Transform &joint_transform, const Transform &body_transform);
+ static Basis look_body_toward_z(const Transform &p_joint_transform, const Transform &p_body_transform);
// Draw circle around p_axis
static void draw_circle(Vector3::Axis p_axis, real_t p_radius, const Transform &p_offset, const Basis &p_base, real_t p_limit_lower, real_t p_limit_upper, Vector<Vector3> &r_points, bool p_inverse = false);
diff --git a/modules/bullet/bullet_physics_server.h b/modules/bullet/bullet_physics_server.h
index 1c94428a2a..e0e46cd369 100644
--- a/modules/bullet/bullet_physics_server.h
+++ b/modules/bullet/bullet_physics_server.h
@@ -154,7 +154,7 @@ public:
/// AREA_PARAM_GRAVITY_VECTOR
/// Otherwise you can set area parameters
virtual void area_set_param(RID p_area, AreaParameter p_param, const Variant &p_value);
- virtual Variant area_get_param(RID p_parea, AreaParameter p_param) const;
+ virtual Variant area_get_param(RID p_area, AreaParameter p_param) const;
virtual void area_set_transform(RID p_area, const Transform &p_transform);
virtual Transform area_get_transform(RID p_area) const;
@@ -301,7 +301,7 @@ public:
virtual void pin_joint_set_local_b(RID p_joint, const Vector3 &p_B);
virtual Vector3 pin_joint_get_local_b(RID p_joint) const;
- virtual RID joint_create_hinge(RID p_body_A, const Transform &p_frame_A, RID p_body_B, const Transform &p_frame_B);
+ virtual RID joint_create_hinge(RID p_body_A, const Transform &p_hinge_A, RID p_body_B, const Transform &p_hinge_B);
virtual RID joint_create_hinge_simple(RID p_body_A, const Vector3 &p_pivot_A, const Vector3 &p_axis_A, RID p_body_B, const Vector3 &p_pivot_B, const Vector3 &p_axis_B);
virtual void hinge_joint_set_param(RID p_joint, HingeJointParam p_param, float p_value);
diff --git a/modules/bullet/godot_ray_world_algorithm.h b/modules/bullet/godot_ray_world_algorithm.h
index c716c1d88d..7383dad2bf 100644
--- a/modules/bullet/godot_ray_world_algorithm.h
+++ b/modules/bullet/godot_ray_world_algorithm.h
@@ -49,7 +49,7 @@ class GodotRayWorldAlgorithm : public btActivatingCollisionAlgorithm {
bool m_isSwapped;
public:
- GodotRayWorldAlgorithm(const btDiscreteDynamicsWorld *m_world, btPersistentManifold *mf, const btCollisionAlgorithmConstructionInfo &ci, const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, bool isSwapped);
+ GodotRayWorldAlgorithm(const btDiscreteDynamicsWorld *world, btPersistentManifold *mf, const btCollisionAlgorithmConstructionInfo &ci, const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, bool isSwapped);
virtual ~GodotRayWorldAlgorithm();
virtual void processCollision(const btCollisionObjectWrapper *body0Wrap, const btCollisionObjectWrapper *body1Wrap, const btDispatcherInfo &dispatchInfo, btManifoldResult *resultOut);
diff --git a/modules/bullet/godot_result_callbacks.h b/modules/bullet/godot_result_callbacks.h
index b18965a5b8..e1b0b1b421 100644
--- a/modules/bullet/godot_result_callbacks.h
+++ b/modules/bullet/godot_result_callbacks.h
@@ -205,6 +205,6 @@ struct GodotDeepPenetrationContactResultCallback : public btManifoldResult {
return m_pointCollisionObject;
}
- virtual void addContactPoint(const btVector3 &normalOnBInWorld, const btVector3 &pointInWorld, btScalar depth);
+ virtual void addContactPoint(const btVector3 &normalOnBInWorld, const btVector3 &pointInWorldOnB, btScalar depth);
};
#endif // GODOT_RESULT_CALLBACKS_H
diff --git a/modules/bullet/rigid_body_bullet.h b/modules/bullet/rigid_body_bullet.h
index aff6056ad9..c4a9676bdd 100644
--- a/modules/bullet/rigid_body_bullet.h
+++ b/modules/bullet/rigid_body_bullet.h
@@ -262,12 +262,12 @@ public:
Variant get_state(PhysicsServer::BodyState p_state) const;
void apply_impulse(const Vector3 &p_pos, const Vector3 &p_impulse);
- void apply_central_impulse(const Vector3 &p_force);
+ void apply_central_impulse(const Vector3 &p_impulse);
void apply_torque_impulse(const Vector3 &p_impulse);
void apply_force(const Vector3 &p_force, const Vector3 &p_pos);
void apply_central_force(const Vector3 &p_force);
- void apply_torque(const Vector3 &p_force);
+ void apply_torque(const Vector3 &p_torque);
void set_applied_force(const Vector3 &p_force);
Vector3 get_applied_force() const;
diff --git a/modules/bullet/shape_bullet.h b/modules/bullet/shape_bullet.h
index 4a03c0f014..e04a3c808a 100644
--- a/modules/bullet/shape_bullet.h
+++ b/modules/bullet/shape_bullet.h
@@ -99,7 +99,7 @@ public:
virtual void set_data(const Variant &p_data);
virtual Variant get_data() const;
virtual PhysicsServer::ShapeType get_type() const;
- virtual btCollisionShape *create_bt_shape(const btVector3 &p_scale, real_t p_margin = 0);
+ virtual btCollisionShape *create_bt_shape(const btVector3 &p_implicit_scale, real_t p_margin = 0);
private:
void setup(const Plane &p_plane);
@@ -116,7 +116,7 @@ public:
virtual void set_data(const Variant &p_data);
virtual Variant get_data() const;
virtual PhysicsServer::ShapeType get_type() const;
- virtual btCollisionShape *create_bt_shape(const btVector3 &p_scale, real_t p_margin = 0);
+ virtual btCollisionShape *create_bt_shape(const btVector3 &p_implicit_scale, real_t p_margin = 0);
private:
void setup(real_t p_radius);
@@ -133,7 +133,7 @@ public:
virtual void set_data(const Variant &p_data);
virtual Variant get_data() const;
virtual PhysicsServer::ShapeType get_type() const;
- virtual btCollisionShape *create_bt_shape(const btVector3 &p_scale, real_t p_margin = 0);
+ virtual btCollisionShape *create_bt_shape(const btVector3 &p_implicit_scale, real_t p_margin = 0);
private:
void setup(const Vector3 &p_half_extents);
@@ -152,7 +152,7 @@ public:
virtual void set_data(const Variant &p_data);
virtual Variant get_data() const;
virtual PhysicsServer::ShapeType get_type() const;
- virtual btCollisionShape *create_bt_shape(const btVector3 &p_scale, real_t p_margin = 0);
+ virtual btCollisionShape *create_bt_shape(const btVector3 &p_implicit_scale, real_t p_margin = 0);
private:
void setup(real_t p_height, real_t p_radius);
@@ -169,7 +169,7 @@ public:
void get_vertices(Vector<Vector3> &out_vertices);
virtual Variant get_data() const;
virtual PhysicsServer::ShapeType get_type() const;
- virtual btCollisionShape *create_bt_shape(const btVector3 &p_scale, real_t p_margin = 0);
+ virtual btCollisionShape *create_bt_shape(const btVector3 &p_implicit_scale, real_t p_margin = 0);
private:
void setup(const Vector<Vector3> &p_vertices);
@@ -187,7 +187,7 @@ public:
virtual void set_data(const Variant &p_data);
virtual Variant get_data() const;
virtual PhysicsServer::ShapeType get_type() const;
- virtual btCollisionShape *create_bt_shape(const btVector3 &p_scale, real_t p_margin = 0);
+ virtual btCollisionShape *create_bt_shape(const btVector3 &p_implicit_scale, real_t p_margin = 0);
private:
void setup(PoolVector<Vector3> p_faces);
@@ -206,7 +206,7 @@ public:
virtual void set_data(const Variant &p_data);
virtual Variant get_data() const;
virtual PhysicsServer::ShapeType get_type() const;
- virtual btCollisionShape *create_bt_shape(const btVector3 &p_scale, real_t p_margin = 0);
+ virtual btCollisionShape *create_bt_shape(const btVector3 &p_implicit_scale, real_t p_margin = 0);
private:
void setup(PoolVector<real_t> &p_heights, int p_width, int p_depth, real_t p_cell_size);
@@ -222,7 +222,7 @@ public:
virtual void set_data(const Variant &p_data);
virtual Variant get_data() const;
virtual PhysicsServer::ShapeType get_type() const;
- virtual btCollisionShape *create_bt_shape(const btVector3 &p_scale, real_t p_margin = 0);
+ virtual btCollisionShape *create_bt_shape(const btVector3 &p_implicit_scale, real_t p_margin = 0);
private:
void setup(real_t p_length);
diff --git a/modules/bullet/space_bullet.cpp b/modules/bullet/space_bullet.cpp
index d60d8ba0e2..6f0cda8957 100644
--- a/modules/bullet/space_bullet.cpp
+++ b/modules/bullet/space_bullet.cpp
@@ -116,7 +116,7 @@ bool BulletPhysicsDirectSpaceState::intersect_ray(const Vector3 &p_from, const V
}
}
-int BulletPhysicsDirectSpaceState::intersect_shape(const RID &p_shape, const Transform &p_xform, float p_margin, ShapeResult *p_results, int p_result_max, const Set<RID> &p_exclude, uint32_t p_collision_mask) {
+int BulletPhysicsDirectSpaceState::intersect_shape(const RID &p_shape, const Transform &p_xform, float p_margin, ShapeResult *r_results, int p_result_max, const Set<RID> &p_exclude, uint32_t p_collision_mask) {
if (p_result_max <= 0)
return 0;
@@ -138,7 +138,7 @@ int BulletPhysicsDirectSpaceState::intersect_shape(const RID &p_shape, const Tra
collision_object.setCollisionShape(btConvex);
collision_object.setWorldTransform(bt_xform);
- GodotAllContactResultCallback btQuery(&collision_object, p_results, p_result_max, &p_exclude);
+ GodotAllContactResultCallback btQuery(&collision_object, r_results, p_result_max, &p_exclude);
btQuery.m_collisionFilterGroup = 0;
btQuery.m_collisionFilterMask = p_collision_mask;
btQuery.m_closestDistanceThreshold = 0;
diff --git a/modules/bullet/space_bullet.h b/modules/bullet/space_bullet.h
index 0aeb407dcc..2b97f0b274 100644
--- a/modules/bullet/space_bullet.h
+++ b/modules/bullet/space_bullet.h
@@ -199,12 +199,12 @@ private:
local_shape_most_recovered(0) {}
};
- bool recover_from_penetration(RigidBodyBullet *p_body, const btTransform &p_from, btScalar p_recover_movement_scale, btVector3 &r_delta_recover_movement, RecoverResult *r_recover_result = NULL);
+ bool recover_from_penetration(RigidBodyBullet *p_body, const btTransform &p_body_position, btScalar p_recover_movement_scale, btVector3 &r_delta_recover_movement, RecoverResult *r_recover_result = NULL);
/// This is an API that recover a kinematic object from penetration
/// This allow only Convex Convex test and it always use GJK algorithm, With this API we don't benefit of Bullet special accelerated functions
- bool RFP_convex_convex_test(const btConvexShape *p_shapeA, const btConvexShape *p_shapeB, btCollisionObject *p_objectB, int p_shapeId_B, const btTransform &p_transformA, const btTransform &p_transformB, btScalar p_movement_scale, btVector3 &r_delta_recover_movement, RecoverResult *r_recover_result = NULL);
+ bool RFP_convex_convex_test(const btConvexShape *p_shapeA, const btConvexShape *p_shapeB, btCollisionObject *p_objectB, int p_shapeId_B, const btTransform &p_transformA, const btTransform &p_transformB, btScalar p_recover_movement_scale, btVector3 &r_delta_recover_movement, RecoverResult *r_recover_result = NULL);
/// This is an API that recover a kinematic object from penetration
/// Using this we leave Bullet to select the best algorithm, For example GJK in case we have Convex Convex, or a Bullet accelerated algorithm
- bool RFP_convex_world_test(const btConvexShape *p_shapeA, const btCollisionShape *p_shapeB, btCollisionObject *p_objectA, btCollisionObject *p_objectB, int p_shapeId_A, int p_shapeId_B, const btTransform &p_transformA, const btTransform &p_transformB, btScalar p_movement_scale, btVector3 &r_delta_recover_movement, RecoverResult *r_recover_result = NULL);
+ bool RFP_convex_world_test(const btConvexShape *p_shapeA, const btCollisionShape *p_shapeB, btCollisionObject *p_objectA, btCollisionObject *p_objectB, int p_shapeId_A, int p_shapeId_B, const btTransform &p_transformA, const btTransform &p_transformB, btScalar p_recover_movement_scale, btVector3 &r_delta_recover_movement, RecoverResult *r_recover_result = NULL);
};
#endif
diff --git a/modules/gdnative/gdnative_library_editor_plugin.h b/modules/gdnative/gdnative_library_editor_plugin.h
index 94bc2adc7d..04d2911d8b 100644
--- a/modules/gdnative/gdnative_library_editor_plugin.h
+++ b/modules/gdnative/gdnative_library_editor_plugin.h
@@ -79,7 +79,7 @@ protected:
void _on_library_selected(const String &file);
void _on_dependencies_selected(const PoolStringArray &files);
void _on_filter_selected(int id);
- void _on_item_collapsed(Object *item);
+ void _on_item_collapsed(Object *p_item);
void _on_item_activated();
void _on_create_new_entry();
void _set_target_value(const String &section, const String &target, Variant file);
diff --git a/modules/gdnative/pluginscript/pluginscript_script.h b/modules/gdnative/pluginscript/pluginscript_script.h
index 6729eecb32..1be9e907c2 100644
--- a/modules/gdnative/pluginscript/pluginscript_script.h
+++ b/modules/gdnative/pluginscript/pluginscript_script.h
@@ -112,7 +112,7 @@ public:
virtual void update_exports();
virtual void get_script_method_list(List<MethodInfo> *r_methods) const;
- virtual void get_script_property_list(List<PropertyInfo> *r_propertieslist) const;
+ virtual void get_script_property_list(List<PropertyInfo> *r_properties) const;
virtual int get_member_line(const StringName &p_member) const;
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp
index c67214638d..1392323d56 100644
--- a/modules/gdscript/gdscript_parser.cpp
+++ b/modules/gdscript/gdscript_parser.cpp
@@ -95,8 +95,6 @@ bool GDScriptParser::_enter_indent_block(BlockNode *p_block) {
int indent = tokenizer->get_token_line_indent();
int current = tab_level.back()->get();
if (indent <= current) {
- print_line("current: " + itos(current) + " indent: " + itos(indent));
- print_line("less than current");
return false;
}
diff --git a/modules/gridmap/grid_map.h b/modules/gridmap/grid_map.h
index b17fe43ae8..ed36751fc8 100644
--- a/modules/gridmap/grid_map.h
+++ b/modules/gridmap/grid_map.h
@@ -247,7 +247,7 @@ public:
int get_cell_item(int p_x, int p_y, int p_z) const;
int get_cell_item_orientation(int p_x, int p_y, int p_z) const;
- Vector3 world_to_map(const Vector3 &p_pos) const;
+ Vector3 world_to_map(const Vector3 &p_world_pos) const;
Vector3 map_to_world(int p_x, int p_y, int p_z) const;
void set_clip(bool p_enabled, bool p_clip_above = true, int p_floor = 0, Vector3::Axis p_axis = Vector3::AXIS_X);
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp
index 62f83ee430..0dc0018224 100644
--- a/modules/mono/csharp_script.cpp
+++ b/modules/mono/csharp_script.cpp
@@ -176,7 +176,7 @@ void CSharpLanguage::get_reserved_words(List<String> *p_words) const {
"fixed",
"float",
"for",
- "forech",
+ "foreach",
"goto",
"if",
"implicit",
@@ -222,14 +222,17 @@ void CSharpLanguage::get_reserved_words(List<String> *p_words) const {
"ushort",
"using",
"virtual",
- "volatile",
"void",
+ "volatile",
"while",
// Contextual keywords. Not reserved words, but I guess we should include
// them because this seems to be used only for syntax highlighting.
"add",
+ "alias",
"ascending",
+ "async",
+ "await",
"by",
"descending",
"dynamic",
@@ -238,10 +241,10 @@ void CSharpLanguage::get_reserved_words(List<String> *p_words) const {
"get",
"global",
"group",
- "in",
"into",
"join",
"let",
+ "nameof",
"on",
"orderby",
"partial",
@@ -250,6 +253,7 @@ void CSharpLanguage::get_reserved_words(List<String> *p_words) const {
"set",
"value",
"var",
+ "when",
"where",
"yield",
0
@@ -947,19 +951,6 @@ void CSharpLanguage::free_instance_binding_data(void *p_data) {
#endif
}
-void CSharpInstance::_ml_call_reversed(MonoObject *p_mono_object, GDMonoClass *p_klass, const StringName &p_method, const Variant **p_args, int p_argcount) {
-
- GDMonoClass *base = p_klass->get_parent_class();
- if (base && base != script->native)
- _ml_call_reversed(p_mono_object, base, p_method, p_args, p_argcount);
-
- GDMonoMethod *method = p_klass->get_method(p_method, p_argcount);
-
- if (method) {
- method->invoke(p_mono_object, p_args);
- }
-}
-
CSharpInstance *CSharpInstance::create_for_managed_type(Object *p_owner, CSharpScript *p_script, const Ref<MonoGCHandle> &p_gchandle) {
CSharpInstance *instance = memnew(CSharpInstance);
@@ -1028,6 +1019,8 @@ bool CSharpInstance::set(const StringName &p_name, const Variant &p_value) {
if (ret && GDMonoMarshal::unbox<MonoBoolean>(ret) == true)
return true;
+
+ break;
}
top = top->get_parent_class();
@@ -1088,6 +1081,8 @@ bool CSharpInstance::get(const StringName &p_name, Variant &r_ret) const {
r_ret = GDMonoMarshal::mono_object_to_variant(ret);
return true;
}
+
+ break;
}
top = top->get_parent_class();
@@ -1190,8 +1185,10 @@ void CSharpInstance::_call_multilevel(MonoObject *p_mono_object, const StringNam
while (top && top != script->native) {
GDMonoMethod *method = top->get_method(p_method, p_argcount);
- if (method)
+ if (method) {
method->invoke(p_mono_object, p_args);
+ return;
+ }
top = top->get_parent_class();
}
@@ -1199,13 +1196,9 @@ void CSharpInstance::_call_multilevel(MonoObject *p_mono_object, const StringNam
void CSharpInstance::call_multilevel_reversed(const StringName &p_method, const Variant **p_args, int p_argcount) {
- if (script.is_valid()) {
- MonoObject *mono_object = get_mono_object();
-
- ERR_FAIL_NULL(mono_object);
+ // Sorry, the method is the one that controls the call order
- _ml_call_reversed(mono_object, script->script_class, p_method, p_args, p_argcount);
- }
+ call_multilevel(p_method, p_args, p_argcount);
}
void CSharpInstance::_reference_owner_unsafe() {
diff --git a/modules/mono/csharp_script.h b/modules/mono/csharp_script.h
index 1daa25b74e..f18e339e18 100644
--- a/modules/mono/csharp_script.h
+++ b/modules/mono/csharp_script.h
@@ -172,8 +172,6 @@ class CSharpInstance : public ScriptInstance {
bool base_ref;
bool ref_dying;
- void _ml_call_reversed(MonoObject *p_mono_object, GDMonoClass *klass, const StringName &p_method, const Variant **p_args, int p_argcount);
-
void _reference_owner_unsafe();
void _unreference_owner_unsafe();
diff --git a/modules/mono/editor/bindings_generator.h b/modules/mono/editor/bindings_generator.h
index 4ab8d86cf3..9b5a9cea88 100644
--- a/modules/mono/editor/bindings_generator.h
+++ b/modules/mono/editor/bindings_generator.h
@@ -504,8 +504,8 @@ class BindingsGenerator {
const TypeInterface *_get_type_by_name_or_null(const StringName &p_cname);
const TypeInterface *_get_type_by_name_or_placeholder(const StringName &p_cname);
- void _default_argument_from_variant(const Variant &p_var, ArgumentInterface &r_iarg);
- void _populate_builtin_type(TypeInterface &r_type, Variant::Type vtype);
+ void _default_argument_from_variant(const Variant &p_val, ArgumentInterface &r_iarg);
+ void _populate_builtin_type(TypeInterface &r_itype, Variant::Type vtype);
void _populate_object_type_interfaces();
void _populate_builtin_type_interfaces();
@@ -514,14 +514,14 @@ class BindingsGenerator {
Error _generate_cs_type(const TypeInterface &itype, const String &p_output_file);
- Error _generate_cs_property(const TypeInterface &p_itype, const PropertyInterface &p_prop_doc, List<String> &p_output);
+ Error _generate_cs_property(const TypeInterface &p_itype, const PropertyInterface &p_iprop, List<String> &p_output);
Error _generate_cs_method(const TypeInterface &p_itype, const MethodInterface &p_imethod, int &p_method_bind_count, List<String> &p_output);
void _generate_global_constants(List<String> &p_output);
Error _generate_glue_method(const TypeInterface &p_itype, const MethodInterface &p_imethod, List<String> &p_output);
- Error _save_file(const String &path, const List<String> &content);
+ Error _save_file(const String &p_path, const List<String> &p_content);
BindingsGenerator() {}
diff --git a/modules/mono/editor/monodevelop_instance.h b/modules/mono/editor/monodevelop_instance.h
index 7e8a76b595..552c10a61d 100644
--- a/modules/mono/editor/monodevelop_instance.h
+++ b/modules/mono/editor/monodevelop_instance.h
@@ -43,7 +43,7 @@ class MonoDevelopInstance {
public:
void execute(const Vector<String> &p_files);
- void execute(const String &p_files);
+ void execute(const String &p_file);
MonoDevelopInstance(const String &p_solution);
};
diff --git a/modules/mono/glue/cs_files/Mathf.cs b/modules/mono/glue/cs_files/Mathf.cs
index 6951ace4fc..476396e9a3 100644
--- a/modules/mono/glue/cs_files/Mathf.cs
+++ b/modules/mono/glue/cs_files/Mathf.cs
@@ -71,7 +71,7 @@ namespace Godot
public static int Decimals(float step)
{
- return Decimals(step);
+ return Decimals((decimal)step);
}
public static int Decimals(decimal step)
diff --git a/modules/mono/mono_gd/gd_mono_assembly.cpp b/modules/mono/mono_gd/gd_mono_assembly.cpp
index ba56ed6ed5..ef39b8549d 100644
--- a/modules/mono/mono_gd/gd_mono_assembly.cpp
+++ b/modules/mono/mono_gd/gd_mono_assembly.cpp
@@ -116,6 +116,37 @@ MonoAssembly *GDMonoAssembly::_preload_hook(MonoAssemblyName *aname, char **asse
}
}
+ String name = mono_assembly_name_get_name(aname);
+ bool has_extension = name.ends_with(".dll");
+
+ if (has_extension ? name == "mscorlib.dll" : name == "mscorlib") {
+ GDMonoAssembly **stored_assembly = GDMono::get_singleton()->get_loaded_assembly(has_extension ? name.get_basename() : name);
+ if (stored_assembly) return (*stored_assembly)->get_assembly();
+
+ String path;
+ MonoAssembly *res = NULL;
+
+ for (int i = 0; i < search_dirs.size(); i++) {
+ const String &search_dir = search_dirs[i];
+
+ if (has_extension) {
+ path = search_dir.plus_file(name);
+ if (FileAccess::exists(path)) {
+ res = _load_assembly_from(name.get_basename(), path);
+ break;
+ }
+ } else {
+ path = search_dir.plus_file(name + ".dll");
+ if (FileAccess::exists(path)) {
+ res = _load_assembly_from(name, path);
+ break;
+ }
+ }
+ }
+
+ if (res) return res;
+ }
+
return NULL;
}
diff --git a/modules/mono/mono_gd/gd_mono_assembly.h b/modules/mono/mono_gd/gd_mono_assembly.h
index 8e7aa701bf..8a5fa19626 100644
--- a/modules/mono/mono_gd/gd_mono_assembly.h
+++ b/modules/mono/mono_gd/gd_mono_assembly.h
@@ -110,7 +110,7 @@ public:
_FORCE_INLINE_ String get_path() const { return path; }
_FORCE_INLINE_ uint64_t get_modified_time() const { return modified_time; }
- GDMonoClass *get_class(const StringName &p_namespace, const StringName &p_class);
+ GDMonoClass *get_class(const StringName &p_namespace, const StringName &p_name);
GDMonoClass *get_class(MonoClass *p_mono_class);
GDMonoClass *get_object_derived_class(const StringName &p_class);
diff --git a/modules/mono/mono_gd/gd_mono_class.h b/modules/mono/mono_gd/gd_mono_class.h
index f5895be144..afccf2fc63 100644
--- a/modules/mono/mono_gd/gd_mono_class.h
+++ b/modules/mono/mono_gd/gd_mono_class.h
@@ -125,7 +125,7 @@ public:
GDMonoMethod *get_method(MonoMethod *p_raw_method);
GDMonoMethod *get_method(MonoMethod *p_raw_method, const StringName &p_name);
GDMonoMethod *get_method(MonoMethod *p_raw_method, const StringName &p_name, int p_params_count);
- GDMonoMethod *get_method_with_desc(const String &p_description, bool p_includes_namespace);
+ GDMonoMethod *get_method_with_desc(const String &p_description, bool p_include_namespace);
GDMonoField *get_field(const StringName &p_name);
const Vector<GDMonoField *> &get_all_fields();
diff --git a/platform/x11/os_x11.h b/platform/x11/os_x11.h
index f7bc0b73e0..ee62b89227 100644
--- a/platform/x11/os_x11.h
+++ b/platform/x11/os_x11.h
@@ -199,7 +199,7 @@ protected:
virtual void set_main_loop(MainLoop *p_main_loop);
- void _window_changed(XEvent *xevent);
+ void _window_changed(XEvent *event);
bool is_window_maximize_allowed();
diff --git a/scene/2d/audio_stream_player_2d.cpp b/scene/2d/audio_stream_player_2d.cpp
index b11deb08fd..fc67d28a29 100644
--- a/scene/2d/audio_stream_player_2d.cpp
+++ b/scene/2d/audio_stream_player_2d.cpp
@@ -54,7 +54,7 @@ void AudioStreamPlayer2D::_mix_audio() {
int buffer_size = mix_buffer.size();
//mix
- stream_playback->mix(buffer, 1.0, buffer_size);
+ stream_playback->mix(buffer, pitch_scale, buffer_size);
//write all outputs
for (int i = 0; i < output_count; i++) {
@@ -279,6 +279,13 @@ float AudioStreamPlayer2D::get_volume_db() const {
return volume_db;
}
+void AudioStreamPlayer2D::set_pitch_scale(float p_pitch_scale) {
+ pitch_scale = p_pitch_scale;
+}
+float AudioStreamPlayer2D::get_pitch_scale() const {
+ return pitch_scale;
+}
+
void AudioStreamPlayer2D::play(float p_from_pos) {
if (stream_playback.is_valid()) {
@@ -419,6 +426,9 @@ void AudioStreamPlayer2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_volume_db", "volume_db"), &AudioStreamPlayer2D::set_volume_db);
ClassDB::bind_method(D_METHOD("get_volume_db"), &AudioStreamPlayer2D::get_volume_db);
+ ClassDB::bind_method(D_METHOD("set_pitch_scale", "pitch_scale"), &AudioStreamPlayer2D::set_pitch_scale);
+ ClassDB::bind_method(D_METHOD("get_pitch_scale"), &AudioStreamPlayer2D::get_pitch_scale);
+
ClassDB::bind_method(D_METHOD("play", "from_position"), &AudioStreamPlayer2D::play, DEFVAL(0.0));
ClassDB::bind_method(D_METHOD("seek", "to_position"), &AudioStreamPlayer2D::seek);
ClassDB::bind_method(D_METHOD("stop"), &AudioStreamPlayer2D::stop);
@@ -448,6 +458,7 @@ void AudioStreamPlayer2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "stream", PROPERTY_HINT_RESOURCE_TYPE, "AudioStream"), "set_stream", "get_stream");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "volume_db", PROPERTY_HINT_RANGE, "-80,24"), "set_volume_db", "get_volume_db");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "pitch_scale", PROPERTY_HINT_RANGE, "0.01,32,0.01"), "set_pitch_scale", "get_pitch_scale");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "playing", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "_set_playing", "is_playing");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autoplay"), "set_autoplay", "is_autoplay_enabled");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "max_distance", PROPERTY_HINT_RANGE, "1,65536,1"), "set_max_distance", "get_max_distance");
@@ -461,6 +472,7 @@ void AudioStreamPlayer2D::_bind_methods() {
AudioStreamPlayer2D::AudioStreamPlayer2D() {
volume_db = 0;
+ pitch_scale = 1.0;
autoplay = false;
setseek = -1;
active = false;
diff --git a/scene/2d/audio_stream_player_2d.h b/scene/2d/audio_stream_player_2d.h
index 39bc985f58..9ae8e3a518 100644
--- a/scene/2d/audio_stream_player_2d.h
+++ b/scene/2d/audio_stream_player_2d.h
@@ -70,6 +70,7 @@ private:
volatile float setplay;
float volume_db;
+ float pitch_scale;
bool autoplay;
StringName bus;
@@ -98,6 +99,9 @@ public:
void set_volume_db(float p_volume);
float get_volume_db() const;
+ void set_pitch_scale(float p_pitch_scale);
+ float get_pitch_scale() const;
+
void play(float p_from_pos = 0.0);
void seek(float p_seconds);
void stop();
diff --git a/scene/3d/audio_stream_player_3d.cpp b/scene/3d/audio_stream_player_3d.cpp
index bf3bc42e4e..d448ef024d 100644
--- a/scene/3d/audio_stream_player_3d.cpp
+++ b/scene/3d/audio_stream_player_3d.cpp
@@ -57,18 +57,18 @@ void AudioStreamPlayer3D::_mix_audio() {
//mix
if (output_count > 0 || out_of_range_mode == OUT_OF_RANGE_MIX) {
- float pitch_scale = 0.0;
+ float output_pitch_scale = 0.0;
if (output_count) {
//used for doppler, not realistic but good enough
for (int i = 0; i < output_count; i++) {
- pitch_scale += outputs[i].pitch_scale;
+ output_pitch_scale += outputs[i].pitch_scale;
}
- pitch_scale /= float(output_count);
+ output_pitch_scale /= float(output_count);
} else {
- pitch_scale = 1.0;
+ output_pitch_scale = 1.0;
}
- stream_playback->mix(buffer, pitch_scale, buffer_size);
+ stream_playback->mix(buffer, pitch_scale * output_pitch_scale, buffer_size);
}
//write all outputs
@@ -607,6 +607,13 @@ float AudioStreamPlayer3D::get_max_db() const {
return max_db;
}
+void AudioStreamPlayer3D::set_pitch_scale(float p_pitch_scale) {
+ pitch_scale = p_pitch_scale;
+}
+float AudioStreamPlayer3D::get_pitch_scale() const {
+ return pitch_scale;
+}
+
void AudioStreamPlayer3D::play(float p_from_pos) {
if (stream_playback.is_valid()) {
@@ -832,6 +839,9 @@ void AudioStreamPlayer3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_max_db", "max_db"), &AudioStreamPlayer3D::set_max_db);
ClassDB::bind_method(D_METHOD("get_max_db"), &AudioStreamPlayer3D::get_max_db);
+ ClassDB::bind_method(D_METHOD("set_pitch_scale", "pitch_scale"), &AudioStreamPlayer3D::set_pitch_scale);
+ ClassDB::bind_method(D_METHOD("get_pitch_scale"), &AudioStreamPlayer3D::get_pitch_scale);
+
ClassDB::bind_method(D_METHOD("play", "from_position"), &AudioStreamPlayer3D::play, DEFVAL(0.0));
ClassDB::bind_method(D_METHOD("seek", "to_position"), &AudioStreamPlayer3D::seek);
ClassDB::bind_method(D_METHOD("stop"), &AudioStreamPlayer3D::stop);
@@ -885,6 +895,7 @@ void AudioStreamPlayer3D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::REAL, "unit_db", PROPERTY_HINT_RANGE, "-80,80"), "set_unit_db", "get_unit_db");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "unit_size", PROPERTY_HINT_RANGE, "0.1,100,0.1"), "set_unit_size", "get_unit_size");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "max_db", PROPERTY_HINT_RANGE, "-24,6"), "set_max_db", "get_max_db");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "pitch_scale", PROPERTY_HINT_RANGE, "0.01,32,0.01"), "set_pitch_scale", "get_pitch_scale");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "playing", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "_set_playing", "is_playing");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autoplay"), "set_autoplay", "is_autoplay_enabled");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "max_distance", PROPERTY_HINT_RANGE, "0,65536,1"), "set_max_distance", "get_max_distance");
@@ -921,6 +932,7 @@ AudioStreamPlayer3D::AudioStreamPlayer3D() {
unit_size = 1;
attenuation_model = ATTENUATION_INVERSE_DISTANCE;
max_db = 3;
+ pitch_scale = 1.0;
autoplay = false;
setseek = -1;
active = false;
diff --git a/scene/3d/audio_stream_player_3d.h b/scene/3d/audio_stream_player_3d.h
index 9a1f369da2..1fcb83cf21 100644
--- a/scene/3d/audio_stream_player_3d.h
+++ b/scene/3d/audio_stream_player_3d.h
@@ -106,6 +106,7 @@ private:
float unit_db;
float unit_size;
float max_db;
+ float pitch_scale;
bool autoplay;
StringName bus;
@@ -153,6 +154,9 @@ public:
void set_max_db(float p_boost);
float get_max_db() const;
+ void set_pitch_scale(float p_pitch_scale);
+ float get_pitch_scale() const;
+
void play(float p_from_pos = 0.0);
void seek(float p_seconds);
void stop();
diff --git a/scene/3d/camera.h b/scene/3d/camera.h
index 3fd3303a25..e2679870de 100644
--- a/scene/3d/camera.h
+++ b/scene/3d/camera.h
@@ -97,7 +97,7 @@ protected:
void _update_camera_mode();
void _notification(int p_what);
- virtual void _validate_property(PropertyInfo &property) const;
+ virtual void _validate_property(PropertyInfo &p_property) const;
static void _bind_methods();
diff --git a/scene/audio/audio_player.cpp b/scene/audio/audio_player.cpp
index cf070c2235..408c00334a 100644
--- a/scene/audio/audio_player.cpp
+++ b/scene/audio/audio_player.cpp
@@ -45,7 +45,7 @@ void AudioStreamPlayer::_mix_internal(bool p_fadeout) {
}
//mix
- stream_playback->mix(buffer, 1.0, buffer_size);
+ stream_playback->mix(buffer, pitch_scale, buffer_size);
//multiply volume interpolating to avoid clicks if this changes
float target_volume = p_fadeout ? -80.0 : volume_db;
@@ -126,8 +126,8 @@ void AudioStreamPlayer::_notification(int p_what) {
if (!active || (setseek < 0 && !stream_playback->is_playing())) {
active = false;
- emit_signal("finished");
set_process_internal(false);
+ emit_signal("finished");
}
}
@@ -177,6 +177,13 @@ float AudioStreamPlayer::get_volume_db() const {
return volume_db;
}
+void AudioStreamPlayer::set_pitch_scale(float p_pitch_scale) {
+ pitch_scale = p_pitch_scale;
+}
+float AudioStreamPlayer::get_pitch_scale() const {
+ return pitch_scale;
+}
+
void AudioStreamPlayer::play(float p_from_pos) {
if (stream_playback.is_valid()) {
@@ -297,6 +304,9 @@ void AudioStreamPlayer::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_volume_db", "volume_db"), &AudioStreamPlayer::set_volume_db);
ClassDB::bind_method(D_METHOD("get_volume_db"), &AudioStreamPlayer::get_volume_db);
+ ClassDB::bind_method(D_METHOD("set_pitch_scale", "pitch_scale"), &AudioStreamPlayer::set_pitch_scale);
+ ClassDB::bind_method(D_METHOD("get_pitch_scale"), &AudioStreamPlayer::get_pitch_scale);
+
ClassDB::bind_method(D_METHOD("play", "from_position"), &AudioStreamPlayer::play, DEFVAL(0.0));
ClassDB::bind_method(D_METHOD("seek", "to_position"), &AudioStreamPlayer::seek);
ClassDB::bind_method(D_METHOD("stop"), &AudioStreamPlayer::stop);
@@ -320,6 +330,7 @@ void AudioStreamPlayer::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "stream", PROPERTY_HINT_RESOURCE_TYPE, "AudioStream"), "set_stream", "get_stream");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "volume_db", PROPERTY_HINT_RANGE, "-80,24"), "set_volume_db", "get_volume_db");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "pitch_scale", PROPERTY_HINT_RANGE, "0.01,32,0.01"), "set_pitch_scale", "get_pitch_scale");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "playing", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR), "_set_playing", "is_playing");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autoplay"), "set_autoplay", "is_autoplay_enabled");
ADD_PROPERTY(PropertyInfo(Variant::INT, "mix_target", PROPERTY_HINT_ENUM, "Stereo,Surround,Center"), "set_mix_target", "get_mix_target");
@@ -335,6 +346,7 @@ void AudioStreamPlayer::_bind_methods() {
AudioStreamPlayer::AudioStreamPlayer() {
mix_volume_db = 0;
+ pitch_scale = 1.0;
volume_db = 0;
autoplay = false;
setseek = -1;
diff --git a/scene/audio/audio_player.h b/scene/audio/audio_player.h
index 4fee30c0c2..21189aea6d 100644
--- a/scene/audio/audio_player.h
+++ b/scene/audio/audio_player.h
@@ -54,6 +54,7 @@ private:
volatile bool active;
float mix_volume_db;
+ float pitch_scale;
float volume_db;
bool autoplay;
StringName bus;
@@ -81,6 +82,9 @@ public:
void set_volume_db(float p_volume);
float get_volume_db() const;
+ void set_pitch_scale(float p_pitch_scale);
+ float get_pitch_scale() const;
+
void play(float p_from_pos = 0.0);
void seek(float p_seconds);
void stop();
diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp
index 77d3a34c66..73ac99bfee 100644
--- a/scene/gui/item_list.cpp
+++ b/scene/gui/item_list.cpp
@@ -1432,7 +1432,7 @@ void ItemList::_bind_methods() {
ADD_GROUP("Icon", "");
ADD_PROPERTY(PropertyInfo(Variant::INT, "icon_mode", PROPERTY_HINT_ENUM, "Top,Left"), "set_icon_mode", "get_icon_mode");
ADD_PROPERTYNO(PropertyInfo(Variant::REAL, "icon_scale"), "set_icon_scale", "get_icon_scale");
- ADD_PROPERTYNO(PropertyInfo(Variant::REAL, "fixed_icon_size"), "set_fixed_icon_size", "get_fixed_icon_size");
+ ADD_PROPERTYNO(PropertyInfo(Variant::VECTOR2, "fixed_icon_size"), "set_fixed_icon_size", "get_fixed_icon_size");
BIND_ENUM_CONSTANT(ICON_MODE_TOP);
BIND_ENUM_CONSTANT(ICON_MODE_LEFT);
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 95bd676a08..f728490136 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -890,7 +890,7 @@ void TextEdit::_notification(int p_what) {
} else {
// if it has text, then draw current line marker in the margin, as line number etc will draw over it, draw the rest of line marker later.
if (line == cursor.line && highlight_current_line) {
- VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(0, ofs_y, xmargin_beg, get_row_height()), cache.current_line_color);
+ VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(0, ofs_y, xmargin_beg + ofs_x, get_row_height()), cache.current_line_color);
}
}
@@ -1122,14 +1122,14 @@ void TextEdit::_notification(int p_what) {
// line highlighting handle horizontal clipping
if (line == cursor.line && highlight_current_line) {
- // char next to margin is skipped
- if ((char_ofs + char_margin) > xmargin_beg) {
- VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(xmargin_beg + ofs_x, ofs_y, (char_ofs + char_margin) - (xmargin_beg + ofs_x), get_row_height()), cache.current_line_color);
- }
- // end of line when last char is skipped
if (j == str.length() - 1) {
- VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(xmargin_beg + ofs_x, ofs_y, xmargin_end - (char_ofs + char_margin + char_w), get_row_height()), cache.current_line_color);
+ // end of line when last char is skipped
+ VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(xmargin_beg + ofs_x, ofs_y, xmargin_end - (xmargin_beg + ofs_x), get_row_height()), cache.current_line_color);
+
+ } else if ((char_ofs + char_margin) > xmargin_beg) {
+ // char next to margin is skipped
+ VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(xmargin_beg + ofs_x, ofs_y, (char_ofs + char_margin) - xmargin_beg, get_row_height()), cache.current_line_color);
}
}
continue;
diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp
index 6e58bc88d7..7a1fffaa26 100644
--- a/scene/resources/animation.cpp
+++ b/scene/resources/animation.cpp
@@ -1603,19 +1603,19 @@ float Animation::get_step() const {
return step;
}
-void Animation::copy_track(int src_track, Ref<Animation> p_to_animation) {
+void Animation::copy_track(int p_track, Ref<Animation> p_to_animation) {
ERR_FAIL_COND(p_to_animation.is_null());
- ERR_FAIL_INDEX(src_track, get_track_count());
+ ERR_FAIL_INDEX(p_track, get_track_count());
int dst_track = p_to_animation->get_track_count();
- p_to_animation->add_track(track_get_type(src_track));
-
- p_to_animation->track_set_path(dst_track, track_get_path(src_track));
- p_to_animation->track_set_imported(dst_track, track_is_imported(src_track));
- p_to_animation->track_set_enabled(dst_track, track_is_enabled(src_track));
- p_to_animation->track_set_interpolation_type(dst_track, track_get_interpolation_type(src_track));
- p_to_animation->track_set_interpolation_loop_wrap(dst_track, track_get_interpolation_loop_wrap(src_track));
- for (int i = 0; i < track_get_key_count(src_track); i++) {
- p_to_animation->track_insert_key(dst_track, track_get_key_time(src_track, i), track_get_key_value(src_track, i), track_get_key_transition(src_track, i));
+ p_to_animation->add_track(track_get_type(p_track));
+
+ p_to_animation->track_set_path(dst_track, track_get_path(p_track));
+ p_to_animation->track_set_imported(dst_track, track_is_imported(p_track));
+ p_to_animation->track_set_enabled(dst_track, track_is_enabled(p_track));
+ p_to_animation->track_set_interpolation_type(dst_track, track_get_interpolation_type(p_track));
+ p_to_animation->track_set_interpolation_loop_wrap(dst_track, track_get_interpolation_loop_wrap(p_track));
+ for (int i = 0; i < track_get_key_count(p_track); i++) {
+ p_to_animation->track_insert_key(dst_track, track_get_key_time(p_track, i), track_get_key_value(p_track, i), track_get_key_transition(p_track, i));
}
}
diff --git a/scene/resources/color_ramp.cpp b/scene/resources/color_ramp.cpp
index 8c09130873..b2f586d02d 100644
--- a/scene/resources/color_ramp.cpp
+++ b/scene/resources/color_ramp.cpp
@@ -71,8 +71,8 @@ void Gradient::_bind_methods() {
ClassDB::bind_method(D_METHOD(COLOR_RAMP_SET_COLORS, "colors"), &Gradient::set_colors);
ClassDB::bind_method(D_METHOD(COLOR_RAMP_GET_COLORS), &Gradient::get_colors);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "offsets"), COLOR_RAMP_SET_OFFSETS, COLOR_RAMP_GET_OFFSETS);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "colors"), COLOR_RAMP_SET_COLORS, COLOR_RAMP_GET_COLORS);
+ ADD_PROPERTY(PropertyInfo(Variant::POOL_REAL_ARRAY, "offsets"), COLOR_RAMP_SET_OFFSETS, COLOR_RAMP_GET_OFFSETS);
+ ADD_PROPERTY(PropertyInfo(Variant::POOL_COLOR_ARRAY, "colors"), COLOR_RAMP_SET_COLORS, COLOR_RAMP_GET_COLORS);
}
Vector<float> Gradient::get_offsets() const {
diff --git a/scene/resources/style_box.cpp b/scene/resources/style_box.cpp
index 6811517ead..de75bb3976 100644
--- a/scene/resources/style_box.cpp
+++ b/scene/resources/style_box.cpp
@@ -651,8 +651,8 @@ void StyleBoxFlat::draw(RID p_canvas_item, const Rect2 &p_rect) const {
}
//adapt borders (prevent weired overlapping/glitchy drawings)
- int width = style_rect.size.width;
- int height = style_rect.size.height;
+ int width = MAX(style_rect.size.width, 0);
+ int height = MAX(style_rect.size.height, 0);
int adapted_border[4] = { INT_MAX, INT_MAX, INT_MAX, INT_MAX };
adapt_values(MARGIN_TOP, MARGIN_BOTTOM, adapted_border, border_width, height, height, height);
adapt_values(MARGIN_LEFT, MARGIN_RIGHT, adapted_border, border_width, width, width, width);
diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp
index 067d123b83..c0f6756fd1 100644
--- a/scene/resources/texture.cpp
+++ b/scene/resources/texture.cpp
@@ -76,7 +76,7 @@ void Texture::_bind_methods() {
ClassDB::bind_method(D_METHOD("draw_rect_region", "canvas_item", "rect", "src_rect", "modulate", "transpose", "normal_map", "clip_uv"), &Texture::draw_rect_region, DEFVAL(Color(1, 1, 1)), DEFVAL(false), DEFVAL(Variant()), DEFVAL(true));
ClassDB::bind_method(D_METHOD("get_data"), &Texture::get_data);
- ADD_PROPERTY(PropertyInfo(Variant::INT, "flags", PROPERTY_HINT_FLAGS, "Mipmaps,Repeat,Filter,Ansiotropic Linear,Convert to Linear,Mirrored Repeat,Video Surface"), "set_flags", "get_flags");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "flags", PROPERTY_HINT_FLAGS, "Mipmaps,Repeat,Filter,Anisotropic Linear,Convert to Linear,Mirrored Repeat,Video Surface"), "set_flags", "get_flags");
BIND_ENUM_CONSTANT(FLAGS_DEFAULT);
BIND_ENUM_CONSTANT(FLAG_MIPMAPS);
diff --git a/servers/audio/audio_stream.cpp b/servers/audio/audio_stream.cpp
index b207c5f4db..0ad30987e7 100644
--- a/servers/audio/audio_stream.cpp
+++ b/servers/audio/audio_stream.cpp
@@ -46,9 +46,9 @@ void AudioStreamPlaybackResampled::_begin_resample() {
void AudioStreamPlaybackResampled::mix(AudioFrame *p_buffer, float p_rate_scale, int p_frames) {
- float target_rate = AudioServer::get_singleton()->get_mix_rate() * p_rate_scale;
+ float target_rate = AudioServer::get_singleton()->get_mix_rate();
- uint64_t mix_increment = uint64_t((get_stream_sampling_rate() / double(target_rate)) * double(FP_LEN));
+ uint64_t mix_increment = uint64_t(((get_stream_sampling_rate() * p_rate_scale) / double(target_rate)) * double(FP_LEN));
for (int i = 0; i < p_frames; i++) {
diff --git a/servers/physics/physics_server_sw.cpp b/servers/physics/physics_server_sw.cpp
index 5681ca838a..ea0d372281 100644
--- a/servers/physics/physics_server_sw.cpp
+++ b/servers/physics/physics_server_sw.cpp
@@ -795,12 +795,12 @@ void PhysicsServerSW::body_set_axis_velocity(RID p_body, const Vector3 &p_axis_v
body->wakeup();
};
-void PhysicsServerSW::body_set_axis_lock(RID p_body, BodyAxis p_axis, bool lock) {
+void PhysicsServerSW::body_set_axis_lock(RID p_body, BodyAxis p_axis, bool p_lock) {
BodySW *body = body_owner.get(p_body);
ERR_FAIL_COND(!body);
- body->set_axis_lock(p_axis, lock);
+ body->set_axis_lock(p_axis, p_lock);
body->wakeup();
}
diff --git a/servers/physics_2d_server.cpp b/servers/physics_2d_server.cpp
index 180abc406c..5f08cd9243 100644
--- a/servers/physics_2d_server.cpp
+++ b/servers/physics_2d_server.cpp
@@ -168,9 +168,9 @@ float Physics2DShapeQueryParameters::get_margin() const {
return margin;
}
-void Physics2DShapeQueryParameters::set_collision_mask(int p_collision_layer) {
+void Physics2DShapeQueryParameters::set_collision_mask(int p_collision_mask) {
- collision_mask = p_collision_layer;
+ collision_mask = p_collision_mask;
}
int Physics2DShapeQueryParameters::get_collision_mask() const {
diff --git a/servers/physics_server.h b/servers/physics_server.h
index 8b8b8f856d..94fc8d479d 100644
--- a/servers/physics_server.h
+++ b/servers/physics_server.h
@@ -118,7 +118,7 @@ public:
void set_margin(float p_margin);
float get_margin() const;
- void set_collision_mask(int p_collision_layer);
+ void set_collision_mask(int p_collision_mask);
int get_collision_mask() const;
void set_exclude(const Vector<RID> &p_exclude);
diff --git a/servers/visual/visual_server_scene.h b/servers/visual/visual_server_scene.h
index 206503e643..109cdf711c 100644
--- a/servers/visual/visual_server_scene.h
+++ b/servers/visual/visual_server_scene.h
@@ -457,7 +457,7 @@ public:
virtual void instance_set_visible(RID p_instance, bool p_visible);
virtual void instance_set_use_lightmap(RID p_instance, RID p_lightmap_instance, RID p_lightmap);
- virtual void instance_set_custom_aabb(RID p_insatnce, AABB aabb);
+ virtual void instance_set_custom_aabb(RID p_instance, AABB p_aabb);
virtual void instance_attach_skeleton(RID p_instance, RID p_skeleton);
virtual void instance_set_exterior(RID p_instance, bool p_enabled);