Commit graph

3122 commits

Author SHA1 Message Date
Aaron Franke b2897f1f7b
Check for global script class information before clearing it
(cherry picked from commit 1ca501d7d4)
2020-10-05 22:09:49 +02:00
Rémi Verschelde 6c03ac6625
Improve format version mismatch error in binary loader
(cherry picked from commit e35bb04c53)
2020-10-05 20:32:31 +02:00
Aaron Franke fcaf17824f
Don't write global script class information if there is none
(cherry picked from commit 3163611f0c)
2020-10-04 20:53:50 +02:00
Serhat 09a8dd7b3b
Fixed padding bug of sprintf function
(cherry picked from commit 9f2cdfea82)
2020-10-04 20:51:58 +02:00
Wilson E. Alvarez 5766547e33
Make "function" a property of FuncRef
(cherry picked from commit b4e7edabf3)
2020-10-01 16:00:47 +02:00
Wilson E. Alvarez eb78d4e883
Allow retrieval of FuncRef function string
(cherry picked from commit 75154e64a9)
2020-10-01 16:00:46 +02:00
Rémi Verschelde 4ad74609ce
Merge pull request #40205 from bruvzg/click-through-3
[3.2] Add mouse event pass-through support for window.
2020-10-01 13:58:24 +02:00
Rémi Verschelde df2dcf5742
Merge pull request #41866 from RandomShaper/fix_41179
Disable decayment of freed Objects to null in debug builds
2020-10-01 13:43:08 +02:00
Rémi Verschelde 66cbcc1b7e
Merge pull request #41123 from lawnjelly/octree_fix
Optimize octree and fix leak
2020-09-30 23:11:31 +02:00
Rémi Verschelde 904773149d
Merge pull request #42341 from nekomatata/x11-events-thread-3.2
[3.2] Fix issues related to delay when processing events on Linux
2020-09-30 16:39:55 +02:00
Tomasz Chabora b3a23b2efb
Remove unnecessary empty line from Dictionaries
(cherry picked from commit 7b1ad6fbe0)
2020-09-29 13:57:56 +02:00
Rémi Verschelde a99879ba6c
MessageQueue: Change default queue size to 4096 KB
1024 KB was low enough that many users seem to hit it, which can lead to the
editor freezing.

The proper fixed as described in #35653 would be to implement a page allocator
to prevent this overflow, but as a stop-gap measure, we can increase the
default value to a more lenient 4096 KB which should be high enough for the
vast majority of use cases.

The default size can be brought down again if/when #35653 is properly fixed,
and if it's actually relevant from a memory point of view.

(cherry picked from commit 5009ba54b2)
2020-09-29 08:54:39 +02:00
PouleyKetchoupp f725d9cb73 Fix issues related to delay when processing events on Linux
3.2 backport of PR #41910:
Fix general keyboard input lag on X11 display server
Fix delay to process clipboard content from Godot in other programs
2020-09-26 15:32:40 +02:00
Rémi Verschelde 64b0f5db40
zstd: Update to upstream version 1.4.5
(cherry picked from commit 914591c9ae)
2020-09-24 14:43:11 +02:00
Andrii Doroshenko (Xrayez) 2bfb83c702
Make Object::to_string virtual
Allows to override printing via C++, not only via script.

(cherry picked from commit cfead57d1d)
2020-09-24 14:43:10 +02:00
Yilin Ma d571de5f81
added load resource pack with offset feature
(cherry picked from commit c524d50444)
2020-09-24 14:43:09 +02:00
Aaron Franke 1dcbcaaa0d
Change inequality comparison operators to use exact equality
(cherry picked from commit d0a1399a1b)
2020-09-24 14:43:08 +02:00
Tomasz Chabora 13d7404cd7
Check for null in InputMap::_find_event
(cherry picked from commit f4e34ac353)
2020-09-24 14:43:08 +02:00
Hugo Locurcio e04855ce00
Fix crash when opening a ZIP data pack
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
(cherry picked from commit 0b65342fd2)
2020-09-24 14:43:07 +02:00
Andrii Doroshenko (Xrayez) 1f42a8a073
Fix List swap behavior on front, back and adjacent elements
- immediately return if A == B;
- first and last elements (front, back) are updated upon relinking;
- handles a special case of forward and backward adjacent elements.

(cherry picked from commit ac69f092fc)
2020-09-24 14:43:07 +02:00
Marcel Admiraal 564d7101b4
Add missing reference to const T Vector::get().
(cherry picked from commit 4feba93630)
2020-09-24 14:43:06 +02:00
Rémi Verschelde c8859f0463
Fix typos with codespell
Using codespell 1.17.1.

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

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2020-09-18 14:09:51 +02:00
Rémi Verschelde cb78a5d7ae
Linux/BSD: Fix support for NetBSD
Add __NetBSD__ to `platform_config.h` so that it can find `alloca`
and use the proper `pthread_setname_np` format.

Rename RANDOM_MAX to avoid conflict with NetBSD stdlib.

Fixes #42145.

(cherry picked from commit 5f4d64f4f3)
2020-09-18 10:29:52 +02:00
bruvzg e51fed9d1b
[3.2] Add window click-through support. 2020-09-17 12:36:01 +03:00
Pedro J. Estébanez ddd869135b Disable decayment of freed objects to null in debug builds 2020-09-08 19:47:39 +02:00
Marcel Admiraal 3697cc479d
Initialise Basis elements with a default Basis in the declaration.
Ensures a valid Basis is created with all constructors.

(cherry picked from commit 9149fb760c)
2020-09-08 15:04:54 +02:00
Marcel Admiraal c6cccdf0c6 Ensure header guards enclose entire header.
(cherry picked from commit f6ad1954f7)
2020-09-04 08:48:35 +02:00
Hugo Locurcio ee97e45a69 Improve the resource loading error message to mention the need to import
This is a common pitfall when setting up projects in a headless
environment.

(cherry picked from commit 58ed3037c0)
2020-09-04 08:48:17 +02:00
Yakov Borevich 63b2f69c7f
[funexpected] clear missed remaps on deinitialization, fixes godotengine/godot#34221
(cherry picked from commit 604bd75438)
2020-08-31 15:29:46 +02:00
Rémi Verschelde 5a96c24243
Revert "Check if global class file still exists before registering it"
And revert follow-up regression fix "Remap script path when registering class."

After the regression fix, the original issue is valid again so it's better
to go back to the previous state.

This reverts commits e264ae20d2 and
fceb64827e.

(cherry picked from commit f13207254c)
2020-08-25 14:33:46 +02:00
Rémi Verschelde 42dca43c50
Merge pull request #41029 from masi456/fix/40888
Make sure that Image is not locked before creation
2020-08-21 02:27:22 +02:00
lawnjelly 667c970b77 Optimize octree and fix octree leak
Prevents adding new octants until a limiting number of elements have been added to the current octant. This enables balancing the benefits of brute force against the benefits of spatial partitioning. The limit can be set per octree.

Project settings are added for rendering octree to set the best balance per project depending on number of tests per frame / tick, and the amount of editing of the octree.

Fixes octants being leaked when removing elements.

Optimize octree with cached linear lists

Storing elements in octants using linked lists is efficient for housekeeping but very slow for testing. This optimization stores additional local_vectors with Element pointers and AABBs which are cached and only updated when a dirty flag is set on the octant.

This is selectable with 2 versions of Octree : Octree and Octree_CL, Octree being the old behaviour. At present the cached list version is only used for the visual server octree (rendering) as it has only been demonstrated to be faster there so far.

This uses slightly more memory (probably a few kb in most cases) but can be significantly faster during testing (culling etc).

Co-authored-by: Sergey Minakov <naithar@icloud.com>
2020-08-18 11:02:21 +01:00
Rémi Verschelde e283d4b5c8 Update AUTHORS and DONORS list
New contributors added to AUTHORS:
@hinlopen, @naithar, @rrcore, @SkyLucilfer, @TwistedTwigleg

Thanks to all contributors and donors for making Godot possible!

---

Also changes to relevant code that parses the DONORS.md to match
the new tiers.

(cherry picked from commit d2d4c1c957)
2020-08-14 00:32:05 +02:00
Fabio Alessandrelli a97b84378c Remap script path when registering class.
Was causing `class_name`-defined scripts to not being loaded in exported
games due to the remap from `*.gd` to `*.gdc`/`*.gde`.

(cherry picked from commit fceb64827e)
2020-08-14 00:32:04 +02:00
bruvzg 8dab067c01
Add missing NULL termination to the String::repeat function. 2020-08-11 17:23:44 +03:00
Marcel Schneider c62ce03679 Make sure that a new image can only be created when the buffer is not currently locked 2020-08-05 20:55:31 +02:00
Wilson E. Alvarez 4f9ca00294 Check if global class file still exists before registering it
(cherry picked from commit e264ae20d2)
2020-07-29 18:23:03 +02:00
Nathan Franke b9e1db7e03
Revert "Fix Directory Open Check"
This reverts commit 3f898f5207.
2020-07-28 13:54:13 -04:00
Nathan Franke 9de0439a45
Revert "Follow-Up Fix Directory Open"
This reverts commit ec787f0134.
2020-07-28 13:53:57 -04:00
Nathan Franke 4c100a593f
Revert "Fix Directory make_dir and make_dir_recursive"
This reverts commit 9b36357544.
2020-07-28 13:53:30 -04:00
Wilson E. Alvarez 993a421333 Show errors on Object.call_deferred
(cherry picked from commit 1cd02ef600)
2020-07-28 00:40:07 +02:00
Rémi Verschelde a2edf04fd2
Merge pull request #40469 from nekomatata/virtual-keyboard-enter-fixes-3.2
[3.2] Fix Return key events in LineEdit & TextEdit on Android
2020-07-26 20:26:02 +02:00
Rémi Verschelde b40f3f9740 Style: Sync other changes from new fix_style.sh and clang_format.sh 2020-07-24 10:39:18 +02:00
Adam Bates b35970b9a5 issue-40396 - Added missing error strings to JSON parsing when array or object is never closed.
(cherry picked from commit 8f84dfa91d)
2020-07-24 10:31:57 +02:00
Nathan Franke 9b36357544 Fix Directory make_dir and make_dir_recursive
(cherry picked from commit 210ccb3a75)
2020-07-24 10:31:57 +02:00
Aaron Franke 3ab5183ffa
[3.2] Backport core documentation changes to 3.2
Also add AABB.abs()
2020-07-21 21:22:54 -04:00
PouleyKetchoupp c0b394572f Fix Return key events in LineEdit & TextEdit on Android
Depending on the device implementation, editor actions could be
received with different action ids or not at all for multi-line.

Added a parameter to virtual keyboards to properly handle single-line
and multi-line cases in all situations.

Single-line:
Input type set to text without multiline to make sure actions are sent.
IME options are set to DONE action to force action id consistency.

Multi-line:
Input type set to text and multiline to make sure enter triggers new lines.
Actions are disabled by the multiline flag, so '\n' characters are
handled in text changed callbacks.
2020-07-17 18:25:40 +02:00
Fabio Alessandrelli 468a1c0271 UDPServer handles PacketPeerUDP-client association
UDPServer now uses a single socket which is shared with the
PacketPeerUDP it creates and has a new `poll` function to read incoming
packets on that socket and delivers them to the appropriate peer.
PacketPeerUDP created this way never reads from the socket, but are
allowed to write on it using sendto.

This is needed because Windows (unlike Linux/BSD) does not support
packet routing when multiple sockets are bound on the same address/port.

(cherry picked from commit 147bbe2155)
2020-07-15 12:48:18 +02:00
Rémi Verschelde a06ee5e763 PO loader: Fix unclosed files and error messages
Fixes #40324.

(cherry picked from commit 47cc202972)

Also removes empty `p_path` as done in 4857648a16.
2020-07-15 12:48:18 +02:00
Andrii Doroshenko (Xrayez) 813fab55d8 Fix overriding compression related settings
(cherry picked from commit 1f73469b50)
2020-07-13 15:15:40 +02:00