Commit Graph

3532 Commits

Author SHA1 Message Date
ace153ad61 Fix GCC 14 -Wtemplate-id-cdtor warnings
Fixes #91206.

(cherry picked from commit a8ff47b6d6)
2024-11-06 11:29:45 +01:00
6e29a9573c [iOS] Fix build with warnings=extra.
(cherry picked from commit 987723b386)
2024-11-06 11:17:50 +01:00
66cede8368 Fix warnings found by Emscripten 3.1.10
Fix `-Wunused-but-set-variable`, `-Wunqualified-std-cast-call`, and
`-Wliteral-range` warnings.

(cherry picked from commit d8935b27a9)
2024-11-05 23:28:47 +01:00
34234f9d97 [Core] Use std type traits to check operations triviality.
(cherry picked from commit 6f02183f8c)
2024-11-05 23:22:56 +01:00
a68344681b Fixup BVH debugging statements
(cherry picked from commit 90725964a4)
2022-08-01 10:53:42 +02:00
4f98488d82 Use the right memory ordering in SafeNumeric operations
(cherry picked from commit 02a584d8e6)
2022-07-25 16:42:07 +02:00
956ab70733 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.

(cherry picked from commit e375cbd094)
2022-07-18 15:39:43 +02:00
d52681085e Fix String.http_escape on Windows
(cherry picked from commit 1a7e3b3ab6)
2022-07-07 14:10:10 +02:00
45e55d51de Fix invalid memory usage when using Image.convert
(cherry picked from commit 34c1a2beaa)
2022-07-07 14:07:05 +02:00
afe8492241 Fix typos with codespell
Using codespell 2.2-dev from current git.

Fix a couple incorrect uses of gendered pronouns.
2022-06-19 14:06:55 +02:00
a3f91b9fdc Fix left aligned integer sign in string formatting
(cherry picked from commit 767134fd8d)
2022-05-05 15:17:52 +02:00
b95221fb0a fix unable to change directory in user access mode
(cherry picked from commit c69689ab5a)
2022-04-13 12:18:45 +02:00
9029e5d66f Include platform_config.h in thread.cpp and thread.h
(cherry picked from commit 6c6291b84f)
2022-03-17 13:05:47 +01:00
fd21478f43 Revert "Fix ProjectSettings has_setting() when used on a overriden setting with feature tags"
(cherry picked from commit 78bf9926f8)
2022-03-07 14:40:34 +01:00
719f4cd5e5 Fix UndoRedo::create_action() invalid memory usage
(cherry picked from commit b00b7f9b7c)
2022-03-02 12:03:06 +01:00
22f50490c2 Print every file exported with PCKPacker.flush()s verbose parameter
Previously, only one line per 100 files was printed.

This also refactors the print statement to use Godot methods and
make it more informative overall.

(cherry picked from commit 8e57e5dc6a)
2022-03-01 11:02:59 +01:00
df24144a4c Fix decompression functions not returning errcodes
(cherry picked from commit 61790a03f5)
2022-02-19 16:00:17 +01:00
Max
12b9fe5021 Fixed variant decoding Segmentation Fault
(cherry picked from commit 6aede992a9)
2022-02-17 10:40:42 +01:00
e53604b742 has_setting now correctly returns true when the setting is present due to a feature tag
(cherry picked from commit d39e416c61)
2022-02-17 10:35:27 +01:00
d47214f344 Make parser treat all exponent literals as float
(cherry picked from commit 1305ff92f7)
2022-02-17 10:33:31 +01:00
6e14ab25f6 Added hex and bin literal support to Expression parser
fixed formatting

(cherry picked from commit 018de19eba)
2022-02-17 10:32:21 +01:00
718132b694 Add fflush to error macros
CRASH_NOW and DEV_ASSERT macros would previously terminate before outputting any error messages.
This PR ensures calling fflush for stdout before terminating.

(cherry picked from commit ee979d321a)
2022-02-17 10:22:49 +01:00
4ab57389a5 Fix PoolByteArray.decompress_dynamic return value and memleak
(cherry picked from commit de47cb0c5b)
2022-02-17 10:22:33 +01:00
6c1f158459 BVH - fix leaking leaves
In the BVH leaf nodes are a combination of two objects - a node object, and a leaf object. Testing revealed that in some situations node objects could be freed without also freeing the paired leaf object. This closes this bug.

(cherry picked from commit 90bea27e82)
2022-02-17 10:20:50 +01:00
73d5851232 Expose Image.COMPRESS_SOURCE_LAYERED to scripting
(cherry picked from commit 7f49e5beec)
2022-01-25 18:41:18 +01:00
71066cd63b Update copyright statements to 2022
Happy new year to the wonderful Godot community!

(cherry picked from commit a627cdafc5)
2022-01-13 16:00:37 +01:00
b7fbfc2776 Add joystick button index boundary check. Increase max. button number to 128 (max. buttons supported by DirectInput).
(cherry picked from commit 61ea8f8337)
2022-01-12 16:29:19 +01:00
68e590e1fb Fix crash on importing FBX file
(cherry picked from commit af67e4c291)
2022-01-12 16:28:53 +01:00
2e8fdd0112 Fix typos with codespell
Using codespell 2.1.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
doubleclick
fave
findn
GIRD
leapyear
lod
merchantibility
nd
numer
ois
ony
que
readded
seeked
statics
synching
te
uint
unselect
webp
EOF

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```

(cherry picked from commit b197de6f5f)
2022-01-07 00:17:47 +01:00
cb6d82a111 Fix multiple missing UTF-8 decoding.
(cherry picked from commit c69e0d16bc)
2022-01-06 21:30:41 +01:00
39cdd57114 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`

(cherry picked from commit 69a532414c)
2022-01-06 00:58:31 +01:00
9cdaf19735 Fix Color.v integer assignment
(cherry picked from commit a16b06e7a4)
2021-12-16 22:59:18 +01:00
b90bec546d 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`.

(cherry picked from commit c11b1850c4)
2021-12-16 17:06:52 +01:00
37a8a615e5 Added check to get_all_locales to avoid adding duplicate locales to array
(cherry picked from commit 82527df55c)
2021-12-14 17:29:20 +01:00
8e441d7c8b Fix potential infinite loop when connecting HTTPClient
(cherry picked from commit de1cdc2102)
2021-11-30 10:59:18 +01:00
b8f888a43b Add Input.is_physical_key_pressed method.
(cherry picked from commit 9877d91c4a)
2021-11-25 23:13:15 +01:00
6516f26948 Fix crash when executing PackedDataContainer._iter_init
(cherry picked from commit 8253a45a1a)
2021-11-25 23:13:15 +01:00
07e5022cce 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.

(cherry picked from commit 211dc8cd2d)
2021-11-25 23:13:14 +01:00
1698dbe30e 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.

(cherry picked from commit ed47570266)
2021-11-25 23:13:12 +01:00
100c6d8ccd 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.

(cherry picked from commit 9315b4fb51)
2021-11-25 23:13:12 +01:00
f0223ea8d3 CI: Update to clang-format 13 using LLVM repo
(cherry picked from commit f42ef8d5f9)
2021-10-28 17:30:52 +02:00
14ef65e49b Merge pull request #54348 from akien-mga/3.x-clang-format-dont-align-operands 2021-10-28 15:43:15 +02:00
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
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
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
8c04e10298 Merge pull request #54271 from nekomatata/fix-bvh-recheck-pairs-crash 2021-10-26 18:49:31 +02:00
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
ba424a22d3 Fix crash due to recheck pair process in BVH broadphase
The pair user data wasn't correctly updated in the BVH from the check
pair callback.

This could lead to crashes when the check caused logical unpairing in
physics, then actual unpairing from the broadphase occured and the
physics server tried to delete an already deleted pointer.
2021-10-26 09:17:36 -07:00
beb99fe54b Expose Input::flush_buffered_events()
(cherry picked from commit 6dc3fae201)
2021-10-23 12:02:48 +02:00
5659120af3 [3.x] 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:23 -05:00