Commit Graph

2463 Commits

Author SHA1 Message Date
santouits 7ebfb73a4a Hopefully fix the random crashes with threads
(cherry picked from commit 13efc1bb06)
2019-11-12 13:09:35 +01:00
Hein-Pieter van Braam-Stewart 7592b3b9ee Fix a random SSL crash I saw once.
I don't know why this happened, I was debugging another issue. This
should take care of it though.

(cherry picked from commit 64626f682e)
2019-11-12 13:09:35 +01:00
Toshiwo 656f23fde9 when doing Vector3 slerp it is not necessary to have it normalized.
(cherry picked from commit 3aff645114)
2019-11-12 13:09:35 +01:00
Toshiwo b56fa43090 Fix Vector3 slerp method normalizing cross product
(cherry picked from commit 416a7d06de)
2019-11-12 13:09:35 +01:00
Lukas Zanner 7022e02d4d Initialize padding on PoolByteArray serialization
(cherry picked from commit c35f4e8808)
2019-11-12 11:37:57 +01:00
Ibrahn Sahir 6d57ebed1a MessageQueue::flush now always destroys parameters of a spent message
Previously, destructors of Variant parameters were not called if the
target of the message was not found.

(cherry picked from commit 5626a1ec20)
2019-11-12 11:37:32 +01:00
Fabio Alessandrelli 390dbbbcbd Fix Object::get_indexed for simple properties.
Object::get_indexed was not correctly reporting invalid keys if the name
was a direct property (not a subproperty), causing for example Tween to
not report correctly a bad interpolate_property key.

(cherry picked from commit d39ffc101b)
2019-11-12 11:25:58 +01:00
Gilles Roudière dcc9c1cc2a Fix NaN with get_action_strength
(cherry picked from commit 3bfa080c9c)
2019-11-12 11:24:39 +01:00
Fabio Alessandrelli 5c9694bc0d Avoid _can_call_mode resetting error message in MultiplayerAPI
(cherry picked from commit bba77fe387)
2019-11-12 11:20:11 +01:00
Rémi Verschelde 3afd8a374d Locales: Add some missing locale names
(cherry picked from commit 867b96eb71)
2019-11-12 11:17:20 +01:00
Guilherme Felipe 8ef5052967 Add Input::get_current_cursor_shape
[Clean up] Removed unused/unnecessary methods.

(cherry picked from commit 1bae73d7d0)
2019-11-12 11:10:53 +01:00
Christoph Schroeder 0f1704c9e8 Fixes Geometry.segment_intersects_circle working only one way.
(cherry picked from commit dcbe55a1fa)
2019-11-12 11:04:27 +01:00
unknown c563839355 Update zstd to 1.4.3
(cherry picked from commit 61ad365fc9)
2019-11-12 08:09:52 +01:00
TGRCDev ebece65936 Fixed EOF flag not resetting on seek back
(cherry picked from commit c6f7015bca)
2019-11-08 15:48:19 +01:00
Rémi Verschelde b45ec12c8c Translation: Fix logic bug finding match for regional locales
The  match test was inverted. The rest of the changes
are documentation and cleanup.

Fixes #26346 and fixes #31192.

(cherry picked from commit b33042507b)
2019-11-08 15:48:19 +01:00
Rémi Verschelde dbcf3318e1 DirAccessPack: Fix dir_exists and file_exists for res:// paths
Both methods check against containers using relative paths as index,
so the `res://` part needs to be stripped.

Fixes #26009.

(cherry picked from commit ad8746e0de)
2019-11-08 15:48:18 +01:00
qarmin 7823552d9e Fix memory leak in ResourceFormatSaverBinary::save
(cherry picked from commit b244ab4acc)
2019-11-08 15:48:18 +01:00
Ken Paulson f0039bd18b Added TranslationServer::get_loaded_locales to return an array of all locales with a loaded Translation
(cherry picked from commit 6b117c44fb)
2019-09-24 09:00:46 +02:00
hbina085 8c2e10c393 Many fallthrough switch cases now have the FALLTHROUGH macro to tell the compiler that this is intended.
(cherry picked from commit 9f0c6a6009)
2019-09-24 09:00:45 +02:00
Rémi Verschelde fc18d637a8 Fix -Wimplicit-fallthrough warnings from GCC 8
Adds `FALLTHROUGH` macro to specify when a fallthrough is intentional.
Can be replaced by `[[fallthrough]]` if/when we switch to C++17.

The warning is now enabled by default for GCC on `extra` warnings level
(part of GCC's `-Wextra`). It's not enabled in Clang's `-Wextra` yet,
but we could enable it manually once we switch to C++11. There's no
equivalent feature in MSVC for now.

Fixes #26135.

(cherry picked from commit fc370b3feb)
2019-09-24 09:00:45 +02:00
Paul Trojahn af3b157517 Support UTF-8 input action names
Fixes #26380

(cherry picked from commit a7430a9d06)
2019-09-24 09:00:44 +02:00
Fabio Alessandrelli 2a837d525f Add NULL-terminator the string passed to strtol.
This is actually expected by the function although it was apparently
working in GCC without the terminator, it breaks (at least some) clang
versions.

(cherry picked from commit 2f91e250f6)
2019-09-24 09:00:44 +02:00
volzhs 081751172a Support vibration for Android and iOS 2019-08-22 00:05:11 +09:00
Michael Alexsander Silva Dias eef5dc98fa Update some dead links in the codebase
(cherry picked from commit 12ae7a4c02)
2019-07-29 17:47:46 +02:00
Rémi Verschelde 7a97fd99c7 Properly expose all Error constants to scripting languages
(cherry picked from commit 1bf448dd87)
2019-07-29 17:32:54 +02:00
Rémi Verschelde 055f9f075f doc: Proofread and complete various nodes
All 100% completed: MainLoop, Node, Object, Path, Performance,
Reference, Resource, SceneState, SceneTree, UndoRedo.

Also fixed some en_GB occurrences as the reference spelling is en_US.

(cherry picked from commit 867dda1124)
2019-07-29 16:35:23 +02:00
Rémi Verschelde 558e268edd doc: Document EncodedObjectAsID, expose its property
(cherry picked from commit a9cff880d6)
2019-07-29 16:20:25 +02:00
Zak efee888a6e Improved documentation of rsplit Method for String class.
Improved documentation of rsplit Method for String class.

Removed "divisor" (i will also change variants_call.cpp) and added "delimiter" in its place. Also moved the example at the bottom of the description.

(cherry picked from commit 1a397f46e6)
2019-07-29 15:16:59 +02:00
Ignacio Etcheverry 39f1a110a1 Fix wrong method binds and registered class
(cherry picked from commit 2f3328a039)
2019-04-22 21:57:06 +02:00
Juan Linietsky 0064d26517 Some improvements to is_equal_approx, restored Quat operator.
(cherry picked from commit dee98d3b6d)
2019-04-20 23:52:19 +02:00
Juan Linietsky c76c33fb50 Added generator audio stream, and spectrum analyzer audio effect
Made AudioFrame and Vector2 equivalent for casting.
Added ability to obtain the playback object from stream players.
Added ability to obtain effect instance from audio server.

(cherry picked from commit e33764744c)
2019-04-20 23:50:19 +02:00
Chaosus 71753edeae Added normally distributed generation function to RNG
(cherry picked from commit 5f137925dc)
2019-04-20 23:39:04 +02:00
Chaosus 6ab01490f5 Added smoothstep built-in function
(cherry picked from commit 514a3fb96a)
2019-04-20 23:30:56 +02:00
Chaosus 340bf6e80c Added direction_to method to vectors
(cherry picked from commit 55f3bd97a2)
2019-04-20 23:24:35 +02:00
Chaosus 9535a6079e Added functions to AStar for disable/enable points
(cherry picked from commit cc71fb2308)
2019-04-20 23:21:06 +02:00
muiroc 42fa261563 Enable object decoding when serializing binary project settings
(cherry picked from commit 1f54b11da6)
2019-04-20 23:15:08 +02:00
Fabio Alessandrelli e0fe795433 Add object encoding param to serialization methods
Network peers get_var/put_var
File get_var/store_var
GDScript/Mono/VisualScript bytes2var/var2bytes
Add MultiplayerAPI.allow_object_decoding member which deprecates PacketPeer.allow_object_decoding.

Break ABI compatibaility (API compatibility for GDNative).

(cherry picked from commit 393e62b98a)
2019-04-20 23:15:02 +02:00
Fabio Alessandrelli a1ad05df86 Multiplayer API now respects allow_object_decoding
Add doc about allow_object_decoding in PacketPeer

(cherry picked from commit 53ab3a1ba9)
2019-04-20 23:14:54 +02:00
Fabio Alessandrelli ffc47d6fbe Use same boolean for objects encode and decode.
In a very unintuitive move encode needed false to encode an object,
decode needed true to decode it.
They now need the same value: `true`.

(cherry picked from commit e61a074a8e)
2019-04-20 23:14:47 +02:00
marxin c33a924c28 Fix new GCC 9 warnings: -Wdeprecated-copy.
(cherry picked from commit 6be77da7eb)
2019-04-20 22:04:25 +02:00
Hein-Pieter van Braam-Stewart 650c8512cd Object::script may not be a valid Ref<Script>
It appears that Object::script may be a valid ScriptInstance but not be
castable to Ref<Script>. There were only 5 places in the code that made
this assumption. This commit fixes that.

(cherry picked from commit 20b0046945)
2019-04-20 20:30:30 +02:00
Rémi Verschelde 01b39be9e6 Compression: Set Zstd max window size via public parameter
`ZSTD_DCtx_setMaxWindowSize` is still part of the experimental API
(thus unexposed in the shared library). Upstream examples seem to
use `ZSTD_d_windowLogSize` instead, so it's probably what we should
use too.

Fixes #17374.
Distro packagers can now unbundle Zstd.

(cherry picked from commit 20265879e2)
2019-04-20 20:29:45 +02:00
Ignacio Etcheverry 3445984901 Replace a few #if/#elif with #ifdef and "#elif defined"
(cherry picked from commit ad2127a3e8)
2019-04-20 20:13:07 +02:00
Andrii Doroshenko (Xrayez) 4574894e43 Reorder reverse caps characters table for string lower case conversion
The binary search algorithm used to lookup character codes in the table
relies that the data must be ordered. This fixes `to_lower()` string
method to convert upper case to lower case properly, so that the
algorithm doesn't terminate prematurely.

Co-authored-by: AndreevAndrei (avandrei) <avandrei@MacBookAAV.local>
(cherry picked from commit 34e6737413)
2019-04-20 20:02:45 +02:00
Rémi Verschelde b5d9099626 Revert "Properly setup seed in RNG"
This reverts commit 1dd72dca45.
As pointed out in #27171, it would break compatibility with 3.1.0.
2019-04-09 09:36:31 +02:00
PouleyKetchoupp e8e57c49de Fixed Transform FLIP_Y and FLIP_Z set as identity transform
(cherry picked from commit 8828385792)
2019-04-06 21:14:04 +02:00
Rémi Verschelde fd3845cdad Revert "Properly explain RPC/RSET mode failure."
This reverts commit 24b049ec9e.
It introduced regressions, see #27655.
2019-04-05 18:18:37 +02:00
Fabio Alessandrelli 24b049ec9e Properly explain RPC/RSET mode failure.
_can_call_mode used to call is_network_master/get_network_master
internally.
This would reset any potential last error set via ERR_EXPLAIN,
preventing it from being displayed correctly.
_can_call_mode now expects the node master ID to be passed instead.

(cherry picked from commit 95ad747dea)
2019-04-04 12:40:59 +02:00
marxin 4889c65922 Fix -Wnon-virtual-dtor warnings.
Example of the warning:
./core/script_language.h:198:7: warning: 'class ScriptCodeCompletionCache' has virtual functions and accessible non-virtual destructor [-Wnon-virtual-dtor]

(cherry picked from commit f9f2413e69)
2019-04-03 17:01:04 +02:00
Marcelo Fernandez 37c97d09e6 Fix MIDI Note Off missing on some devices
(cherry picked from commit ea0c398a19)
2019-04-03 16:53:47 +02:00