Commit graph

3535 commits

Author SHA1 Message Date
Rémi Verschelde
a90cac7ba4
Merge pull request #55988 from timothyqiu/http-proxy-3.x 2021-12-16 13:09:07 +01:00
Rémi Verschelde
8cc549d587
Merge pull request #55986 from timothyqiu/doctool-i18n-3.x 2021-12-16 13:08:59 +01:00
Haoyu Qiu
1cada6bfa9 Add proxy support for HTTPClient and the editor
* Adds proxy related methods for `HTTPClient` and `HTTPRequest`
* Adds `network/http_proxy/{host,port}` editor settings
* Makes AssetLib and Export Template Manager proxy aware
2021-12-16 19:38:53 +08:00
raphaelazev
102f102f7d
Added check to get_all_locales to avoid adding duplicate locales to array
(cherry picked from commit 82527df55c)
2021-12-16 12:10:11 +01:00
Haoyu Qiu
c11b1850c4 Make --doctool locale aware
* Adds `indent(prefix)` to `String`
* Moves the loading of tool/doc translation into
  `editor/editor_translation.{h,cpp}`
* 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 18:27:32 +08:00
Haoyu Qiu
a16b06e7a4 Fix Color.v integer assignment 2021-12-16 00:33:23 +08:00
lawnjelly
7eae6cd310 RID tracked handles better error messages for dangling RIDs
Keeps track of previous allocations as well as current allocations, as the previous allocation will be the one of interest in many cases for dangling RIDs.

Prints the file / line number in the error message, instead of using print_verbose.
2021-12-08 10:07:25 +00:00
Rémi Verschelde
0845f20784
Merge pull request #55614 from Calinou/add-os-crash-method-3.x 2021-12-06 17:04:14 +01:00
Aaron Franke
d75e580765
Warn when using an AABB or Rect2 with a negative size
(cherry picked from commit 9687f6fca3)
2021-12-06 16:51:59 +01:00
lawnjelly
3d981b8265 Add option to use handles to RID
Adds an option to compile an alternative implementation for RIDs, which allows checks for erroneous usage patterns as well as providing leak tests.
2021-12-06 14:43:34 +00:00
Hugo Locurcio
58296c7e21
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-04 01:40:56 +01:00
Rémi Verschelde
c4f7ba4686
Merge pull request #55358 from timothyqiu/pop-front-3.x
[3.x] Fix potential infinite loop when connecting HTTPClient
2021-11-30 09:26:38 +01:00
Aaron Franke
035a84fe92
[3.x] Add a Time singleton 2021-11-29 11:00:06 -06:00
Aaron Franke
1d8cef8236
[3.x] Backport some APIs in math structs 2021-11-27 01:19:45 -06:00
Haoyu Qiu
de1cdc2102 Fix potential infinite loop when connecting HTTPClient 2021-11-26 23:43:55 +08:00
kobewi
420c351592
Ignore override.cfg when in editor
(cherry picked from commit 7dc97d6558)
2021-11-25 22:48:20 +01:00
bruvzg
2ef2879d7b
Add Input.is_physical_key_pressed method.
(cherry picked from commit 9877d91c4a)
2021-11-25 22:19:33 +01:00
Haoyu Qiu
9442114013
Fix crash when executing PackedDataContainer._iter_init
(cherry picked from commit 8253a45a1a)
2021-11-25 22:05:48 +01:00
kleonc
16baa9bb9a Image Use memcpy() in fill(), fill_rect(), _put_pixelb(), _get_pixelb()
Co-authored-by: Lightning_A <aaronjrecord@gmail.com>
2021-11-23 17:59:08 +01:00
kleonc
4f446c8b9e Add Image::fill_rect method 2021-11-23 17:59:08 +01:00
Camille Mohr-Daurat
3970f28f67
Merge pull request #55096 from lawnjelly/bvh_expanded_leaf
BVH - add option for expanded AABBs in leaves
2021-11-22 09:37:16 -07:00
Brian Semrau
04846156c3
Expose Thread::get_main_id in core bindings
(cherry picked from commit c558263d84)
2021-11-20 11:48:09 +01:00
lawnjelly
211dc8cd2d BVH - add option for expanded AABBs in leaves
This PR adds a define BVH_EXPAND_LEAF_AABBS which is set, which stores expanded AABBs in the tree instead of exact AABBs.

This makes the logic less error prone when considering reciprocal collisions in the pairing, as all collision detect is now taking place between expanded AABB against expanded AABB, rather than expanded AABB against exact AABB.

The flip side of this is that the intersection tests will now be less exact when expanded margins are set.

All margins are now user customizable via project settings, and take account of collision pairing density to adjust the margin dynamically.
2021-11-20 06:45:12 +00:00
Rémi Verschelde
4a29f657b6
Merge pull request #55050 from lawnjelly/bvh_detect_shrinkage 2021-11-19 17:39:12 +01:00
Marcel Admiraal
4d3690eba5 Remove unimplemented methods 2021-11-18 12:47:36 +00:00
lawnjelly
9315b4fb51 BVH - fix typename compiler warning
Some versions of microsoft compiler flag a warning that they want a typename keyword in templates in more places than clang / gcc.
2021-11-18 07:42:00 +00:00
lawnjelly
ed47570266 BVH - detect shrinkage within expanded bounds
Although the expanded bounds were working in normal use, for moving and growing objects, there was one case which was not dealt with properly - significant shrinkage of exact bounds within an expanded bound.

This PR detects significant shrinkage and forces a new expanded bound to be created.
2021-11-17 09:06:10 +00:00
Rémi Verschelde
f1ee1a2bf6
Revert "Fix UndoRedo::Operation objects cleanup" 2021-11-16 08:54:58 +01:00
Rémi Verschelde
458f5b42a6
Merge pull request #54433 from rxlecky/fix-undo-redo-double-free-50769 2021-11-16 00:22:23 +01:00
SeleckyErik
ae1bfacd2a Implement UndoRedo::Operation destructor
This way we can delete all occurences of nearly identical cleanup code
scattered around the UndoRedo class that was error-prone to keep in sync.
2021-11-15 23:55:01 +01:00
Rémi Verschelde
0cdcf1154f
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>
(cherry picked from commit 5341e6010e)
2021-11-15 17:22:47 +01:00
Haoyu Qiu
f83b17e4eb
Add missing characters for property name quoting
(cherry picked from commit 367d75fab0)
2021-11-15 17:22:47 +01:00
Daniel Kolesa
5fe78a3a25
Add support for PowerPC family
(cherry picked from commit 3a84a64d2f)
2021-11-15 17:22:46 +01:00
kobewi
7f91cbc397
Expose String.get_slice
(cherry picked from commit e5725c7deb)
2021-11-15 17:22:46 +01:00
Rémi Verschelde
b960ab1cea
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.

(cherry picked from commit cc57cbb73a)
2021-11-15 16:18:34 +01:00
lawnjelly
062406b555 [3.x] Add Basis helper functions for transforming normals
Correct transformation of normals that works with a Basis containing non-uniform scale is difficult to get correct for those not familiar with the maths, it is also rather verbose and hard to read in calling code. This PR adds helper functions which both standardize the approach and make it clearer in calling code what is being done and why.
2021-11-15 08:43:46 +00:00
Pedro J. Estébanez
a7aad78fd0 Add recursive comparison to Array and Dictionary
...and expose it to GDScript.

Co-authored-by: Emmanuel Leblond <emmanuel.leblond@gmail.com>
2021-11-09 15:08:22 +01:00
Rémi Verschelde
1f8497d281
Merge pull request #53411 from RandomShaper/ubershaders_3.x 2021-11-09 13:12:44 +01:00
Pedro J. Estébanez
4c710780d4 Implement async shader compilation plus caching for GL ES 3
Async. compilation via ubershader is currently available in the scene and particles shaders only.

Bonus:
- Use `#if defined()` syntax for not true conditionals, so they don't unnecessarily take a bit in the version flagset.
- Remove unused `ENABLE_CLIP_ALPHA` from scene shader.
- Remove unused `PARTICLES_COPY` from the particles shader.
- Remove unused uniform related code.
- Shader language/compiler: use ordered hash maps for deterministic code generation (needed for caching).
2021-11-09 12:19:12 +01:00
Pedro J. Estébanez
b6f04dfd21 Add ProjectSettings::set_hide_from_editor() 2021-11-09 12:19:12 +01:00
Pedro J. Estébanez
abdf931832 Add off-screen GL context 2021-11-09 12:19:12 +01:00
Pedro J. Estébanez
5eb80bb1a3 Avoid the need for copy assignment in HashMap key/data types 2021-11-08 22:33:54 +01:00
bruvzg
262ec9033a Implement limited surrogate pairs support for platforms with 16-bit wchar_t. 2021-11-06 11:55:06 +02:00
Rémi Verschelde
f0223ea8d3
CI: Update to clang-format 13 using LLVM repo
(cherry picked from commit f42ef8d5f9)
2021-10-28 17:30:52 +02:00
Rémi Verschelde
14ef65e49b
Merge pull request #54348 from akien-mga/3.x-clang-format-dont-align-operands 2021-10-28 15:43:15 +02:00
Rémi Verschelde
87c80f529f
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 14:50:33 +02:00
Rémi Verschelde
1b65550ec7
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 14:50:32 +02:00
Rémi Verschelde
42d385b312
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 13:23:38 +02:00
Rémi Verschelde
8c04e10298
Merge pull request #54271 from nekomatata/fix-bvh-recheck-pairs-crash 2021-10-26 18:49:31 +02:00
Max Hilbrunner
e29126914d
Save all 64 bits of get_ticks_msec() in more cases
(cherry picked from commit 5dc02eb8b0)
2021-10-26 18:23:31 +02:00