Commit graph

3447 commits

Author SHA1 Message Date
Shatur95
8ebefc8cf4
Fix CONNECT_REFERENCE_COUNTED
(cherry picked from commit e5a086fde6)
2021-10-04 15:15:27 +02:00
PouleyKetchoupp
54424b57b3
Fix buffer overflow in 2D BVH
Some areas of code were missed and assumed Vector3.

(cherry picked from commit d3c6395dcd)
2021-10-04 15:15:23 +02:00
Lucy
1d3f1c8c0a
Fix Platform Thread Override
(cherry picked from commit 5fe1857496)
2021-10-04 14:37:27 +02:00
Haoyu Qiu
7be67ee1b7 Fix crash when creating thread 2021-10-03 16:03:41 +08:00
Rémi Verschelde
7c9e06f936
Merge pull request #48686 from bruvzg/bundle_icon_3 2021-09-30 14:55:41 +02:00
Rémi Verschelde
6bdd84b8d5
Fix -Wextra warnings from GCC 11 2021-09-29 15:23:12 +02:00
O01eg
cddabf2a8b
Implement override of get_message 2021-09-29 14:06:57 +03:00
LATRio
4fb7b1ebb0 fix crash in Variant::get_method_default_arguments when wrong type is passed 2021-09-28 19:57:45 +09:00
Haoyu Qiu
8a47fe9eb0 Fix crash when casting from null 2021-09-26 10:08:14 +08:00
kleonc
67b27ea4c9
AStar Add error messages
(cherry picked from commit 71255bc2a9)
2021-09-21 20:33:12 +02:00
Rémi Verschelde
b4fc24b73f
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.

(cherry picked from commit def99c7baf)
2021-09-21 20:33:12 +02:00
Lucy
83bbb527ad
Allow for platform Thread implementation override
(cherry picked from commit e9723efd34)
2021-09-21 17:15:00 +02:00
jmb462
e7dac5da41
Adding InputMap action error suggestion for Input singleton
(cherry picked from commit a3b9842616)
2021-09-21 17:14:58 +02:00
Rémi Verschelde
22aab6be1c
Merge pull request #51796 from RandomShaper/dangling_obj_release_3.x
[3.x] Promote object validity checks to release builds
2021-09-21 11:48:11 +02:00
Pedro J. Estébanez
26edc6cd41 Promote object validity checks to release builds
Extra:
- Optimized the debug-only check about why the object is null to determine if it's because it has been deleted (the RC is enough; no need to check the ObjectDB).
- Because of the previous point. the debugger being attached is not required anymore for giving the "Object was deleted" error; from now, it only matters that it's a debug build.
- `is_instance_valid()` is now trustworthy. It will return `true` if, and only if, the last object assigned to a `Variant` is still alive (and not if a new object happened to be created at the same memory address of the old one).
- Replacements of `instance_validate()` are used where possible `Variant::is_invalid_object()` is introduced to help with that. (GDScript's `is_instance_valid()` is good.)
2021-09-21 10:39:04 +02:00
Rémi Verschelde
b37776fa2f
Merge pull request #52591 from timothyqiu/error-macros
[3.x] Remove do{ } while(0) wrapper around error macros
2021-09-21 10:38:34 +02:00
David Socha
ede023d4fa
Update connection comparison operator to compare connection sources based on instance ID instead of by pointer 2021-09-21 01:38:11 -05:00
Rémi Verschelde
91d0e985cd
Merge pull request #52572 from timothyqiu/expose-enum-3x
[3.x] Expose enum related methods in ClassDB
2021-09-20 16:12:16 +02:00
lawnjelly
0316d50ece
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.

(cherry picked from commit d3a3b3aff3)
2021-09-20 13:05:26 +02:00
Ricardo Subtil
723ad5ef61
Fix path with multiple slashes not being corrected on templates
(cherry picked from commit eef0327d1e)
2021-09-20 13:01:13 +02:00
Hugo Locurcio
59eafe4cd3
Remove #ifdefs for handling compilation with Visual Studio < 2015
Godot 3.3 and later require Visual Studio 2017 to be compiled.

(cherry picked from commit fc0bfbb33b)
2021-09-19 11:30:22 +02:00
Rémi Verschelde
16ca2757f8
Merge pull request #52737 from EIRTeam/action_erase_fix 2021-09-17 11:52:42 +02:00
Álex Román Núñez
43bc8830f1 Fix InputMap.action_erase_event() failing to erase events correctly.
Fixes #52733

(3.x backport of 7104229a85)
2021-09-17 03:08:21 +02:00
Theraot
d03f7c0598 [3.x] Fix get_base_dir windows top level directory logic
This is a fix for https://github.com/godotengine/godot/issues/52048
2021-09-16 06:38:29 -05:00
Rémi Verschelde
187b1ec61e
Merge pull request #51095 from RandomShaper/error_cast_freed_object_3.x
[3.x] Complain if casting a freed object in a debug session
2021-09-14 22:40:17 +02:00
Pedro J. Estébanez
123d3ef935 Complain if casting a freed object in a debug session
The idea is to give the user a chance to realize a mistake that will cause a crash in a release build (or with no debugger attached).
2021-09-14 21:05:47 +02:00
Haoyu Qiu
25bd0c3f72
Try other resolved IPs if one fails to connect
(cherry picked from commit fd52e18d19)
2021-09-14 14:18:18 +02:00
Haoyu Qiu
e46d54ebec
Quote and escape ConfigFile keys when necessary
(cherry picked from commit 597d489a20)
2021-09-14 13:41:27 +02:00
Gilles Roudière
b0cb253a51
Fix LocalVector crash on insert.
(cherry picked from commit de0765b94a)
2021-09-14 13:41:26 +02:00
Haoyu Qiu
70853fd669 Remove do{ } while(0) wrapper around error macros 2021-09-12 15:04:53 +08:00
Haoyu Qiu
468a2a2a65 Expose enum related methods in ClassDB 2021-09-11 20:33:29 +08:00
kobewi
02535e7f17 Compare connections by object id 2021-09-08 14:00:29 +02:00
Camille Mohr-Daurat
8608ece42f
Merge pull request #50405 from nekomatata/clean-convex-hull-decomposition-3.x
[3.x] Clean convex hull decomposition code
2021-09-06 09:34:50 -07:00
Wilson E. Alvarez
f5409e7c3f
Fixed String::simplify_path Variant return type 2021-08-29 20:25:00 -04:00
Hugo Locurcio
d717eb537b
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 01:27:07 +02:00
Camille Mohr-Daurat
52b7be5c41
Merge pull request #52059 from mortarroad/3.x-fix-convex-hull-double-edges
[3.x] Fix emitting duplicate edges for convex hulls
2021-08-24 15:41:11 -07:00
Morris Tabor
647ab948c0 Fix emitting duplicate edges for convex hulls
Fixes https://github.com/godotengine/godot/issues/51909
2021-08-24 19:26:33 +02:00
Wilson E. Alvarez
fb5417a17b
[3.x] Expose String.simplify_path 2021-08-24 00:48:20 -04:00
Morris Tabor
82279538a3 Fix winding of new convex hull implementation. 2021-08-20 15:19:39 +02:00
kobewi
6eb52b0768
Fix renaming directories
(cherry picked from commit 0dde3e5b59)
2021-08-18 23:19:44 +02:00
Haoyu Qiu
5f316aa216 Improve Undo/Redo menu items
* Make Undo/Redo menu items disabled when clicking it does nothing.
    * Context menu of `TextEdit`
    * Context menu of `LineEdit`
    * Editor's Scene menu
    * Script editor's Edit menu and context menu  (for Script and Text)
* Make editor undo/redo log messages translatable.
* Mark `UndoRedo`'s `has_{un,re}do()` methods as `const`.
* Expose `TextEdit`'s `has_{un,re}do()` to scripts since `{un,re}do()` are already available.
2021-08-18 00:46:51 +08:00
Rémi Verschelde
c0fc475078
Merge pull request #51521 from lawnjelly/portals_occluders
Sphere occluders (portals and general use)
2021-08-17 13:55:34 +02:00
lawnjelly
115f4dce55 Sphere occluders (portals and general use)
Add framework for supporting geometrical occluders within rooms, and add support for sphere occluders.
Includes gizmos for editing.

They also work outside the portal system.
2021-08-17 09:02:06 +01:00
Rémi Verschelde
76c891c257
Merge pull request #51706 from maiself/fix-input-methods-returning-zero-strength
Fix input methods returning zero strength when pressed status not requested
2021-08-16 13:02:36 +02:00
Mai Lavelle
d418443992 Fix input methods returning zero strength when pressed status not requested
Fixes behavior of these methods:

`InputMap::event_get_action_status`
`InputEvent*::action_match`

Previously when `p_pressed` was `nullptr`, `p_strength` would be set to
`0.0f` regardless of event strength. This affected `InputEventAction` events
processed by `Input.parse_input_event` for example.

Regression found in afa89c9eea
2021-08-15 20:00:31 -04:00
ne0fhyk
c88d1608ab Add partial support for Android scoped storage.
This is done by providing API access to app specific directories which don't have any limitations and allows us to bump the target sdk version to 30.
In addition, we're also bumping the min sdk version to 19 as version 18 is no longer supported by Google Play Services and only account of 0.3% of Android devices.
2021-08-13 11:04:17 -07:00
Rémi Verschelde
ffc372b002
Merge pull request #42220 from RandomShaper/agile_input_3.2
[3.x] Improve responsiveness on underpowered Android devices
2021-08-12 22:46:17 +02:00
Rémi Verschelde
ba8551451f
Resource: Remove unused _use_builtin_script() virtual method
And another piece of dead code found while searching for "use_builtin".

(cherry picked from commit 6e9439198c)
2021-08-12 16:45:48 +02:00
Pedro J. Estébanez
9aafb22d99
Fix logic to allow default null thread argument
(cherry picked from commit a6303b70a5)
2021-08-12 16:42:16 +02:00
lawnjelly
fc60eaccb8 Quickhull - reduce warning spam and make hideable
Added one more warning to the hideable warnings. These seem to be benign warnings and are hidden during use in rooms and portals. When used from other areas, only one warning is displayed per run, instead of for every occurrence.
2021-08-10 12:06:46 +01:00