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
Chaosus
1dd72dca45
Properly setup seed in RNG
...
(cherry picked from commit 6280be46a6
)
2019-04-03 16:53:30 +02:00
marxin
e3ae29e666
Enable warnings=extra on clang and GCC testers.
...
And remove 2 warnings from warnings=extra.
(cherry picked from commit e7f22ebdcd
)
2019-04-03 16:52:01 +02:00
Rémi Verschelde
bba854bac6
Merge pull request #26851 from RandomShaper/fix-26460-fake-event-flood
...
Fix fake null-motion mouse event flood
2019-03-09 22:40:53 +01:00
Pedro J. Estébanez
f757460ec8
Fix fake null-motion mouse event flood
...
This commit also improves a bit the code quality by making the intent of fake events (and themselves) more explicit.
Fixes #26460 .
2019-03-09 22:04:17 +01:00
Rémi Verschelde
0d728123c6
Merge pull request #26818 from vnen/class_name-inheritance
...
Allow class_name scripts to have nested inheritance
2019-03-09 14:27:43 +01:00
George Marques
25f9aee005
Allow class_name scripts to have nested inheritance
2019-03-09 00:47:27 -03:00
DESKTOP-3H3MR3A\eloisa
b22cf46fdb
Request Android record permission when needed
2019-03-08 12:38:36 -03:00
Rémi Verschelde
201cb8d7ed
Merge pull request #26745 from akien-mga/android-modules-def
...
Define android/modules globally so it appears in Project Settings
2019-03-07 23:06:05 +01:00
Rémi Verschelde
bce56cf337
Fix -Wc++11-extensions warning after #26737
...
Fixes #26769 .
2019-03-07 22:48:00 +01:00
Juan Linietsky
6cb841edcb
Ensure ETC2 textures are ALSO compressed to Po2 when have mipmaps. Fixes #26733
2019-03-07 12:16:20 -03:00
Rémi Verschelde
c74bf2e6b1
Define android/modules globally so it appears in Project Settings
...
Until now people had to add it manually to project.godot to load custom modules.
2019-03-07 11:25:58 +01:00
MidZik
4eccb58bc5
Fixed get_seed() not returning the correct seed.
2019-03-07 02:45:18 -06:00
Rémi Verschelde
c67e9a4dd4
Merge pull request #26665 from bojidar-bg/19704-singleton-constants
...
Fix enums coming from other classes without preload
2019-03-06 18:20:48 +01:00
Juan Linietsky
9b5c6f539b
Safer way to update animation if changed, fixes #26670
2019-03-06 10:22:38 -03:00
marxin
64bce5a24b
Use GCC builtins for bswap as compiler can then emit these via instructions.
...
Using current macros, one get for:
static inline int BSWAP32(int x) {
return ((x << 24) | ((x << 8) & 0x00FF0000) | ((x >> 8) & 0x0000FF00) | (x >> 24));
}
int main(int argc, char **argv)
{
return BSWAP32(argc);
}
main:
.LFB1:
.cfi_startproc
movl %edi, %eax
movl %edi, %edx
sarl $24, %edx
sall $24, %eax
orl %edx, %eax
movl %edi, %edx
sarl $8, %edi
sall $8, %edx
andl $65280, %edi
andl $16711680, %edx
orl %edx, %eax
orl %edi, %eax
ret
while using:
int main(int argc, char **argv)
{
return __builtin_bswap32(argc);
}
one gets:
main:
.LFB0:
.cfi_startproc
movl %edi, %eax
bswap %eax
ret
2019-03-05 22:27:02 +01:00
Bojidar Marinov
9637e42705
Fix enums coming from other classes without preload
...
Fix #19704 , fix #26001
2019-03-05 23:19:02 +02:00
Rémi Verschelde
45e7306b5a
Merge pull request #26629 from bojidar-bg/18386-object-callv-errors
...
Print errors comming from callv
2019-03-05 12:44:01 +01:00
Bojidar Marinov
dadcb33302
Print errors comming from callv
...
Fixes #18386
2019-03-05 12:24:21 +02:00
Hein-Pieter van Braam
80618700ca
Merge pull request #26614 from MarianoGnu/tileset_editor
...
TileSet/TileMap: Decompose solid non-convex polygons into convexes.
2019-03-05 02:02:53 +01:00
Mariano Suligoy
078b869d9a
TileSet/TileMap: Decompose solid non-convex polygons into convexes. Real fix for #24003
2019-03-04 21:03:10 -03:00
Juan Linietsky
ffd44530fb
Make sure ResurceLoader.exists works on imported files, fixes #23555
2019-03-04 21:01:21 -03:00
Juan Linietsky
e653c79ef7
Better warnings when resources can't be saved. Fixes #26531
2019-03-04 11:06:49 -03:00
Rémi Verschelde
b811207406
More style cleanup...
2019-03-04 10:11:29 +01:00
Juan Linietsky
a1e73dcc94
Add support for event accumlation (off by default, on for editor), fixes #26536
2019-03-03 19:53:13 -03:00
Juan Linietsky
a9fe834a8e
Merge pull request #26547 from vnen/gdscript-dependency-parse
...
Add a parse mode for GDScript which doesn't load dependencies
2019-03-03 18:00:12 -03:00
Juan Linietsky
8b4c4d9b2f
Implement a more coherent (and way less hack) way to block animation updates, fixes #24618
2019-03-03 17:57:16 -03:00
Juan Linietsky
ae886a6f32
Ability to keep pumping messages while being debugged, may be a solution for #21431
2019-03-03 17:12:19 -03:00
George Marques
4f0590338f
Add function to get String from FileAccess
2019-03-03 16:51:53 -03:00
Rémi Verschelde
dd5376f9df
Merge pull request #25934 from mrcdk/pool_int_real_color_interpolate
...
Added PoolIntArray, PoolRealArray and PoolColorArray interpolate
2019-03-03 13:30:43 +01:00
Hein-Pieter van Braam
33c6b0ec1a
Scale quickhull tolerance with mesh size
...
Taken from three.js's implementation. Tested with a wide variety of
meshes.
2019-03-01 20:58:39 +00:00
Juan Linietsky
3f681b0681
Clean up blend shape support in GLES2 and GLES3.
2019-03-01 16:01:44 -03:00
Juan Linietsky
a5370b1b1b
-Fix problem of order of import plugins, closes #26340
...
-Ensure resource previewer does not start until first import is done
2019-02-27 14:11:17 -03:00
Rémi Verschelde
372152220b
Merge pull request #26159 from marxin/fix-Wsuggest-attribute=format
...
Fix -Wsuggest-attribute=format warnings.
2019-02-27 09:23:26 +01:00
Rémi Verschelde
426a6fdc17
Merge pull request #26134 from marxin/fix-Wsign-compare
...
Fix -Wsign-compare warnings.
2019-02-27 09:22:47 +01:00
Rémi Verschelde
0ba75c195e
Fix GCC 5 build after #26331 and cleanup style
...
Also cleanup after 01a3dd3
.
2019-02-27 09:01:24 +01:00
marxin
e5f665c718
Fix -Wsign-compare warnings.
...
I decided to modify code in a defensive way. Ideally functions
like size() or length() should return an unsigned type.
2019-02-27 07:45:57 +01:00