Commit Graph

29010 Commits

Author SHA1 Message Date
Rémi Verschelde 8651838268 doc: Fixup RichTextLabel bbcode_enabled note 2021-02-19 00:04:32 +01:00
Delf Neumärker fd90fc2c9b Fix handling of negative indices in SurfaceTool
(cherry picked from commit 735f75a16b)
2021-02-18 23:47:35 +01:00
Vignesh1-art 13871deb57 Fixed Invalid function bindings #46135
Fixed  GDScriptLanguageProtocol::notify_client - have 3 arguments, but only 2 are binded

(cherry picked from commit a5d931033e)
2021-02-18 23:46:54 +01:00
skyace65 72aef9d67e Add information on bb code enabled 2021-02-18 23:46:33 +01:00
Rémi Verschelde 48936dda8a
Merge pull request #38388 from mashumafi/3.2-tileset-use-path
TileSet use texture Path instead of RID to prevent name conflicts.
2021-02-18 22:36:23 +01:00
Rémi Verschelde 001aaa7131
Merge pull request #45356 from asmaloney/fix-lightmap-raycaster-compile
[3.2] Fix sign comparison error in lightmap_raycaster.cpp
2021-02-18 21:09:29 +01:00
Hein-Pieter van Braam 220f24c191
Merge pull request #45618 from RandomShaper/modernize_mt_3.2
Backport of all the multi-threading modernization (3.2)
2021-02-18 20:47:24 +01:00
Rémi Verschelde 418a08d678
Merge pull request #46175 from lawnjelly/gles_sanitizer_fixes
GLES - fix some sanitizer warnings
2021-02-18 20:36:56 +01:00
Rémi Verschelde 341c3cb04a
Merge pull request #45316 from Shatur95/detect-plugins-recursively-3.2
Detect plugins recursively (3.2)
2021-02-18 20:36:33 +01:00
Rémi Verschelde 7af8da32b1
Merge pull request #45933 from nekomatata/cylinder-support-3.2
[3.2] Cylinder support in Godot Physics 3D
2021-02-18 19:36:42 +01:00
lawnjelly e7d1735bff GLES - fix some sanitizer warnings
These are benign but worth fixing as it clears the log to find more important errors.

A common problem with the sanitizer is that enums are often used to represent bits (e.g. 1, 2, 4, 8 etc) but without specifying the enum type, the compiler is free to use unsigned or signed int. In this case it uses int, and when it performs bitwise operations on the int type, the sanitizer complains.

This is probably because a bitshift with negative signed value can give undefined behaviour - the sanitizer can't know ahead of time that you are using the enum for sensible bitflags.
2021-02-18 15:45:38 +00:00
PouleyKetchoupp c6fbd55ca9 Cylinder support in Godot Physics 3D
Backport of cylinder support from Master.
2021-02-18 08:44:23 -07:00
Rémi Verschelde 1a740e87be
SCons: Make freetype module a mandatory editor dependency
Fixes #28650.

(cherry picked from commit 6b13f33fb0)
2021-02-18 15:00:23 +01:00
Fredia Huya-Kouadio ca6e1c1c45
Override `ANDROID_NDK_ROOT` based on the project ndk version.
This helps resolve issues where the project ndk version differs from the one pointed by the `ANDROID_NDK_ROOT` environment variable (if it exists).

(cherry picked from commit edeca16fb6)
2021-02-18 14:59:10 +01:00
Rémi Verschelde 59f807fb4a
Merge pull request #46141 from hilfazer/fix_select_hidden_nodes
prevent selecting hidden editable children in spatial editor
2021-02-18 14:45:07 +01:00
Rémi Verschelde 07b66eef0b
Merge pull request #45940 from hoontee/backport-45907
[3.2] Improved Inspector Sub-Resource Editing
2021-02-18 14:21:59 +01:00
Rémi Verschelde 16b1331f80
Merge pull request #46149 from nekomatata/fix-test-body-motion-3.2
[3.2] Fix test_body_motion recovery and rest info
2021-02-18 14:16:01 +01:00
Rémi Verschelde 3c13a5bb6a
Merge pull request #46168 from m4gr3d/follow_up_splash_handling
[3.2] Follow up on bootsplash handling on Android
2021-02-18 13:37:44 +01:00
Rémi Verschelde 0176cc4fca
Merge pull request #46162 from gongpha/jr-_-avoid-get_tree-when-flying-colorpicker
[3.2] Avoid signal methods in ColorPicker to access the tree when it isn't in the tree
2021-02-18 13:15:12 +01:00
Rémi Verschelde 3374f84a2f
Merge pull request #46165 from angad-k/fix-mesh-instance-crash
add null check in MeshInstance::_mesh_changed()
2021-02-18 13:00:17 +01:00
hoontee f28c089d64 Improved Inspector Sub-Resource Editing 2021-02-18 05:43:19 -06:00
hilfazer 68438b4abc Prevent selecting hidden editable children in spatial editor 2021-02-18 12:36:52 +01:00
Pedro J. Estébanez 4485b43a57 Modernize atomics
- Based on C++11's `atomic`
- Reworked `SafeRefCount` (based on the rewrite by @hpvb)
- Replaced free atomic functions by the new `SafeNumeric<T>`
- Replaced wrong cases of `volatile` by the new `SafeFlag`
- Platform-specific implementations no longer needed

Co-authored-by: Hein-Pieter van Braam-Stewart <hp@tmm.cx>
2021-02-18 12:23:25 +01:00
Fredia Huya-Kouadio ef9d945e16 Disable engine splash logic on Android; this is now handled by the Android theme api.
In addition, add support for scaling and applying filter to the splash screen on Android.
One limitation of the api being used is that the splash screen aspect ratio is not maintained when it's scaled up.
2021-02-18 03:17:58 -08:00
Angad Kambli 013fc360d7 add null check in MeshInstance::_mesh_changed() 2021-02-18 16:36:27 +05:30
Rémi Verschelde f30d827448
Merge pull request #45951 from KoBeWi/copy_of_3.2
[3.2] Add node copy-paste
2021-02-18 12:06:17 +01:00
Pedro J. Estébanez 6d89f675b1 Modernize Thread
- Based on C++11's `thread` and `thread_local`
- No more need to allocate-deallocate or check for null
- No pointer anymore, just a member variable
- Platform-specific implementations no longer needed (except for the few cases of non-portable functions)
- Simpler for `NO_THREADS`
- Thread ids are now the same across platforms (main is 1; others follow)
2021-02-18 11:58:08 +01:00
Pedro J. Estébanez 8f6a636ae7 Modernize Semaphore
- Based on C++11's `mutex` and `condition_variable`
- No more need to allocate-deallocate or check for null
- No pointer anymore, just a member variable
- Platform-specific implementations no longer needed
- Simpler for `NO_THREADS`
2021-02-18 11:58:08 +01:00
Pedro J. Estébanez 4ddcdc031b Modernize Mutex
- Based on C++11's `mutex`
- No more need to allocate-deallocate or check for null
- No pointer anymore, just a member variable
- Platform-specific implementations no longer needed
- Simpler for `NO_THREADS`
- `BinaryMutex` added for special cases as the non-recursive version
- `MutexLock` now takes a reference. At this point the cases of null `Mutex`es are rare. If you ever need that, just don't use `MutexLock`.
- `ScopedMutexLock` is dropped and replaced by `MutexLock`, because they were pretty much the same.
2021-02-18 11:58:08 +01:00
Rémi Verschelde 386402e05c
Merge pull request #46163 from lawnjelly/ewok_fix_lightmasking
Batching - prevent joining of lightmasked items
2021-02-18 11:57:32 +01:00
Pedro J. Estébanez b450036120 Modernize RWLock
- Based on C++14's `shared_time_mutex`
- No more need to allocate-deallocate or check for null
- No pointer anymore, just a member variable
- Platform-specific implementations no longer needed
- Simpler for `NO_THREADS`
2021-02-18 11:41:07 +01:00
Kongfa Waroros 5ec1eee6b1 Avoid function signals in ColorPicker to access the tree when it isn't in the tree 2021-02-18 16:57:47 +07:00
lawnjelly 389dd6704e Batching - prevent joining of lightmasked items
It turns out lights masking misbehaves when items that are masked are joined. This PR simply disables joining in this case.
2021-02-18 09:57:02 +00:00
Fredia Huya-Kouadio 96a3f01ac5
Add missing `ndkVersion` to the library gradle build config.
(cherry picked from commit 9418197081)
2021-02-18 10:37:59 +01:00
Fredia Huya-Kouadio 1557bc8396
Revert AGP to version 4.0.1 as a workaround to https://issuetracker.google.com/issues/171235570 in version 4.1.x
(cherry picked from commit e5311f3523)
2021-02-18 10:37:28 +01:00
Ellen Poe 8a426923c2
Fix pops in play() of both spatial audio players
(cherry picked from commit 5e1442ad55)
2021-02-18 10:33:46 +01:00
Rémi Verschelde ad7710ae5e
Dynamically load libudev.so.1 on Linux if `udev=yes`
This makes it possibly to run Linux binaries compiled with udev support on
Linux systems which do not provide udev (typically systemd-less distros).

If udev is missing, we fall back to parsing `/dev/input` like when compiled
without udev support (`udev=no`).

Also adding some verbose debug statements to know which method we're using
when debugging Linux joypad issues.

The libudev so wrappers were generated on Mageia 8 with libudev 246.9 using
https://github.com/hpvb/dynload-wrapper:
```
./generate-wrapper.py --include /usr/include/libudev.h --sys-include '<libudev.h>' \
  --soname libudev.so.1 --init-name libudev --omit-prefix gnu_ \
  --output-header libudev-so_wrap.h --output-implementation libudev-so_wrap.c
```

(cherry picked from commits a10c259c1d
and e26a1f807b)

Edit: Updated to version 0.2 of dynload-wrapper to fix symbols clobbering as
done in #46143.
2021-02-18 10:31:31 +01:00
PouleyKetchoupp 9cefab24e0 Fix test_body_motion recovery
This change makes test_body_motion more reliable when the kinematic body
recovers from being stuck.

- When recovery occurs, the rest information is generated, in order to
make sure collision results from test_move, move_and_collide and
move_and_slide are consistent and return a collision in case of overlap.

- The new calculation for recovery vector makes sure the recovery is
never more than the overlap depth between shapes.
This can help with cases where the kinematic body overlaps with several
shapes.
Recovery is made iteratively, without forcing a full overlap at each
step. This helps with getting proper rest information when recovery
occurs.

- One Way Collision:
When attempting motion, contact direction is checked against motion
before skipping in order to solve cases where kinematic bodies can sink
into one-way collision shapes.
Rest info now sets max contact depth in order to properly handle one-way
collision.

- Low speed motion is now handled in the rest info, by never setting
min_allowed_depth lower than motion length.
Separation is always applied with full margin, otherwise contact is lost
when low speed motion occurs right after higher speed motion.

- Similar changes are applied to 3D in order to make 2D and 3D
consistent.
2021-02-17 18:27:38 -07:00
Rémi Verschelde 4384605cb1
Merge pull request #46144 from hpvb/dont-clobber-symbols-32
[3.2] Don't clobber original library symbols
2021-02-18 00:38:38 +01:00
Rémi Verschelde 48b73e4532
Android: Bump NDK version to 21.4.7075529
This is what GitHub Actions now provide and they removed the previous 21.3.6528147.
A bit annoying to have our hand forced this way but it's still 21.x so should be good
to upgrade.

(cherry picked from commit c730da8b20)
2021-02-18 00:36:46 +01:00
Angad Kambli bba67729ca
add null check in _update_particle_data_buffer()
add check to see if p_order is in range for CPUParticles3D::set_draw_order'

(cherry picked from commit c97fffdc59)
2021-02-18 00:36:20 +01:00
Jitesh d968a03cbc
Add animation_finished signal and fix frame_changed signal for AnimatedSprite3D
Fixes #40301.
Fixes #45947.

(cherry picked from commit c3be0c2c04)
2021-02-18 00:36:20 +01:00
Hugo Locurcio 972e7bd27c
Only display the assetlib Retry button if the download failed
(cherry picked from commit 508011a57f)
2021-02-18 00:35:57 +01:00
andybarcia 61c00938a2
Fixes crash when calling VisualShader::set_mode
(cherry picked from commit f455f873c7)
2021-02-18 00:35:57 +01:00
Quadtree a81f896ec1
Add cwrap to EXTRA_EXPORTED_RUNTIME_METHODS
(cherry picked from commit d2c34e83b5)
2021-02-18 00:35:57 +01:00
Hein-Pieter van Braam-Stewart 20896a89c9 Don't clobber original library symbols
It appears that we can get a fun circle dependency on a shared object on
some system configurations causing issues with our 'fake' function
pointer names. This can lead to a crash.

The new wrapper generator renames all the symbols so this can't happen
anymore. See https://github.com/hpvb/dynload-wrapper/commit/704135e

Cherry-pick from 8d36b17343
2021-02-18 00:25:42 +01:00
Rémi Verschelde f5b35114d9
Merge pull request #46136 from m4gr3d/add_verbose_logging_android_export
[3.2] Improve verbose logging for the Android export process
2021-02-18 00:24:41 +01:00
Fredia Huya-Kouadio d559def1a9 Add verbose logging to help with troubleshooting the Android build/export process. 2021-02-17 13:30:01 -08:00
Rémi Verschelde 6fc9580299
Merge pull request #46121 from Faless/js/3.x_processor_count
[HTML5] Implement OS.get_processor_count()
2021-02-17 14:04:58 +01:00
Fabio Alessandrelli 03edba4d75 [HTML5] Implement get_processor_count. 2021-02-17 13:42:26 +01:00