Rémi Verschelde
d74d4cbdff
Merge pull request #54173 from nathanfranke/fix-exact-match
2022-01-26 13:35:36 +01:00
cdemirer
ddbb4878f2
Fix array variant reuse in constructor
2022-01-26 07:24:37 +08:00
TechnoPorg
051ef479c9
Allow method binds to take Object subclasses as arguments
...
This commit adds a condition to VariantCaster that casts Variants of type OBJECT to any type T, if T is derived from Object.
This change enables a fair bit of code cleanup. First, the Variant implicit cast operators for Node and Control can be removed, which allows for some invalid includes to be removed. Second, helper methods in Tree whose sole purpose was to cast arguments to TreeItem * are no longer necessary.
A few small changes also had to be made to other files, due to the changes cascading down all the includes.
2022-01-25 09:03:36 -07:00
bruvzg
9456454109
Fix translation with multiple sources for the same language.
...
Remove unnecessary locale length checks.
Add "C" -> "en" locale remap.
2022-01-24 18:58:16 +02:00
bruvzg
cba8280515
[Windows] Add support for handling network share paths.
2022-01-24 16:22:59 +02:00
Nathan Franke
dc1c4cfbfa
Fix action exact match
2022-01-24 05:55:37 -06:00
Rémi Verschelde
57a057f7ff
Merge pull request #56754 from madmiraal/fix-45592
2022-01-24 10:05:42 +01:00
Rémi Verschelde
ce42ab238a
Merge pull request #56931 from lyuma/etcpak_po2
...
Enforce mult-of-4 requirements on etcpak input.
2022-01-23 09:31:35 +01:00
Lyuma
b1b20f5f91
Pad etcpak input to 4x4 blocks. Fixes #49981
2022-01-22 17:20:17 -08:00
Fabio Alessandrelli
01e5e98312
[Net] Fix get_response_body_length for large files.
...
Parsing was fixed, but not the return value for the exposed getter.
2022-01-23 01:30:35 +01:00
Rémi Verschelde
668d6a1c5c
Merge pull request #56337 from cdemirer/fix-array-dictionary-id
2022-01-23 00:46:53 +01:00
kobewi
f056cb8ebc
Don't sort printed Dictionary
2022-01-22 13:45:02 +01:00
Rémi Verschelde
73d00131c6
Merge pull request #35012 from Xrayez/press-any-key
2022-01-20 22:51:01 +01:00
Rémi Verschelde
cfb986c631
Merge pull request #51452 from omar-polo/fix-macros
2022-01-20 22:50:39 +01:00
Ignacio Roldán Etcheverry
0e659b4230
Fix false reporting unclaimed StringName at exit due to static refs
2022-01-20 22:09:03 +01:00
Rémi Verschelde
d681d99e12
Merge pull request #52134 from RandomShaper/fix_naming
2022-01-20 22:01:37 +01:00
Omar Polo
bd448e5535
Rename or refactor macros to avoid leading underscores
...
These are not used consistently and some can conflict with
system-specific defines. While here, also delete some unused macros.
2022-01-20 20:29:15 +01:00
Andrii Doroshenko (Xrayez)
5d17fe7d0f
Add `Input.is_anything_pressed` method
2022-01-20 20:55:14 +02:00
Pedro J. Estébanez
7b0ed2aa5e
Rename Variant::is_ref() to is_ref_counted()
2022-01-20 18:46:25 +01:00
Rémi Verschelde
9e0973ca23
Merge pull request #56972 from lawnjelly/warn_unused
2022-01-20 15:34:41 +01:00
lawnjelly
b411a731fe
Add nodiscard to core math classes to catch c++ errors.
...
A common source of errors is to call functions (such as round()) expecting them to work in place, but them actually being designed only to return the processed value. Not using the return value in this case in indicative of a bug, and can be flagged as a warning by using the [[nodiscard]] attribute.
2022-01-20 13:07:49 +00:00
strank
88eb9f7aef
Delete orphaned property default for exit_code which is not exposed any more.
2022-01-19 23:25:54 -05:00
bruvzg
de48d5101b
Fix locale always selecting translation instead of "en", when no match found.
2022-01-19 16:46:48 +02:00
K. S. Ernest (iFire) Lee
a6f34ea2d0
Make add_importer and add_post_importer_plugin override existing importers.
2022-01-19 04:53:28 -08:00
Rémi Verschelde
ce2b5bdfa8
Merge pull request #52969 from bruvzg/locale_detection
2022-01-18 15:43:04 +01:00
Rémi Verschelde
28cd81c581
Merge pull request #56896 from akien-mga/dictionary-improve-VariantWriter-and-docs
2022-01-18 15:33:00 +01:00
Rémi Verschelde
fd5fb7d64a
Merge pull request #56899 from touilleMan/fix-editor_node-set_exit_code
2022-01-18 14:48:55 +01:00
bruvzg
40c56ed410
Improve locale detection.
...
Use separate language, script and country lists.
Add locale selection dialog and property hint.
2022-01-18 14:30:00 +02:00
Rémi Verschelde
9912492e93
Merge pull request #56668 from akien-mga/array-slice-nicer-bound-checks
2022-01-18 13:22:35 +01:00
Emmanuel Leblond
2ec7c6a6bc
Replace use of `OS::set_exit_code()` by `SceneTree::quit()` in `EditorNode`
2022-01-18 13:09:30 +01:00
Rémi Verschelde
8898d6dadc
Dictionary: Serialize empty dict as `{}` instead of `{\n}`
...
Also make sure to always convert multiline dictionaries to a single line for
its EditorHelp representation, as multiline values break formatting.
2022-01-18 11:31:21 +01:00
Rémi Verschelde
ff19feb8b8
Merge pull request #55939 from cdemirer/validated-array-add-fix
...
Fix validated version of array addition
2022-01-17 21:08:48 +01:00
cdemirer
fbe903909d
Fix validated version of array addition
2022-01-18 03:00:39 +08:00
Rémi Verschelde
24f8a5979c
Merge pull request #56809 from aaronfranke/replace-num-real
2022-01-17 16:55:34 +01:00
Rémi Verschelde
d9a4ff7583
Merge pull request #55020 from bruvzg/vlk_device_surface_check
2022-01-17 13:34:23 +01:00
Rémi Verschelde
8bdef23f7f
Merge pull request #56012 from bruvzg/wt 🤎 4
2022-01-17 13:26:15 +01:00
Aaron Franke
13939734e0
Replace String::num_real code with a wrapper around String::num
2022-01-15 00:21:49 -06:00
Hugo Locurcio
40be15920f
Remove support for PVRTC texture encoding and decoding
...
On the only platform where PVRTC is supported (iOS),
ETC2 generally supersedes PVRTC in every possible way. The increased
memory usage is not really a problem thanks to modern iOS' devices
processing power being higher than its Android counterparts.
2022-01-14 21:08:22 +01:00
Rémi Verschelde
d5fb68bbae
Merge pull request #56779 from aaronfranke/rect2-grow
2022-01-14 20:56:03 +01:00
Marcel Admiraal
f41c72c538
Fix Actions mapped to triggers not using the full range
2022-01-14 15:36:20 +00:00
Aaron Franke
252c803d94
Remove zero size checks from Rect2 grow methods
2022-01-14 00:45:05 -06:00
Marcel Admiraal
5c3600b29f
Fix mouse velocity not changing fast enough
...
- Uses all accumulated movements when calculating velocity
- Discards old accumulated movements
- Sets last mouse velocity to zero when there is no movement
2022-01-13 18:51:34 +00:00
Marcel Admiraal
5250cdd150
Use mouse event relative motion to calculate mouse velocity
2022-01-13 15:23:21 +00:00
Rémi Verschelde
dbab0a9487
Merge pull request #56740 from AnilBK/camera-pre-allocate
2022-01-13 11:13:31 +01:00
Anilforextra
8a9c9a67ef
CameraMatrix: Pre-allocate Vector in get_projection_planes().
2022-01-13 10:14:59 +05:45
Rémi Verschelde
585231a172
Merge pull request #56492 from akien-mga/remove-author-docstrings
2022-01-12 15:24:17 +01:00
Rémi Verschelde
189662e5bd
Merge pull request #56696 from AnilBK/use-init-lists
2022-01-12 10:04:45 +01:00
Anilforextra
6c3a0460a8
Use List Initializations for Vectors.
2022-01-12 10:15:12 +05:45
Rémi Verschelde
a074ceefcd
Merge pull request #56130 from Faless/mbedtls/2.28.0
2022-01-11 15:03:28 +01:00
Rémi Verschelde
46624388d4
Merge pull request #56322 from madmiraal/fix-42450
2022-01-11 11:33:59 +01:00
Rémi Verschelde
c6cefb1b79
`Array`: Relax `slice` bound checks to properly handle negative indices
...
The same is done for `Vector` (and thus `Packed*Array`).
`begin` and `end` can now take any value and will be clamped to
`[-size(), size()]`. Negative values are a shorthand for indexing the array
from the last element upward.
`end` is given a default `INT_MAX` value (which will be clamped to `size()`)
so that the `end` parameter can be omitted to go from `begin` to the max size
of the array.
This makes `slice` works similarly to numpy's and JavaScript's.
2022-01-10 22:42:03 +01:00
Rémi Verschelde
e6cc0ff1a5
Merge pull request #56666 from bruvzg/joy_button_fix
2022-01-10 16:22:43 +01:00
bruvzg
61ea8f8337
Add joystick button index boundary check. Increase max. button number to 128 (max. buttons supported by DirectInput).
2022-01-10 14:39:05 +02:00
Haoyu Qiu
af67e4c291
Fix crash on importing FBX file
2022-01-10 18:24:31 +08:00
Rémi Verschelde
fcc2648e18
Fix missing arg name in bindings for GDExtension API
2022-01-07 14:24:06 +01:00
Rémi Verschelde
e1766da4bd
Merge pull request #53618 from aaronfranke/signed-angle-vec3i
...
Add length and length_squared to Vector2i/3i
2022-01-07 01:14:29 +01:00
Rémi Verschelde
b008cb8df6
Merge pull request #55877 from aaronfranke/slerp-same-len
2022-01-07 00:44:26 +01:00
Rémi Verschelde
a01b18a476
Fix typos with codespell
...
Using codespell 2.1.0.
Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
ans
ba
curvelinear
dof
doubleclick
fave
findn
gird
inout
leapyear
lod
merchantibility
nd
numer
ois
ony
que
readded
seeked
statics
2022-01-07 00:12:09 +01:00
Aaron Franke
064036d786
Allow Vector2/3 slerp values to have any length
2022-01-06 11:12:59 -08:00
Aaron Franke
2c52f16464
Add length and length_squared to Vector2i/3i
2022-01-06 10:06:56 -08:00
Aaron Franke
05ce2c80bb
Rename Variant enum members in resource_format_binary.cpp
2022-01-06 08:12:26 -08:00
Rémi Verschelde
8d83da5bf9
Merge pull request #56224 from Calinou/variant-rename-packed-array-constants
2022-01-06 17:08:36 +01:00
Rémi Verschelde
f57bdf13af
Merge pull request #50493 from timothyqiu/local-vector-list-init
2022-01-06 16:51:57 +01:00
bruvzg
c69e0d16bc
Fix multiple missing UTF-8 decoding.
2022-01-06 14:35:22 +02:00
Rémi Verschelde
b238218363
Merge pull request #55851 from Chaosus/better-completion-options-list_rebased
2022-01-06 09:40:44 +01:00
Rémi Verschelde
0157742422
Merge pull request #53434 from Faless/io/4.x_file_access_compressed
...
[File] Fix FileAccessCompressed::get_buffer return value.
2022-01-06 09:20:27 +01:00
Rémi Verschelde
6af77c7b09
Merge pull request #53684 from TokageItLab/orthogonal-mode
2022-01-05 16:05:40 +01:00
Haoyu Qiu
c0d3bdc0ca
Add list initialization support for Vector & LocalVector
2022-01-05 20:42:09 +08:00
Rémi Verschelde
ba2bdc478b
Style: Remove inconsistently used `@author` docstrings
...
Each file in Godot has had multiple contributors who co-authored it over the
years, and the information of who was the original person to create that file
is not very relevant, especially when used so inconsistently.
`git blame` is a much better way to know who initially authored or later
modified a given chunk of code, and most IDEs now have good integration to
show this information.
2022-01-04 20:42:50 +01:00
Rémi Verschelde
8db6fb18c9
Merge pull request #56484 from KoBeWi/your_callable_is_invalid
2022-01-04 16:46:05 +01:00
Rémi Verschelde
9a1f244d77
Merge pull request #56295 from aaronfranke/doc-midi
2022-01-04 16:45:33 +01:00
Fabio Alessandrelli
23ba76f2ec
Merge pull request #56331 from Cnidarias/large_http_downloads
...
Fix http limitation for large "content-length"
2022-01-04 16:34:11 +01:00
kobewi
ec94ceba14
Fix method validation in Thread
2022-01-04 14:44:47 +01:00
Aaron Franke
de9adcf045
Document InputEventMIDI and add some missing 0xF MIDI messages
2022-01-04 05:30:43 -08:00
Rémi Verschelde
5ae0f0f199
Merge pull request #56469 from Zylann/remove_gdclass_inherits_static
2022-01-04 14:28:41 +01:00
Rémi Verschelde
42312f066b
Merge pull request #53313 from KoBeWi/debinded_konnekt
2022-01-04 12:22:46 +01:00
Rémi Verschelde
fe52458154
Update copyright statements to 2022
...
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
Marc Gilleron
a88e1ce362
Remove unused `inherits_static` from GDCLASS
2022-01-03 20:24:16 +00:00
Rémi Verschelde
98b3ba1842
Merge pull request #53957 from fabriceci/new-template-workflow
2022-01-03 20:40:33 +01:00
fabriceci
9d5b807059
Improve editor template workflow
...
Co-Authored-By: jmb462 <jmb462@gmail.com>
2022-01-02 21:52:09 +01:00
luz paz
a124f1effe
Fix various typos
...
Found via ` codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,expct,fave,findn,gird,hist,inout,leapyear,lod,nd,numer,ois,ony,paket,seeked,sinc,switchs,te,uint,varn`
Update editor/import/resource_importer_layered_texture.cpp
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update doc/classes/TileSetScenesCollectionSource.xml
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/gui/graph_edit.cpp
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/resources/animation.cpp
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/resources/animation.cpp
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/resources/animation.cpp
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/gui/rich_text_label.cpp
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Revert previously committed change
2022-01-02 01:03:58 -05:00
cdemirer
e2ed9d13eb
Fix Array and Dictionary id() and dictionary test bug
2021-12-30 13:14:09 +08:00
Cnidarias
69a532414c
Fix http limitation for large "content-length"
...
When a request was issued to a server that returned "content-length" header
whose value was greater than that of an "int" we ran into overflow
problems. The fix for this was rather simple by increasing the data
type to `int64_t`
2021-12-30 01:16:19 +01:00
Marcel Admiraal
3105d9b1f3
Rename speed to velocity when it's a directional Vector
2021-12-29 15:35:26 +00:00
Andrii Doroshenko (Xrayez)
7a8b11ee14
Refactor auto-instantiation of `Object` properties in editor
...
Auto-instantiation is used by the create dialog, but should also be
used by the editor inspector.
This refactors object properties auto-instantiation into a dedicated
method to be reused throughout editor (and possibly scripting).
2021-12-28 15:50:44 +02:00
Silc 'Tokage' Renew
61759da5b3
Fix some gizmo behavior to make more consistent
2021-12-25 03:24:04 +09:00
Hugo Locurcio
753754548a
Rename Variant Packed*Array constants for consistency
...
All arrays are now prefixed with `PACKED_` to distinguish them from
GDScript's generic typed arrays.
`RAW_ARRAY` is now `PACKED_BYTE_ARRAY` (RawArray was the name of
PackedByteArray back in Godot 2.x).
2021-12-24 18:44:08 +01:00
Bradley Clemetson
4fd2706afd
If a gdextension library filepath is an absolute path do not attempt to append the base directory on top of that. While this is a uncommon if not unused case for a release version it is helpful for development builds.
...
Fix formatting
2021-12-23 14:20:07 -08:00
Fabio Alessandrelli
e375cbd094
Bump mbedTLS version to 2.28.0 (new LTS).
...
Keep applying the windows entropy patch (UWP support).
Remove no longer needed padlock patch.
Update thirdparty README to reflect changes, and new source inclusion
criteria.
2021-12-21 13:26:02 +01:00
Rémi Verschelde
5ffee633cd
Merge pull request #56028 from madmiraal/revert-55978-fix-switch-controller-event-spam
2021-12-21 09:44:59 +01:00
great90
10c91f8116
Fix variable name 'max_size' to 'min_size' in aabb
2021-12-19 11:51:14 +08:00
bruvzg
ea5bb8b47d
[Windows] Improve console handling and execute/create_process.
...
Always build with the GUI subsystem.
Redirect stdout and stderr output to the parent process console.
Use CreateProcessW for blocking `execute` calls with piped stdout and stderr (prevent console windows for popping up when used with the GUI subsystem build, and have more consistent behavior with `create_process`).
Add `open_console` argument to the `execute` and `create_process` to open a new console window.
Remove `interface/editor/hide_console_window` editor setting.
Remove `Toggle System Console` menu option.
Remove `set_console_visible` and `is_console_visible` functions.
2021-12-18 10:14:07 +02:00
Marcel Admiraal
39136ce3e0
Revert "Fixed event spam when using the Nintendo Switch controller"
2021-12-17 17:14:07 +00:00
Haoyu Qiu
1fb59d13c2
Fix font preview text color on light background
2021-12-18 00:34:28 +08:00
Rémi Verschelde
ed395c6b99
Sync controller mappings DB with SDL2 community repo
...
Synced with gabomdq/SDL_GameControllerDB@265b43b789 .
2021-12-17 00:14:44 +01:00
Rémi Verschelde
9c9cc1b222
Merge pull request #55978 from slouken/fix-switch-controller-event-spam
...
Fixed event spam when using the Nintendo Switch controller
2021-12-16 19:49:47 +01:00
Sam Lantinga
313815f818
Fixed event spam when using the Nintendo Switch controller
...
There is no filtering on the Nintendo Switch Pro controller thumbstick, so there will frequently be events with very slight change. These are turned into "not pressed" events, which cancel "pressed" events from keys and buttons.
This change filters out up to 5% jitter, but it might be worth revisiting whether "not pressed" events should cancel "pressed" events.
2021-12-16 09:04:58 -08:00
Haoyu Qiu
e4e4e475f8
Make `--doctool` locale aware
...
* Adds `indent(str)` to `String`:
* Indent the (multiline) string with the given indentation.
* This method is added in order to keep the translated XML correctly
indented.
* Moves the loading of tool/doc translation into
`editor/editor_translation.{h,cpp}`.
* This will be used from both `EditorSettings` and the doc tool from
`main`.
* Makes use of doc translation when generating XML class references, and
setup the translation locale based on `-l LOCALE` CLI parameter.
The XML class reference won't be translated if `-l LOCALE` parameter is
not given, or when it's `-l en`.
2021-12-16 17:49:22 +08:00
Fabio Alessandrelli
f9c05333ef
Merge pull request #55657 from MorganKF/patch-multiplayer-peer-extension
...
Patch `MultiplayerPeerExtension` to allow derived classes
2021-12-15 11:40:52 +01:00
Xavier Sellier
ba0abd399f
Defer the call to 'popup_str' to the next cycle to let Godot Engine's editor time to properly start
2021-12-14 20:08:19 +01:00
Yuri Roubinsky
526390c048
Fix highlight for completion options match (rebased)
...
Co-authored-by: Gustav Andersson <gvekan@users.noreply.github.com>
2021-12-12 10:39:49 +03:00
MorganKF
44b35c3759
Update MultiplayerPeerExtension class registration to non-virtual
...
Fix formatting
2021-12-11 11:05:03 -03:30
raphaelazev
82527df55c
Added check to get_all_locales to avoid adding duplicate locales to array
2021-12-10 19:25:59 -03:00
Tomasz Chabora
d04c2a554f
Improve Directory content navigation
2021-12-10 17:24:04 +01:00
Rémi Verschelde
03e105f677
Sync controller mappings DB with SDL2 community repo
...
Synced with gabomdq/SDL_GameControllerDB@348cfa347f .
2021-12-10 10:59:30 +01:00
Nathan Franke
49403cbfa0
Replace String comparisons with "", String() to is_empty()
...
Also:
- Adds two stress tests to test_string.h
- Changes to .empty() on std::strings
2021-12-09 04:48:38 -06:00
Nathan Franke
41a20171eb
align to horizontal_alignment, valign to vertical_alignment, related
2021-12-09 01:38:46 -06:00
Rémi Verschelde
46d384060e
Merge pull request #35901 from nathanfranke/pool-byte-array-subarray-exclusive
2021-12-07 14:00:59 +01:00
Fabio Alessandrelli
3ae8eda1ed
Merge pull request #55603 from Calinou/add-os-crash-method
...
Add an `OS.crash()` method for testing system crash handler
2021-12-06 16:34:15 +01:00
Rémi Verschelde
1f5a3ba0ba
Merge pull request #55661 from KoBeWi/joys_of_connection
2021-12-06 14:03:01 +01:00
Rémi Verschelde
5baf20e638
Merge pull request #34005 from aaronfranke/minmax
2021-12-06 14:01:45 +01:00
Rémi Verschelde
608c9f8203
Merge pull request #47257 from timothyqiu/http-client-proxy
2021-12-06 13:30:53 +01:00
kobewi
cb2bdcd286
Unexpose joy_connection_changed method
2021-12-06 13:10:17 +01:00
Hugo Locurcio
5761b90f3c
Add an `OS.crash()` method for testing system crash handler
...
This makes it possible to test the system's crash handler without
having to modify engine code or exploit an engine bug.
2021-12-03 22:11:46 +01:00
Yuri Sizov
b3992f7e6e
Make overridden properties link to parent definition
...
Co-authored-by: Josh DeGraw <joshmdegraw@gmail.com>
2021-12-03 17:47:22 +03:00
Rémi Verschelde
aaabc0abcc
Merge pull request #55520 from pycbouh/docs-sort-group-newline-theme-and-enums
2021-12-03 15:29:29 +01:00
Rémi Verschelde
8762d8fa5d
Merge pull request #55470 from groud/move_godot_object_init_to_extension
2021-12-03 14:41:07 +01:00
Aaron Franke
24f57886d0
Expose max_axis_index and max_axis_index for Vector2(i)
...
Some cleanup with Vector3(i)'s methods so that it is consistent with Vector2, for example it returns enums internally (GDScript still gets ints).
2021-12-02 23:45:41 -06:00
Rémi Verschelde
892a5a72cd
Merge pull request #55474 from akien-mga/copy-operators-no-reference
2021-12-02 17:34:45 +01:00
Max Hilbrunner
837e6bdf18
Merge pull request #37626 from aaronfranke/rect2-warnings
...
Print warnings when using a Rect2 or AABB with a negative size
2021-12-02 14:41:02 +01:00
Rémi Verschelde
49d8925713
Merge pull request #47294 from sebastian-heinz/patch-1
2021-12-02 10:04:17 +01:00
Rémi Verschelde
02d6cbfd8c
Merge pull request #38604 from Calinou/astar-rename-get-point-ids
2021-12-02 09:35:57 +01:00
sebastian-heinz
be90aadbcd
allow variant construction in expressions
2021-12-02 15:30:10 +08:00
Raul Santos
a367378f9e
Rename Vector parameters to be consistent
...
Renames parameters that were named differently across different
scripting languages or their documentation to use the same name
everywhere.
2021-12-01 21:14:46 +01:00
Yuri Sizov
397e56964d
Sort and group theme properties in docs, improve formatting for theme and enums
2021-12-01 21:02:20 +03:00
Aaron Franke
9687f6fca3
Warn when using an AABB or Rect2 with a negative size
2021-11-30 18:27:58 -06:00
Hugo Locurcio
89849a9ed9
Rename `AStar.get_points()` to `AStar.get_point_ids()` for clarity
...
The same has been done for AStar2D as well.
2021-11-30 22:14:39 +01:00
Gilles Roudière
4fc0fb826a
Change gdnative interface so that Godot object initialization should be triggered from the extension side
2021-11-30 16:55:48 +01:00
Rémi Verschelde
7da392bcc5
Don't return reference on copy assignment operators
...
We prefer to prevent using chained assignment (`T a = b = c = T();`) as this
can lead to confusing code and subtle bugs.
According to https://en.wikipedia.org/wiki/Assignment_operator_(C%2B%2B) , C++
allows any arbitrary return type, so this is standard compliant.
This could be re-assessed if/when we have an actual need for a behavior more
akin to that of the C++ STL, for now this PR simply changes a handful of
cases which were inconsistent with the rest of the codebase (`void` return
type was already the most common case prior to this commit).
2021-11-30 16:26:29 +01:00
Marcel Admiraal
272b3c3728
Enable sorting of operator methods in class documentation.
2021-11-29 14:51:44 +00:00
Nathan Franke
dd30253cdc
PackedByteArray, Array slice end exclusive, rename subarray to slice
2021-11-26 22:13:12 -06:00
kleonc
4038bc0c36
Fix `Image.blit_rect/blend_rect()` for negative `p_dest` point
2021-11-26 22:23:04 +01:00
Ricardo Subtil
93396b3e51
Fix wrong comparison with default values
2021-11-26 14:04:13 +00:00
Yuri Roubinsky
a4b7de6b23
Fix console colors on Windows
2021-11-26 13:10:55 +03:00
Aaron Franke
40cb86ba96
Don't show errors when getting nonexistent settings
2021-11-25 08:23:42 -06:00
Aaron Franke
9851d3c5b2
Move logic for saving project features to ProjectSettings save_custom
2021-11-25 03:08:05 -06:00
Aaron Franke
e81c689592
Project feature warning system
2021-11-24 10:32:07 -06:00
Rémi Verschelde
b1bf82d2b4
Merge pull request #52456 from kleonc/image-fill-rect
2021-11-24 16:34:01 +01:00
Haoyu Qiu
c09ea8d45a
Adds proxy support for HTTPClient
...
Also fixed a potential infinite loop when connecting to server.
2021-11-24 14:36:42 +08:00
Lightning_A
e078f970db
Rename `remove()` to `remove_at()` when removing by index
2021-11-23 18:58:57 -07:00
kleonc
92ca300ab1
Image Use memcpy() in fill(), fill_rect(), _put_pixelb(), _get_pixelb()
...
Co-authored-by: Lightning_A <aaronjrecord@gmail.com>
2021-11-23 18:06:26 +01:00
kleonc
91595b16e3
Add Image::fill_rect method
2021-11-23 18:06:23 +01:00
bruvzg
9877d91c4a
Add Input.is_physical_key_pressed method.
2021-11-23 11:14:19 +02:00
Rémi Verschelde
1e71cab797
Merge pull request #55223 from bruvzg/gde_dict_index
2021-11-23 09:18:30 +01:00
bruvzg
b11e619b19
[Vulkan] Check each device capabilities before selecting it.
...
Split instance and physical device selection function and move device selection to window creation, to reject devices without present capability.
Add device preferred type check in discrete > integrated > virtual > cpu > other order.
Add device list printout.
Add command line argument to override device selection.
2021-11-22 20:04:57 +02:00
kobewi
7dc97d6558
Ignore override.cfg when in editor
2021-11-22 16:10:31 +01:00
bruvzg
f214b2b194
[GDExtension] Implement missing Dictionary index operators.
...
Co-authored-by: Bastiaan Olij <mux213@gmail.com>
2021-11-22 12:43:00 +02:00
Haoyu Qiu
8253a45a1a
Fix crash when executing PackedDataContainer._iter_init
2021-11-21 20:14:59 +08:00
Rémi Verschelde
be16eb625b
Merge pull request #54932 from briansemrau/expose-main-thread-id
2021-11-20 10:48:46 +01:00
Fabio Alessandrelli
46fdba5f8b
[HTML5] Add WebGL2 (GLES3) support using the OpenGL renderer.
...
Note, the editor build requires the mbedtls module to be manually
enabled, as it is currently needed as a ResourceUID dependency.
This will need to be addressed in a separate PR.
2021-11-19 16:59:27 +01:00
Rémi Verschelde
fc9de5ba7f
Merge pull request #54499 from Faless/threads/4.x_work_pool_default
2021-11-19 09:39:21 +01:00
Paulb23
eb9100f085
Fix divide by zero in pck_packer
2021-11-17 18:07:29 +00:00
Rémi Verschelde
2b24629847
Merge pull request #55042 from nekomatata/fix-segment-intersection
2021-11-17 17:33:56 +01:00
Rémi Verschelde
7540da622d
Merge pull request #49793 from Chaosus/expose_randfn
2021-11-17 13:53:23 +01:00
Yuri Roubinsky
a74acca858
Expose `randfn` to global scope
2021-11-17 14:29:19 +03:00
Xwdit
0bd96bd2cf
Fix the exceptions in signal disconnection
...
Use the correct method to get SignalData to fix exceptions in signal disconnection
2021-11-17 09:29:29 +01:00
PouleyKetchoupp
6d0c93dccf
Fix segment intersection in Geometry2D
...
Doing a multiplication to reduce the amount of tests was causing
precision which lead to 2D raycast detecting false positive contacts
in some cases with convex polygons.
2021-11-16 18:09:33 -07:00
Bastiaan Olij
035468669a
Fix array access in gdextensions
2021-11-17 10:36:29 +11:00
Hugo Locurcio
8fb7e622a6
Rename built-in `SGN()` macro to `SIGN()`
...
This matches the name of the GDScript function (except it's uppercase
here).
2021-11-16 20:40:49 +01:00
Rémi Verschelde
5341e6010e
Allow dehardcoding documentation branch and URL in docs links
...
This makes it possible to change the branch of the documentation that
URLs are pointing to without having to modify all class reference
files.
In the XML class reference, the `$DOCS_URL` placeholder should be used,
and will be replaced automatically in the editor and when generating
the RST class reference.
The documentation branch string is set in `version.py`.
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2021-11-15 13:02:21 +01:00
Rémi Verschelde
d975b1bc37
Merge pull request #43072 from KoBeWi/point_to_angle
2021-11-15 09:56:21 +01:00
Rémi Verschelde
8bb163807a
Merge pull request #54976 from reduz/importer-options-by-path
2021-11-15 00:46:04 +01:00
Hugo Locurcio
315e94ee2a
Merge pull request #53710 from CaptainProton42/fix-extension-class-inspector-properties
2021-11-14 22:02:31 +01:00
reduz
cd2a499084
Add path to functions that return iporter options
...
-Allows displaying custom options for specific file format variants
-Added support for scene format import to retrieve custom options
This PR is necessary for #54886 to be implemented properly.
2021-11-14 14:06:10 -03:00
Brian Semrau
c558263d84
Expose Thread::get_main_id in core bindings
2021-11-12 19:28:49 -05:00
Aaron Franke
3c0fdcc8ac
Use "enum class" for input enums
2021-11-12 15:37:54 -06:00
Rémi Verschelde
1aa3c8419b
Merge pull request #54869 from akien-mga/string-remove-erase
2021-11-11 13:00:21 +01:00
Rémi Verschelde
e2e9b08cc7
Color: Bind `from_hsv` as static method
2021-11-11 11:50:02 +01:00
Rémi Verschelde
2beaae4b6f
String: Remove `erase` method, bindings can't mutate String
2021-11-11 11:23:32 +01:00
Haoyu Qiu
367d75fab0
Add missing characters for property name quoting
2021-11-11 13:18:09 +08:00
Rémi Verschelde
06a33e590f
Merge pull request #53819 from TokageItLab/re-implement-ping-pong
...
Reimplement ping-pong animation and reverse playback
2021-11-09 22:11:04 +01:00
Tomasz Chabora
606cfa9a47
Fix Vector2.angle_to_point() being reversed
2021-11-09 16:59:58 +01:00
bruvzg
ba9d737363
Fix incorrect encoding (Latin-1 instead of UTF-8) used in `_error_handler` functions.
2021-11-08 23:45:08 +02:00
Rémi Verschelde
e87687a6d0
Merge pull request #54486 from ibrahn/thread-work-pool-lazier
2021-11-08 13:39:39 +01:00
Rémi Verschelde
63559f2c80
Merge pull request #54186 from miraz12/fix-packedByteArray-memcpy-crash
2021-11-08 13:33:07 +01:00
Brian Semrau
dc11e73bf0
Rename AABB `get_area` to `get_volume`
2021-11-05 18:22:42 -04:00
Aaron Franke
744b43b527
Fix Quaternion multiplication operator
2021-11-04 11:24:46 -05:00
kobewi
e393c2a734
Add is_built_in() method to Resource
2021-11-04 12:45:58 +01:00
Hugo Locurcio
c012fbc8b2
Rename `PROPERTY_USAGE_NOEDITOR` to `PROPERTY_USAGE_NO_EDITOR`
...
This is consistent with other constants that include `NO`,
such as `PROPERTY_HINT_COLOR_NO_ALPHA`.
2021-11-03 23:06:17 +01:00
Rémi Verschelde
4b247e7ffa
Sync controller mappings DB with SDL2 community repo
...
Synced with gabomdq/SDL_GameControllerDB@322aac4bb7 .
Also improve parser errors to allow identifying the problematic mappings.
2021-11-03 19:55:52 +01:00
Silc 'Tokage' Renew
953a7bce7e
reimplement ping-pong
2021-11-03 13:39:33 +09:00
Rémi Verschelde
ab6ec9310c
Merge pull request #54453 from KoBeWi/slice_of_string
2021-11-02 13:18:34 +01:00
kobewi
e5725c7deb
Expose String.get_slice
2021-11-02 11:24:07 +01:00
Fabio Alessandrelli
4ed1d977fc
[OS] Add ThreadWorkPool default size to OS.
...
Some platforms (*cough* web *cough*) have hard limits on the number of
threads that can be spawned.
Currently, ThreadPoolWork (mostly used in rendering/physics servers)
will spawn as many threads as CPUs available causing exception on
machines with high CPU count.
This commit adds a new overridable method to OS that returns the default
thread pool size (still the CPU count by default), and overrides it for
the JavaScript platform so it always allocate only one thread.
We can likely improve the whole ThreadPoolWork in the future to always
allocate X amount of threads, and assign jobs to them on the fly, but
that will require some more architectural changes.
2021-11-02 04:16:00 +01:00
Emmanuel Leblond
795cd2eb38
Merge pull request #35816 from touilleMan/dictionary-operator==-true-comparison
...
Modify Array/Dictionary::operator== to do real key/value comparison
2021-11-02 00:00:38 +01:00
Rémi Verschelde
7b83039885
Merge pull request #54490 from q66/ppc
2021-11-01 23:27:21 +01:00
Rémi Verschelde
0fbf53dbc5
Merge pull request #54387 from Calinou/editor-translations-increase-zlib-compression-level
2021-11-01 23:22:55 +01:00
Daniel Kolesa
3a84a64d2f
Add support for PowerPC family
2021-11-01 22:25:53 +01:00
Ibrahn Sahir
151d2e34ca
ThreadWorkPool no longer starts worker threads if given zero work.
2021-11-01 19:19:25 +00:00
bruvzg
0b6b8427c8
[macOS] Add `create_instance` function to spawn editor copies.
...
[macOS] Modify `create_project` function to detect and run app bundles using NSWorkspace to ensure app window is registered and activated correctly.
2021-11-01 11:48:23 +02:00
Rémi Verschelde
1dd742777a
Merge pull request #53452 from aaronfranke/who-let-the-docs-out
2021-10-31 23:18:32 +01:00
Clay John
8a10bb7d0d
Use OpenGL 3.3 core profile instead of compatibility profile
...
- Rename OpenGL to GLES3 in the source code per community feedback.
- The renderer is still exposed as "OpenGL 3" to the user.
- Hide renderer selection dropdown until OpenGL support is more mature.
- The renderer can still be changed in the Project Settings or using
the `--rendering-driver opengl` command line argument.
- Remove commented out exporter code.
- Remove some OpenGL/DisplayServer-related debugging prints.
2021-10-31 15:56:45 +01:00
Emmanuel Leblond
f9ba2efe1e
Modify Dictionary::operator== to do real key/value comparison with recursive support (and add unittests)
2021-10-30 13:11:01 +02:00
Hugo Locurcio
ce97ddbcb1
Rename GLES2 driver to OpenGL to prepare for the upgrade to GLES3
...
- Use lowercase driver names for the `--rendering-driver`
command line argument.
2021-10-30 02:05:49 +02:00
lawnjelly
e3491a3744
Add GLES2 2D renderer + Linux display manager
...
First implementation with Linux display manager.
- Add single-threaded mode for EditorResourcePreview (needed for OpenGL).
Co-authored-by: clayjohn <claynjohn@gmail.com>
Co-authored-by: Fabio Alessandrelli <fabio.alessandrelli@gmail.com>
2021-10-30 02:05:48 +02:00
Aaron Franke
6772ebcea0
Move the docs for constructors and operators out of methods section
2021-10-29 12:34:57 -05:00
Hugo Locurcio
89cf17c96f
Use maximum zlib compression when generating editor translation headers
...
With comments stripped, this reduces the combined generated translation
size from 28.7 MB to 28.4 MB (-240 KB).
2021-10-29 19:07:48 +02:00
Max Hilbrunner
82f88f5d56
Merge pull request #54340 from aaronfranke/time-doc
...
Update and fix Time documentation
2021-10-29 15:49:22 +02:00
Aaron Franke
2dabdda36a
Update Time documentation
2021-10-28 10:16:56 -05:00
Rémi Verschelde
f42ef8d5f9
CI: Update to clang-format 13 using LLVM repo
2021-10-28 17:11:00 +02:00
Rémi Verschelde
f7d852b532
Merge pull request #54350 from akien-mga/clang-format-dont-align-operands
2021-10-28 17:10:52 +02:00
Rémi Verschelde
0ae65472e7
clang-format: Enable `BreakBeforeTernaryOperators`
...
clang-format keeps breaking the way it handles break *after* ternary operators,
so I give up and go with the only style they seem to actually test.
2021-10-28 15:57:41 +02:00
Rémi Verschelde
6b090e325a
Merge pull request #53526 from KoBeWi/super_print
2021-10-28 15:47:52 +02:00
Rémi Verschelde
3a6be64c12
clang-format: Various fixes to comments alignment from `clang-format` 13
...
All reviewed manually and occasionally rewritten to avoid bad auto formatting.
2021-10-28 15:43:36 +02:00
Rémi Verschelde
3b11e33a09
clang-format: Disable alignment of operands, too unreliable
...
Sets `AlignOperands` to `DontAlign`.
`clang-format` developers seem to mostly care about space-based indentation and
every other version of clang-format breaks the bad mismatch of tabs and spaces
that it seems to use for operand alignment. So it's better without, so that it
respects our two-tabs `ContinuationIndentWidth`.
2021-10-28 15:19:35 +02:00
Gilles Roudière
a51f92273a
Remove ItemList editor and replace it by a property array
2021-10-28 10:16:51 +02:00
Anton Christoffersson
9ed8417271
Fixed crash in `variant_call` when trying to memcpy 0 bytes.
2021-10-27 19:01:33 +02:00
Max Hilbrunner
5dc02eb8b0
Save all 64 bits of get_ticks_msec() in more cases
2021-10-26 13:58:58 +02:00
reduz
d03b7fbe09
Refactored Node3D rotation modes
...
* Made the Basis euler orders indexed via enum.
* Node3D has a new rotation_order property to choose Euler rotation order.
* Node3D has also a rotation_mode property to choose between Euler, Quaternion and Basis
Exposing these modes as well as the order makes Godot a lot friendlier for animators, which can choose the best way to interpolate rotations.
The new *Basis* mode makes the (exposed) transform property obsolete, so it was removed (can still be accessed by code of course).
2021-10-25 14:34:00 -03:00
Rémi Verschelde
24fdedfe94
Merge pull request #54050 from reduz/animation-compression
2021-10-25 14:27:58 +02:00
Anton Christoffersson
fb7ba76325
Fixed implicit conversion of uint32_t to uint8_t in `image`
2021-10-25 12:51:28 +02:00
Aaron Franke
474d0f58f5
Add support for the RISC-V architecture
...
Supports RV64GC (RISC-V 64-bit with general-purpose and compressed-instruction extensions)
2021-10-22 12:51:10 -05:00
Rémi Verschelde
f9be8b8e8e
Merge pull request #54081 from Rubonnek/add_bin_messages_master
2021-10-22 19:31:55 +02:00
Rémi Verschelde
beb3875cdf
Merge pull request #53781 from m4gr3d/restrict_project_data_dir_config_master
2021-10-22 19:30:35 +02:00
Rémi Verschelde
6c35e74228
Merge pull request #53812 from RandomShaper/expose_flush_input
2021-10-22 17:20:33 +02:00
Pedro J. Estébanez
6dc3fae201
Expose Input::flush_buffered_events()
2021-10-22 14:28:48 +02:00
Rémi Verschelde
9f7218eb69
Merge pull request #54088 from madmiraal/remove-unimplemented-methods
2021-10-22 12:59:32 +02:00
reduz
a69541da4c
Implement Animation Compression
...
Roughly based on https://github.com/godotengine/godot-proposals/issues/3375 (used format is slightly different).
* Implement bitwidth based animation compression (see animation.h for format).
* Can compress imported animations up to 10 times.
* Compression format opens the door to streaming.
* Works transparently (happens all inside animation.h)
2021-10-21 18:27:34 -03:00
Marcel Admiraal
87a4ba492e
Remove unimplemented methods
2021-10-21 18:44:25 +01:00
Rémi Verschelde
b6f4f23a5e
Merge pull request #54078 from Rubonnek/add_hex_messages_master
...
Add error messages to `String::hex_to_int`, and accept capital X in prefix
2021-10-21 19:37:11 +02:00
Wilson E. Alvarez
5736a0ed3c
Accept capital B in String::bin_to_int prefix
2021-10-21 13:18:49 -04:00
Wilson E. Alvarez
549a48ccc9
Add error messages to String::hex_to_int, and accept capital X in prefix
2021-10-21 12:40:14 -04:00
bruvzg
a975682ef6
Fix handling multiple "physical key" events in the single input map action.
2021-10-19 22:19:41 +03:00
Rémi Verschelde
4387f9645b
Merge pull request #52940 from groud/toast_notification
2021-10-19 09:57:13 +02:00
Rémi Verschelde
21f1ac8bf3
Merge pull request #53805 from groud/name_to_tileset_sources
2021-10-19 09:56:19 +02:00
ne0fhyk
b5c750fa65
Restrict the project data directory configuration
2021-10-18 14:10:38 -07:00
Rémi Verschelde
f4d9749e23
Merge pull request #53741 from DmitriySalnikov/exposed_sensor_setters_master
2021-10-18 23:00:56 +02:00
Rémi Verschelde
c5f4bf2077
Merge pull request #53950 from qarmin/memory_leak_gdscript
2021-10-18 14:02:33 +02:00
qarmin
343d005e0f
Fix memory leak in exported project
2021-10-18 11:19:31 +02:00
unknown
73c5e07051
Added better descriptive error messages for file operations in core_bind.cpp
2021-10-18 02:09:42 +05:30
mennomax
b4eeeb315a
Swap args of Plane(point, normal) constructor
...
Now (normal, point)
2021-10-15 20:49:42 -05:00
Rémi Verschelde
c133480531
SCons: List `.gen.cpp` sources explicitly to avoid globbing errors
...
Whenever we change the name (or remove) generated cpp files with the `.gen.cpp`
extension, users run into build issues when switching between branches (i.e.
switching before and after the name change/removal). This is because we glob
`*.cpp` so if a now-obsolete file from a previous build is present, we'll
include it too, potentially leading to bugs or compilation failure (due to
missing headers or invalid code).
So globbing patterns in `add_source_files` will now skip files ending with
`.gen.cpp`, which should instead be passed explicitly where they're used.
2021-10-15 22:14:11 +02:00
Rémi Verschelde
cd21cc683a
SCons: Set `DEBUG_ENABLED` and `DEV_ENABLED` in SConstruct
...
They're the same for all platforms so they don't need to be repeated in all
platform definitions.
2021-10-15 10:26:58 +02:00
K. S. Ernest (iFire) Lee
8f0c056431
Fix specific warnings issues by Clang
...
Found by `scons dev=yes` on llvm-mingw.
2021-10-14 14:14:26 -07:00
George Marques
4c14051b3f
Zero Dictionary and Array variants when changing type with reset
...
So they don't reference to the old values anymore and instead refer to
a new value.
2021-10-14 11:22:17 -03:00
Gilles Roudière
3b42660105
Add a name to TileSet sources
2021-10-14 14:54:48 +02:00
Gilles Roudière
0587e5e018
Implement toast notifications in the editor
2021-10-14 13:30:54 +02:00
Rémi Verschelde
a801a2031d
Merge pull request #53773 from nathanfranke/fix-license-character-encoding
2021-10-13 21:04:13 +02:00
Rémi Verschelde
fd2dcba02c
Merge pull request #53772 from RandomShaper/fix_hash_map
2021-10-13 21:03:50 +02:00
Nathan Franke
28c163a432
Fix character encoding of Engine::get_copyright_info
2021-10-13 10:42:41 -05:00
Pedro J. Estébanez
f80e4e4f4c
Fix HashMap element copy leaving hash as zero
2021-10-13 17:25:31 +02:00
Rémi Verschelde
6569635ec0
Merge pull request #53757 from groud/fix_undo
2021-10-13 12:42:07 +02:00
Gilles Roudière
cf7242dd8e
Fix undo in inspector not working
2021-10-13 10:45:21 +02:00
Rémi Verschelde
6f1d2133bb
Merge pull request #52495 from kdiduk/issue-52491-fix-value-conversion-in-hashfuncs-header
...
#52491 Cosmetic: fix type cast so that it matches return value type
2021-10-12 22:38:39 +02:00
Rémi Verschelde
b48c6418fe
Merge pull request #52293 from neikeq/class-db-api-type-bug
...
Fix ClassDB API type mismatch bug between --editor and player
2021-10-12 22:34:21 +02:00
Дмитрий Сальников
9b38e04fff
Exposed setters for sensor values in Input class
2021-10-12 23:26:03 +03:00
CaptainProton42
a9aba86943
Fetch extension class props from ClassDB
...
Extension class properties that have been registered with
ClassDB(`GDNativeInterface::classdb_register_extension_class_property`)
were not fetched previously. (Only directly providing a property
list using `GDNativeExtensionClassCreationInfo::get_property_list_func`
would work.) This especially caused problems with the C++
bindings since they exclusively rely on ClassDB to register properties.
2021-10-12 18:25:55 +02:00
Gilles Roudière
5504e11fb7
Fix useless debug print
2021-10-12 17:03:39 +02:00
Rémi Verschelde
480fc31450
Merge pull request #53713 from groud/add_force_keep_on_undo_redo_merge_ends
2021-10-12 15:33:20 +02:00
Fabio Alessandrelli
74b46bb220
[Net] Fix spawn/despawn custom callable argument.
...
Was always reporting it to be a spawn, even for despawns.
2021-10-12 14:18:16 +02:00
Gilles Roudière
1be00864b7
Add a way to force undo/redo operations to be kept in MERGE_ENDS mode
2021-10-12 14:03:05 +02:00
Rémi Verschelde
0fd50ff217
Merge pull request #52736 from aaronfranke/lgtm-mult
...
Fix some LGTM errors of "Multiplication result converted to larger type"
2021-10-12 08:38:46 +02:00
Rémi Verschelde
1bd6a2f020
Merge pull request #52548 from m4gr3d/customize_metadata_dir_master
...
Make the project data directory customizable
2021-10-12 08:26:47 +02:00
Aaron Franke
7e51e4cb84
Fix some LGTM errors of "Multiplication result converted to larger type"
2021-10-12 00:17:27 -05:00
Juan Linietsky
610de0974d
Revert "Implement reverse playback and ping-pong loop in AnimationPlayer and NodeAnimation"
2021-10-11 19:27:50 -03:00
ne0fhyk
3e44a6375e
Make the project data directory customizable.
2021-10-11 14:40:14 -07:00
Rémi Verschelde
9ed4f8367b
Merge pull request #48332 from TokageItLab/implement-ping-pong
2021-10-11 22:55:01 +02:00
Yuri Roubinsky
e270d1cce3
Fix autocompletion of built-in functions in GDScript
2021-10-11 19:06:17 +03:00
Tokage
372ba76663
implement ping-pong loop in animation
...
Co-authored-by: Chaosus <chaosus89@gmail.com>
2021-10-09 18:08:43 +09:00
mashumafi
575d4e00b6
Enhance and cleanup stringify for Vector
2021-10-09 06:19:25 +00:00
Pedro J. Estébanez
73697d4de6
Avoid the need for copy assignment in HashMap key/data types
2021-10-08 20:06:07 +02:00
Rémi Verschelde
26b3aff01d
Merge pull request #53517 from ColinKinloch/native_callback_typedef
2021-10-08 14:28:36 +02:00
Rémi Verschelde
cdaa52a820
Merge pull request #53555 from Pineapple/faster-int-string-dictionary
2021-10-08 14:26:48 +02:00
Fabio Alessandrelli
54ec66a700
[Net] Rename RPCConfig.sync to call_local.
...
For consistency with the other user facing changes.
2021-10-08 12:39:09 +02:00
Bartłomiej T. Listwon
4a723842b6
Faster hash_compare for integer and string keys in dictionaries
2021-10-08 10:09:13 +02:00
Rémi Verschelde
49e7e049ab
Merge pull request #53422 from KoBeWi/add_LUA_to_Godot
2021-10-07 23:37:37 +02:00
Rémi Verschelde
6090f90743
Merge pull request #53545 from vnen/gdscript-release
2021-10-07 23:28:34 +02:00
Rémi Verschelde
5abc966be4
Merge pull request #53500 from vnen/variant-in-string-name
2021-10-07 22:51:00 +02:00
George Marques
fafa8c7f6e
Enable method type information on release builds
...
This is needed to ensure GDScript compilation works properly on release
builds and make use of optimized typed instructions.
2021-10-07 16:13:44 -03:00
kobewi
31012fd060
Change print_line() to use any number of Variants
2021-10-07 16:28:22 +02:00
Hugo Locurcio
bcf4a56c74
Replace references to VisualServer in code comments with RenderingServer
...
VisualServer no longer exists in the `master` branch.
2021-10-07 15:49:41 +02:00
Colin Kinloch
a66e59be84
Add typedef to GDNativeInstanceBindingCallbacks
2021-10-07 11:59:18 +01:00
George Marques
13a2d03dde
Add Variant `in` operator for any String/StringName operands
...
Allow using String or StringName types as operand in any position of the
`in` operator, which is more convenient in scripting when interacting
with data in the engine (such as a Node name).
2021-10-06 22:07:32 -03:00
Brian Semrau
f28c677f3d
[core_bind] Add `is_alive` to Thread. Replace `is_active` with `is_started`.
...
Replacing `is_active` resolves an API discrepancy between core_bind Thread and core/os Thread.
2021-10-06 12:47:58 -04:00
Kirill Diduk
1f38b00242
#52491 Cosmetic: fix type cast and add comment with the algorithm source
2021-10-05 21:40:33 +02:00
Rémi Verschelde
a7ba227631
Merge pull request #52711 from m4gr3d/provide_getter_for_project_data_dir_master
2021-10-05 21:02:27 +02:00
Rémi Verschelde
a603b2d7c7
Merge pull request #47497 from briansemrau/nan-inf-tscn-parsing-bug
2021-10-05 19:57:33 +02:00
Thakee Nathees
3f3ed5d34c
NaN, INF read/write bug fixed
...
Fix : #40589
2021-10-05 09:25:49 -04:00
Fabio Alessandrelli
e8f7b79bb0
[File] Fix FileAccessCompressed::get_buffer return value.
...
It used to return the write index instead of the written bytes (i.e.
index + 1) when reading until last block.
2021-10-05 15:12:51 +02:00
Maxime Lapointe
29dc8de88b
Improve error message when instantiating virtual class
2021-10-05 08:09:35 -04:00
kobewi
9e5fdbc79d
Fix LUA-style assignment in Dictionary
2021-10-05 12:17:13 +02:00
Rémi Verschelde
2ac320681a
Merge pull request #53225 from aaronfranke/c-locale
2021-10-05 11:20:08 +02:00
Rémi Verschelde
3479aaa369
Merge pull request #53405 from winterpixelgames/PR-more-error-logging-release
2021-10-05 08:43:07 +02:00
Jordan Schidlowsky
b78d399f91
revert 0d7409a
so additional error information prints in release builds
2021-10-04 16:55:01 -06:00
kobewi
cdac60759e
Add support for unbinding in connection dialog
2021-10-04 21:41:21 +02:00
Rémi Verschelde
b85dfd990e
GDScript completion: Handle quote style ad-hoc to remove editor dependency
...
`core` and `scene` shouldn't depend on `editor`, so they can't query this style
setting in `get_argument_options`. But we can handle it after the fact in
GDScript's completion code.
Also cleans up a couple extra unused invalid includes in `core`.
2021-10-04 16:16:05 +02:00
Rémi Verschelde
463dbe5210
Merge pull request #53270 from akien-mga/charproxy-add-copy-constructor
2021-10-04 10:39:37 +02:00
Rémi Verschelde
90f8eb7aa0
Merge pull request #53059 from timothyqiu/thread-obj
...
Fix crash when creating thread
2021-10-02 02:15:43 +02:00
Rémi Verschelde
01cb4d92f3
Merge pull request #47442 from Shatur/fix-connect-reference-counted
2021-10-01 22:41:11 +02:00
Fabio Alessandrelli
366e374f76
Merge pull request #53290 from Faless/mp/4.x_opts_names
...
[Net] Rename RPC constants and annotation arguments.
2021-10-01 21:35:08 +02:00
Fabio Alessandrelli
24a949ea11
[Net] Rename RPC constants and annotation arguments.
...
any -> any_peer
sync -> call_local
ordered -> unreliable_ordered
Multiplayer.RPC_MODE_ANY -> RPC_MODE_ANY_PEER
Multiplayer.TRANSFER_MODE_ORDERED -> TRANSFER_MODE_UNRELIABLE_ORDERED
2021-10-01 18:14:38 +02:00
bruvzg
0c0b5c84b0
Implement TextServer GDExtension interface, remove TextServer GDNative interface.
2021-10-01 15:13:29 +03:00
Eric M
ad30b0a8dd
Allow shortcuts to have any number of bindings. Updated UI as required.
2021-10-01 18:04:28 +10:00
Rémi Verschelde
b32f84d473
Merge pull request #52850 from mashumafi/vector-bsearch
2021-10-01 07:52:51 +02:00
mashumafi
214bbfbefe
Implement bsearch for Vector and Packed*Array
2021-09-30 23:57:26 +00:00
Lightning_A
c63b18507d
Use range iterators for `Map`
2021-09-30 15:09:12 -06:00
Rémi Verschelde
cc57cbb73a
CharProxy: Add copy constructor
...
Adding the copy constructor is needed to solve a `-Wdeprecated-copy` warning
from GCC and Clang, which is raised when upgrading doctest from 2.4.4 to 2.4.6.
2021-09-30 23:06:40 +02:00
Juan Linietsky
c370b4c4d0
Merge pull request #52544 from JFonS/lod_fixes
...
Auto LOD fixes and improvements
2021-09-30 14:49:11 -03:00
Rémi Verschelde
3a19400889
Merge pull request #48685 from bruvzg/bundle_icon_4
2021-09-30 14:55:04 +02:00
Rémi Verschelde
bc0f5d3dde
Merge pull request #53251 from LATRio/53224
2021-09-30 13:42:45 +02:00
Max Hilbrunner
ac7505e277
Merge pull request #53227 from Calinou/rename-getornull
...
Rename RID's `getornull()` to `get_or_null()`
2021-09-30 12:56:01 +02:00
LATRio
41c1cfe28e
InputEventJoypadMotion::set_axis - reject invalid axis
2021-09-30 19:32:21 +09:00
Rémi Verschelde
4a9a231566
Merge pull request #53230 from nekomatata/fix-2d-bvh-overflow
2021-09-30 10:24:18 +02:00
Hugo Locurcio
ba65730cbf
Rename RID's `getornull()` to `get_or_null()`
2021-09-29 23:58:02 +02:00
Rémi Verschelde
4028583e81
Merge pull request #53044 from lucypero/thread_override
2021-09-29 22:43:06 +02:00
PouleyKetchoupp
d3c6395dcd
Fix buffer overflow in 2D BVH
...
Some areas of code were missed and assumed Vector3.
2021-09-29 12:10:23 -07:00
Lucy
5fe1857496
Fix Platform Thread Override
2021-09-29 15:38:04 -03:00
Aaron Franke
1cbec15084
Add locale rename for the "C" locale
2021-09-29 11:57:53 -05:00
Rémi Verschelde
2fc31fdfca
Merge pull request #53217 from Faless/ext/fix_pointer_info
2021-09-29 17:41:58 +02:00
Haoyu Qiu
40e188f687
Fix crash when creating thread
2021-09-29 22:08:12 +08:00
Fabio Alessandrelli
0276c2e74a
Fix const pointers types in docs and extension API.
...
The GDVIRTUAL_NATIVE_PTR did not declare the correct GDNativeConstPtr
template, resulting in "void*" being used as it's type info in both the
documentation and the extension API dump.
2021-09-29 16:04:20 +02:00
O01eg
9302b6547a
Implement override of get_message and get_plural_message
2021-09-29 14:19:14 +03:00
Anilforextra
fc9767abb1
Use functions defined in the their classes.
2021-09-29 09:36:34 +05:45
Fabio Alessandrelli
d18cbdf5e4
Merge pull request #52481 from Faless/net/4.x_native_peers
...
[Net] Extension system for network peers, webrtc.
2021-09-28 12:57:45 +02:00
fabriceci
e4cfcfc424
Replace auto completion shortcut for mac
2021-09-28 11:25:11 +02:00
Rémi Verschelde
ed5267f69f
Merge pull request #53053 from LATRio/callable_in_thread_start
2021-09-28 11:10:09 +02:00
Hennadii Chernyshchyk
dbb37e586b
Fix inversed check inside register_singleton
2021-09-28 00:17:31 +03:00
jfons
9e1810695c
Auto LOD fixes and improvements
...
* Fixed LODs for shadow meshes.
* Added a merging step before simplification. This helps with tesselated
meshes that were previously left untouched. The angle difference at
wich edges ar considered "hard" can be tweaked as an import setting.
* LODs will now start with the highest decimation possible and keep
doubling (approximately) the number of triangles from there. This
makes sure that very low triangle counts are included when possible.
* Given more weight to normal preservation.
* Modified MeshOptimizer to report distance-based error instead of
including attributes in the reported metrics.
* Added attribute transference between the original mesh and the
various LODs. Right now only normals are taken into account,
but it could be expanded to other attributes in the future.
2021-09-27 17:04:56 +02:00
Haoyu Qiu
b024d16bc1
Parse UTF-8 when getting path from resource UID
2021-09-27 19:10:32 +08:00
Rémi Verschelde
79e33f8b71
Merge pull request #53058 from LATRio/52191
...
check if 'shortcut' in InputEventShortcut is valid
2021-09-26 08:38:12 +02:00
LATRio
eae7f1c1ae
validate 'shortcut' in InputEventShortcut
2021-09-26 11:06:16 +09:00
Rémi Verschelde
c7f67daccd
Merge pull request #52855 from Calinou/engine-editor-hint-getter-only
2021-09-25 22:09:51 +02:00
LATRio
97c68514c4
Use Callable in Thread::start
2021-09-25 22:07:13 +09:00
Rémi Verschelde
0abe464162
Merge pull request #52849 from KoBeWi/know_no_binds
2021-09-25 00:10:56 +02:00
John Wigg
ccf05aeb9a
Fix Face3::get_random_point_inside()
...
Use correct overload of Math::random(from, to) to return floating point values within the correct range.
2021-09-24 21:41:17 +02:00
Fabio Alessandrelli
25226329be
[Net] MultiplayerPeer cleanup, defaults.
2021-09-24 18:40:39 +02:00
Fabio Alessandrelli
7c81ce43ec
[Net] Bind Multiplayer to GDExtension.
2021-09-24 18:40:39 +02:00
Fabio Alessandrelli
5f61b2c797
[Net] StreamPeer GDExtension.
2021-09-24 18:40:39 +02:00
Fabio Alessandrelli
b9e6cc8f4f
[Net] Enable PacketPeer native extensions.
2021-09-24 18:40:39 +02:00
kobewi
7bf5fc709e
Remove binds from Signal.connect
2021-09-24 17:07:33 +02:00
Rémi Verschelde
32ab77ef8f
Merge pull request #52430 from AnilBK/vector2-replacements
2021-09-24 13:04:42 +02:00
Hugo Locurcio
6def32d643
Replace `#pragma once` by traditional include guards for consistency
...
`#pragma once` was used in a few files, yet we settled on using
traditional include guards instead.
The PooledList template comment was also moved to allow editors
such as Visual Studio Code to display the comment when hovering
PooledList.
`app.h` was renamed to `app_uwp.h` to be less generic for the
include guard.
2021-09-24 02:33:15 +02:00
Anilforextra
cc51b045da
Construct values only when necessary.
2021-09-23 22:26:07 +05:45
Fabio Alessandrelli
f9ce9a8e10
[ClassDB] Unify construct/extension retrieval.
2021-09-22 18:33:29 +02:00
Fabio Alessandrelli
f724bd1880
[Core] Add ClassDB functions to retrieve/construct extensions.
...
Calling the constructor alone is not enough if the class to be
instantiated is not a base class.
This commit adds two functions, one for retrieving the the extension
class reference, the other to construct an instance using the
constructor and the extension class reference.
2021-09-22 17:46:08 +02:00
Rémi Verschelde
ba57252bd8
Merge pull request #52878 from AnilBK/add-get-center
2021-09-21 21:30:30 +02:00
Anilforextra
90908cd67d
Add Get Center Method for Rect2/Rect2i and AABB.
2021-09-21 21:14:17 +05:45
Rémi Verschelde
61ce8b206e
Merge pull request #52877 from Calinou/add-print-verbose
...
Add `print_verbose()` built-in function to print in verbose mode only
2021-09-21 17:00:58 +02:00
Hugo Locurcio
650b1db4b8
Add `print_verbose()` built-in function to print in verbose mode only
...
This can be used as a shorthand for:
if OS.is_stdout_verbose():
print("...")
Unlike `print_debug()`, this works in release builds too and can
be toggled off in debug builds.
2021-09-21 15:59:49 +02:00
Eric M
28b7c1be80
Improve implementation of builtin action overrides
2021-09-21 22:25:31 +10:00
Hugo Locurcio
2560070c0a
Remove `Engine.editor_hint` in favor of `Engine.is_editor_hint()`
...
The `Engine.set_editor_hint()` setter method is no longer exposed
to scripting, which makes the property effectively read-only from
an user perspective.
2021-09-20 14:24:39 +02:00
Rémi Verschelde
0068247ab6
Merge pull request #52513 from Ev1lbl0w/fix_path_double_slash
...
Fix path with multiple slashes not being corrected on templates
2021-09-20 13:00:29 +02:00
Rémi Verschelde
89417ba75b
Merge pull request #52398 from deakcor/dev-transform
2021-09-20 08:46:51 +02:00
Vincent D
aa82cb6f35
Expose get_skew for transform2d and add new constructor
...
Expose set_scale and set_skew for transform2d
Replacing float by real_t
Adding const parameters
Updated transform2d doc
2021-09-19 17:10:05 +02:00
George Marques
262d9397fb
Allow indexing of String values in scripting languages
2021-09-17 16:24:56 -03:00
Rémi Verschelde
220b69ab56
Merge pull request #52450 from aaronfranke/they-came-from-scale
...
Replace Vector3.to_diagonal_matrix with Basis.from_scale
2021-09-17 19:38:36 +02:00
George Marques
455e142d37
Allow comparing equality between builtin types and null
2021-09-17 12:33:52 -03:00
Aaron Franke
bf0213470c
Replace Vector3.to_diagonal_matrix with Basis.from_scale
2021-09-17 10:30:30 -05:00
Rémi Verschelde
191c34eb0d
Merge pull request #52734 from lucypero/thread_override_master
2021-09-16 21:45:04 +02:00
Lucy
e9723efd34
Allow for platform Thread implementation override
2021-09-16 11:23:29 -03:00
Rémi Verschelde
104a6191fd
Merge pull request #52739 from BastiaanOlij/gdextension_array_index
2021-09-16 15:15:02 +02:00
Rémi Verschelde
46e37545b8
Merge pull request #52740 from akien-mga/os-get_locale-language
...
Implement `OS::get_locale_language()` helper method
2021-09-16 14:23:06 +02:00
Bastiaan Olij
25d0e4bb5b
Add GD extensions operator functions for arrays
2021-09-16 22:00:51 +10:00
Rémi Verschelde
ca5c28fed4
Merge pull request #52358 from kleonc/astar_error_messages
...
`AStar` Add error messages
2021-09-16 13:36:13 +02:00
Rémi Verschelde
910c7dbdb7
Merge pull request #52735 from BastiaanOlij/gdextension_property_group
...
Add property group and subgroup registration to extensions
2021-09-16 11:02:59 +02:00
Rémi Verschelde
def99c7baf
Implement `OS::get_locale_language()` helper method
...
This method extracts the 2 or 3-letter language code from `OS::get_locale()`,
making it easier for users to identify the "main" language code for users
that might have different OS locales due to different OS or region, but
should be matched to the same translation (e.g. "generic" Spanish).
Fixes #40703 .
2021-09-16 09:34:58 +02:00
Juan Linietsky
e2bd0a0a73
Merge pull request #52571 from timothyqiu/expose-enum
...
Expose enum related methods in ClassDB
2021-09-15 23:43:35 -03:00
Bastiaan Olij
12868791f2
Add property group and subgroup registration to extensions
2021-09-16 12:37:43 +10:00
ne0fhyk
69f890ff11
Provide a getter for the project data directory.
2021-09-15 12:52:03 -07:00
Aaron Franke
5d03c0e0b6
Fix String::num_real and String test cases when compiling with doubles
2021-09-15 13:41:12 -05:00
Rémi Verschelde
fbef32ab46
Merge pull request #52693 from akien-mga/fixup-inputmap-macos-override
...
InputMap: Fixup `macos` feature tag overrides after #52291
2021-09-15 13:20:40 +02:00
Rémi Verschelde
07a58230ea
InputMap: Fixup `macos` feature tag overrides after #52291
...
Fixes #52691 .
2021-09-15 11:48:54 +02:00
Jacob Edie
2b292a1a2a
--single-window is passed through project manager.
...
This means you can start godot with --single-window
2021-09-15 10:20:50 +02:00
Rémi Verschelde
3705ad7d8f
Merge pull request #52123 from lightspot21/fix-placement-new-warning
...
Silence false-positive warning for malformed placement new on GCC 11.1
2021-09-15 09:31:42 +02:00
Rémi Verschelde
0e7beb183a
Merge pull request #52562 from BastiaanOlij/gd_extensions_register_drivers
...
Add driver types to GD extension initialisation levels
2021-09-15 08:46:43 +02:00
Rémi Verschelde
1201ba6649
Merge pull request #52291 from Calinou/inputmap-rename-osx-macos
...
Rename `osx` to `macos` in input map feature tag handling
2021-09-15 08:45:46 +02:00
Hugo Locurcio
9b1986fb9c
Rename `osx` to `macos` in input map feature tag handling
...
This follows the general feature tag rename for 4.0.
2021-09-15 03:12:18 +02:00
PouleyKetchoupp
2ca94e51e4
Clean convex hull decomposition code
...
Remove unnecessary conversion between triangle data and vertex data
whenever possible.
2021-09-14 17:14:06 -07:00
Grigoris Pavlakis
abef2b7194
Fix placement new on zero-sized region warning on GCC 11.1
...
On latest (11.1 as of this commit) GCC, the following warning is
continuously issued during build:
warning: placement new constructing an object of type
'SafeNumeric<unsigned int>' and size '4' in a region of type
'uint32_t*' {aka 'unsigned int*'} and size '0' [-Wplacement-new=]
This happens because on 98ceb60eb4
the new operator override used
was dropped and replaced with standard placement new. GCC sees the
subtraction from the pointer and complains as it thinks that the
SafeNumeric is placed outside an allocation, not knowing that the
address requested is already inside one.
After suggestions, the false positive is silenced, with no other
changes.
2021-09-15 00:07:21 +03:00
Fabio Alessandrelli
c5a979eba5
Merge pull request #52613 from V-Sekai/fix_custom_sync_commands
...
Fix custom multiplayer sync commands
2021-09-14 21:27:12 +02:00
Rémi Verschelde
1cec7057bf
Merge pull request #52535 from e8newallm/52490-type_conversion
...
Added explicit type conversion to uint32_t
2021-09-14 15:36:52 +02:00
Aaron Franke
3a902c66c4
Revert some URLs from the "Replace HTTP URLs with HTTPS" PR
2021-09-13 15:18:35 -05:00
Rémi Verschelde
70ba366743
Merge pull request #50375 from Paulb23/code_edit_unit_tests
2021-09-13 21:51:20 +02:00
Rémi Verschelde
41562b9198
Merge pull request #52049 from theraot/master
2021-09-13 16:49:24 +02:00
Matthew Newall
f048a9ad4e
Added explicit type conversions
2021-09-13 14:26:47 +00:00
Bastiaan Olij
f9849a2717
Add driver types to GD extension initialisation levels
2021-09-13 18:50:00 +10:00
SaracenOne
dace12082b
Fix custom multiplayer sync commands
2021-09-12 21:20:10 +01:00
Haoyu Qiu
d2aef4c439
Expose enum related methods in ClassDB
2021-09-11 20:33:05 +08:00
Juan Linietsky
6679790fac
Merge pull request #52406 from ellenhp/libvorbis
...
Replace stb_vorbis with libvorbis
2021-09-10 16:24:59 -03:00
Max Hilbrunner
744d5829b7
Merge pull request #52229 from lawnjelly/basis_quat_warning
...
Improve Basis::get_quaternion error message
2021-09-10 13:21:00 +02:00
Ricardo Subtil
eef0327d1e
Fix path with multiple slashes not being corrected on templates
2021-09-10 11:14:40 +01:00
Ellen Poe
f5d9c7b487
Replace stb_vorbis with libogg+libvorbis
2021-09-09 19:39:04 -07:00
Fabio Alessandrelli
e6106edd16
Merge pull request #52408 from GiantBlargg/fix-string-cast
...
Fix invalid string cast
2021-09-08 15:31:25 +02:00
Max Hilbrunner
5b25457794
Multiplayer networking renames/simplification
...
Removes _networking_ prefix from some methods and members, now that multiplayer has been largely moved out of Node and SceneTree and is seperated into its own set of classes.
2021-09-08 12:05:54 +02:00
Max Hilbrunner
f8fb2bc0b4
Merge pull request #52097 from mortarroad/master-fix-convex-hull-double-edges
...
Fix emitting duplicate edges for convex hulls
2021-09-07 21:50:16 +02:00
Juan Linietsky
58388f8cec
Merge pull request #47391 from Calinou/platform-feature-tags-lowercase
...
Make platform feature tag names lowercase
2021-09-07 16:30:50 -03:00
Max Hilbrunner
9ada29e918
Merge pull request #52289 from Calinou/remove-old-msvc-support-ifdef
...
Remove `#ifdefs` for handling compilation with Visual Studio < 2015
2021-09-07 21:01:44 +02:00
Max Hilbrunner
acc776f7b6
Merge pull request #52442 from Faless/mp/4.x_rpc_manager
...
[Net] Move multiplayer classes to own subfolder. Split RPC from MultiplayerAPI.
2021-09-07 18:44:39 +02:00
Fabio Alessandrelli
bf9aae09ba
[Net] Move multiplayer to core subdir, split RPCManager.
...
Move multiplayer classes to "core/multiplayer" subdir.
Move the RPCConfig and enums (TransferMode, RPCMode) to a separate
file (multiplayer.h), and bind them to the global namespace.
Move the RPC handling code to its own class (RPCManager).
Renames "get_rpc_sender_id" to "get_remote_sender_id".
2021-09-07 11:14:30 +02:00
Gilles Roudière
4bd7700e89
Implement properties arrays in the Inspector.
2021-09-07 09:51:28 +02:00
Anilforextra
a1f616dcfc
Use builtin Vector2 functions for calculation of angles.
...
.
2021-09-07 08:30:26 +05:45
Gilles Roudière
c6f6c05a52
Merge pull request #51722 from TokageItLab/implement-set-read-only-in-extended-class
...
Apply `set_read_only()` to child classes of `EditorProperty` elements
2021-09-05 18:58:02 +02:00
Silc 'Tokage' Renew
facf8f1883
Apply set_read_only() to child classes of EditorProperty elements
2021-09-05 18:22:17 +09:00
Daniel Doran
3264ba296e
fix invalid string cast
2021-09-04 21:38:07 -06:00
Bastiaan Olij
f3ab094133
Merge pull request #52309 from BastiaanOlij/add_extension_index_functions
...
Add functions for access members by index on packed array objects
2021-09-05 11:52:43 +10:00
kleonc
71255bc2a9
AStar Add error messages
2021-09-03 00:06:23 +02:00
SaracenOne
f09f12ce55
Fix _send_default_spawn_default function sending zero length
...
PackedByteArray when deriving from a single PackedByteArray
state variant.
2021-09-02 21:36:54 +01:00
Bastiaan Olij
23f27fbffc
Add functions for access members by index on packed array objects
2021-09-02 09:41:35 +10:00
Paulb23
d186862338
Fix InputMap and display server not nulling singleton on free
2021-09-01 16:46:04 +01:00
George Marques
25ae279317
Merge pull request #52270 from KoBeWi/goodbye_polar
...
Remove cartesian2polar and polar2cartesian
2021-09-01 09:33:13 -03:00
George Marques
cf59028972
Merge pull request #48237 from KoBeWi/they_came_from_angle
...
Add Vector2.from_angle() method
2021-09-01 09:32:42 -03:00
Hugo Locurcio
ac7541c1b1
Merge pull request #52026 from Calinou/constiterator-fix-const
...
Fix ConstIterator to allow `for` range loops on Packed*Array
2021-09-01 14:25:01 +02:00
Ignacio Roldán Etcheverry
cca26cc83f
Fix ClassDB API type mismatch bug between --editor and player
...
There are two ways a class can be added to ClassDB:
- `A`: When an instance of the class is created for the first time. When
this happends the class is not registered/exposed to scripts.
- `B`: When calling `GDREGISTER_CLASS(ClassName)` or similar. When this
happens the class is registered/exposed to scripts.
ClassDB has an API type property to differentiate between the core
and editor APIs. Up until now the API type was determined whenever
the class is added to ClassDB (either `A` or `B`).
The problem comes when a class is instantiated (`A`) before
being registered (`B`).
If at this point the current defined API is not the same as when the
class is later registered, this will result in a mismatch between
`--editor` and non-editor apps.
This is specially bad for C# as it makes the editor player abort.
This was happening with `EditorPaths` which, while being registered
during the editor API classes registrations, it was also being
instantiated earlier when running the editor or the project manager,
via a call to `EditorPaths::create()`. This regression was introduced
in 1074017f04
.
This commit fixes this simply by re-assigning the class API type when
the class is registered (`B`).
This is correct because API type describes registered/exposed classes.
It shouldn't cause any regressions as the API type should not be
accessed of classes that are not (or not yet) registered/exposed.
Code locations for reference:
- Method to add a class to ClassDB: `ClassDB::_add_class2`
- Code that adds classes to ClassDB post first initialization (`A`):
`memnew` macros -> `Object::_postinitialize` ->
`Object::initialize_class` -> `ClassDB::_add_class2`.
- Code adds class to ClassDB and registers/exposes it to scripts:
`GDREGISTER_CLASS` macros -> `ClassDB::register_class<T>` ->
`Object::initialize_class` -> `ClassDB::_add_class2`.
2021-08-31 22:35:32 +02:00
Hugo Locurcio
2daaf0fdc3
Make platform feature tag names lowercase
...
Feature tag names are still case-sensitive, but this makes built-in
feature tags more consistent.
- `Windows` -> `windows`
- `OSX` -> `osx`
- `LinuxBSD` -> `linuxbsd`
- `Android` -> `android`
- `iOS` -> `ios`
- `HTML5` -> `html5`
- `JavaScript` -> `javascript`
- `UWP` -> `uwp`
2021-08-31 20:34:44 +02:00
Hugo Locurcio
fc0bfbb33b
Remove `#ifdefs` for handling compilation with Visual Studio < 2015
...
Godot 3.3 and later require Visual Studio 2017 to be compiled.
2021-08-31 20:04:17 +02:00
kobewi
3f3739ccb5
Add Vector2.from_angle() method
2021-08-31 01:53:58 +02:00
Juan Linietsky
bcd73fc00a
Merge pull request #52240 from Rubonnek/rename-rel-path
...
Rename `String::is_rel_path` to `String::is_relative_path`
2021-08-30 20:45:45 -03:00
kobewi
017c94222e
Remove cartesian2polar and polar2cartesian
2021-08-31 01:41:41 +02:00
Juan Linietsky
6dab6e4136
Revert " Improve collision generation usability in the new 3D scene import workflow."
2021-08-30 11:30:36 -03:00
Camille Mohr-Daurat
b60a51f023
Merge pull request #51985 from AndreaCatania/coll
...
Improve collision generation usability in the new 3D scene import workflow.
2021-08-30 07:25:51 -07:00
lawnjelly
d3a3b3aff3
Improve Basis::get_quaternion error message
...
The previous error message incorrectly suggested that any Basis could be fixed by calling get_rotation_quation() or orthonormalize(). This PR points out that only a valid rotation Basis can be fixed in this way.
2021-08-30 07:26:25 +01:00
Haoyu Qiu
fd52e18d19
Try other resolved IPs if one fails to connect
2021-08-30 13:00:48 +08:00
Wilson E. Alvarez
d11c1afc04
Rename String::is_rel_path to String::is_relative_path
2021-08-29 20:41:29 -04:00
Fabio Alessandrelli
64b9f30b92
[Net] Rename RPC "puppet" to "auth" (authority). Drop "master".
...
This commit completely removes the RPC_MODE_MASTER ("master" keyword),
and renames the RPC_MODE_PUPPET to RPC_MODE_AUTHORITY ("auth" keyword).
This commit also renames the "Node.[get|set]_network_master" methods to
"Node.[get|set]_network_authority".
This commit also renames the RPC_MODE_REMOTE constant to RPC_MODE_ANY.
RPC_MODE_MASTER in Godot 3.x meant that a given RPC would be callable by
any puppet peer on the master, while RPC_MODE_PUPPET meant that it would
be callable by the master on any puppet.
Beside proving to be very confusing to the user (referring to where it
could be called instead of who can call it) the RPC_MODE_MASTER is quite
useless. It is almost the same as RPC_MODE_REMOTE (anyone can call) with
the exception that the network master cannot. While this could be useful
to check in some case, in such a function you would anyway need to check
in code who is the caller via get_rpc_sender_id(), so adding the check
there for those rare cases does not warrants a dedicated mode.
2021-08-30 00:54:38 +02:00
Fabio Alessandrelli
838a449d64
Merge pull request #51788 from Faless/mp/4.x_replicator_sync
...
[Net] MultiplayerReplicator state sync.
2021-08-30 00:48:10 +02:00
Hugo Locurcio
4d08a737fb
Merge pull request #52180 from timothyqiu/config-file-prop
...
Quote and escape ConfigFile keys when necessary
2021-08-28 23:49:00 +02:00
Max Hilbrunner
04c64b59a1
Merge pull request #47406 from mashumafi/master-Array-insert-rc
...
Array::insert consistent with Pool*Array::insert
2021-08-28 21:18:39 +02:00
Max Hilbrunner
99c2329b73
Merge pull request #43522 from qarmin/divide_by_zero_in_vectori
...
Fix crash when dividing by 0 in Vector2/3i
2021-08-28 19:53:28 +02:00
Haoyu Qiu
597d489a20
Quote and escape ConfigFile keys when necessary
2021-08-28 18:48:45 +08:00
K. S. Ernest (iFire) Lee
d04aa9a114
Merge pull request #52122 from V-Sekai/autoload_list
...
Use sorted map for autoloads in ProjectSettings to preserve order.
2021-08-27 14:41:40 -07:00
Max Hilbrunner
4e67e9bca6
Merge pull request #52090 from balloonpopper/bug52060
...
Correct null and boolean values being capitalised by the str command
2021-08-27 21:05:47 +02:00
Ellen Poe
460e0ce314
Add a SafeList data structure for future audio server usage.
2021-08-27 10:26:18 -07:00
Camille Mohr-Daurat
9206f561f5
Merge pull request #52110 from nekomatata/fix-segment-intersection
...
Fix segment intersection consistency in Geometry2D
2021-08-27 08:48:29 -07:00
Lyuma
31f790299c
Use OrderedHashMap for autoloads to preserve order
2021-08-26 21:55:26 -07:00
Hugo Locurcio
60116b17b5
Add an `Array.pop_at()` method to pop an element at an arbitrary index
...
Negative indices are supported to pop an element relative from the end.
2021-08-27 00:51:17 +02:00
Juan Linietsky
22cae39c1e
Merge pull request #52121 from groud/fix_localvector_insert
...
Fix LocalVector crash on insert.
2021-08-26 13:31:35 -03:00
Juan Linietsky
d19b12dbd2
Merge pull request #52107 from timothyqiu/overriden
...
Fix misspelled "overriden"
2021-08-26 13:07:52 -03:00
Juan Linietsky
eb940ca2a0
Merge pull request #51928 from reduz/extension-loader
...
Implement Extension Loader
2021-08-26 10:24:25 -03:00
Fabio Alessandrelli
2d2855cd53
Data structure optimizations as per review.
2021-08-26 13:35:33 +01:00
Juan Linietsky
34e286d6a3
Merge pull request #52077 from reduz/error-ret-doc
...
Implement error return documentation
2021-08-26 08:42:06 -03:00
Gilles Roudière
de0765b94a
Fix LocalVector crash on insert.
2021-08-26 11:54:56 +02:00
Balloonpopper
4fae7ae9dc
Correct null and boolean values being capitalised by the str command
2021-08-26 17:11:34 +10:00
PouleyKetchoupp
511c80b2ec
Fix segment intersection consistency in Geometry2D
...
Segment collision results could be different depending on the direction
when they exactly touch (order of the points in segments). This was due
to the way parallelism was checked, using different logic based on
positive or negative sign of cross products.
Now the results are the same whatever the direction, without changing
the current design, which is that parallel or colinear segments are
not considered colinear.
Fixes inconsistencies with raycasts exactly on edges of convex shapes
depending on the direction.
2021-08-25 18:17:52 -07:00
Haoyu Qiu
eba7265a1c
Fix misspelled "overriden"
...
In recent GDVIRTUAL PR and SkeletonModification3DJiggle doc.
2021-08-26 01:44:01 +08:00
Morris Tabor
75dd294732
Fix emitting duplicate edges for convex hulls
...
Identical to https://github.com/godotengine/godot/pull/52059
2021-08-25 14:18:45 +02:00
reduz
e2f8df8c5b
Add ability to register singletons from engine API
...
* Exposed functions in Engine to register and unregister singletons.
* Added the concept of user singletons, which can be removed (the system ones can't).
2021-08-25 08:32:25 -03:00
reduz
96f8254b24
Implement error return documetation
...
Adds ability to add error return documetation to the binder and class reference.
Usage example:
```C++
void MyClass::_bind_method() {
[..]
BIND_METHOD_ERR_RETURN_DOC("load", ERR_FILE_CANT_OPEN, ERR_FILE_UNRECOGNIZED);
}
```
One function of ConfigFile was changed as example.
2021-08-24 15:28:29 -03:00
Max Hilbrunner
7e0f1fa2ec
Merge pull request #52041 from Rubonnek/expose-simplify-path
...
Expose `String.simplify_path`
2021-08-24 17:06:16 +02:00
Theraot
ef54d35395
Fix get_base_dir windows top level directory logic
...
This is a fix for https://github.com/godotengine/godot/issues/52048
2021-08-24 04:16:59 -05:00
Wilson E. Alvarez
17821603b4
Expose String.simplify_path
2021-08-24 00:48:45 -04:00
reduz
65ca132a80
Expose RID creation utilities.
...
* Exposed as utility functions.
* Not very useful for script, but vital for creating servers using native extensions.
2021-08-23 21:55:45 -03:00
Juan Linietsky
aa3c3a9ebb
Merge pull request #52036 from reduz/native-extension-argument-pointers
...
Implement NativeExtension pointer arguments
2021-08-23 20:36:48 -03:00
reduz
44d62a9f4b
Implement NativeExtension pointer arguments
...
* Allows calling into native extensions directly with a pointer
* Makes it easier to implement some APIs more efficiently
* Appears with a "*" in the documentation for the argument.
* Implementing the pointer handling is entirely up to the implementation, although the extension API provides some hint.
* AudioStream has been implemented as an example, allowing to create NativeExtension based AudioStreams.
2021-08-23 19:58:40 -03:00
Max Hilbrunner
0df9895eb7
Merge pull request #51791 from mhilbrunner/better-error-names
...
Improve error descriptions
2021-08-23 20:13:32 +02:00
Hugo Locurcio
87b985a6aa
Fix ConstIterator to allow `for` range loops on Packed*Array
2021-08-23 19:00:33 +02:00
Max Hilbrunner
6dae9f5c36
Improve error descriptions
2021-08-23 17:58:24 +02:00
Max Hilbrunner
583b6a594a
Merge pull request #51971 from aaronfranke/https
...
Replace HTTP URLs with HTTPS for sites with HTTPS versions
2021-08-23 15:58:54 +02:00
Max Hilbrunner
ae306665d3
Merge pull request #51750 from jmb462/inputmap_action_suggestions
...
Adding InputMap action error suggestions for Input singleton (Fix #51634 )
2021-08-23 15:19:20 +02:00
reduz
5cecdfa8af
Entirely removes BIND_VMETHOD in favor of GDVIRTUAL
...
* `_gui_input`, `_input`, `_unhandled_input` and `_unhandled_key_input` are now regular C++ virutal functions.
* Everything else converted to GDVIRTUAL
* BIND_VMETHOD is gone, always use the new syntax from now on.
Creating `_gui_input` method and using the binder to register events will no longer work, simply override the virtual function now.
2021-08-23 08:10:13 -03:00
Aaron Franke
ae1702bee5
Replace HTTP links with HTTPS for sites with HTTPS versions
2021-08-22 20:13:11 -05:00