Commit graph

2715 commits

Author SHA1 Message Date
Rémi Verschelde 513bfe496c SCons: Add 'split_libmodules' option to workaround linker issue
The new 'split_libmodules=yes' option is useful to work around linker
command line size limitations when linking a huge number of objects.
We're currently over 64k chars when linking libmodules.a on Windows
with MinGW, which triggers issues as seen in #30892.

Even on Linux, we can also reach linker command line size limitations
by adding more custom modules.

We force this option to True for MinGW on Windows, which fixes #30892.

Additional changes to lib splitting:

- Fix linking of the split module libs with interdependent symbols,
  hacking our way into LINKCOM and SHLINKCOM to set the `--start-group`
  and `--end-group` flags.
- Fix Python 3 compatibility in `methods.split_lib()`.
- Drop seemingly obsolete condition for 'msys' on 'posix'.
- Drop the unnecessary 'split_drivers' as the drivers lib is no longer
  too big since we moved all thirdparty builds to modules.

Co-authored-by: Hein-Pieter van Braam-Stewart <hp@tmm.cx>
(cherry picked from commit c320a82213)
2020-01-06 12:52:07 +01:00
Ignacio Etcheverry 1d952f8d69 C#: Throw NullReferenceException for null NodePath/RID params
(cherry picked from commit 008769aee9)
2019-11-29 16:02:02 +01:00
Rémi Verschelde 4b855aa88e
Merge pull request #33692 from JoshLee0915/3.1MonoHeadlesBuildFix
Added server platform to mono config script
2019-11-19 09:49:13 +01:00
Rémi Verschelde 473e3665ff Bump version to 3.1.2-rc 2019-11-12 14:29:41 +01:00
Ignacio Etcheverry 8b4eea3d6d Mono: Don't use project settings for debugger agent on exported games
(cherry picked from commit 5ff4e0516b)
2019-11-12 14:28:13 +01:00
Hugo Locurcio 41d0e46f2d Always use lists for LIBS in SCons
This closes #31288.

(cherry picked from commit 05daf5c78b)
2019-11-12 13:09:36 +01:00
Rémi Verschelde 229892c40b GDScript: Improve error on Object to Object invalid argument calls
Fixes #27804.

(cherry picked from commit 6750e1b3cd)
2019-11-12 13:09:35 +01:00
Geequlim 6c71289432 Fix parse error when extends from subclass of named classes
(cherry picked from commit ebcfe28475)
2019-11-12 11:43:11 +01:00
thomas.herzog 2514594a45 [GDNative] fix godot_variant_evaluate function
Fixes #28984

(cherry picked from commit c1e733466b)
2019-11-12 11:40:17 +01:00
Swarnim Arun 949e1da462 Fix history state setup in VisualScript
(cherry picked from commit 7155477caa)
2019-11-12 11:38:51 +01:00
RameshRavone ffab947e1c NULL global_tag for non exposed classes
(cherry picked from commit 71808b38bc)
2019-11-12 11:35:01 +01:00
Jason 2da174c9b4 Resolve: #24682 CSGPolygon - weird end cap
(cherry picked from commit 89a9f4621f)
2019-11-12 11:34:20 +01:00
Frank Secilia 8ee5dc5850 Fix indexing failure in NativeScriptLanguage::unregister_binding_functions.
binding_functions.size() and an instance's binding_data.size() can get out of sync. They sync up when an instance's bindings are requested. When binding functions are registered after creating an instance's bindings, the instance's bindings are out of sync until requested again. If they're never requested, they're never synced.

unregister_binding_functions indexes into binding_data, but only checks that its safe to index into binding_functions. When they're out of sync, indexing fails.

This revision checks that it's safe to index into binding_data.

(cherry picked from commit a4a0e64245)
2019-11-12 11:25:18 +01:00
Fabio Alessandrelli 53eb140cf1 Fix GDNative library resource loading.
Store general properties in ConfigFile too when modifying them.
Additionally set config_file property as internal as it's not editable
from inspector. It also does not appear to get saved in a meaningful way
(saved as Object(ConfigFile, ...))

(cherry picked from commit aecbb330f3)
2019-11-12 11:24:12 +01:00
Bojidar Marinov 2b9c754d1d Fix default values not being read correctly in VS, take two
Fixes #25889.

(cherry picked from commit b291cfde1b)
2019-11-12 11:17:48 +01:00
Ignacio Etcheverry c78c38d817 Mono: Lazily load scripts metadata file
- Only load the scripts metadata file when it's really needed. This way we avoid false errors, when there is no C# project,  about missing scripts metadata file.

(cherry picked from commit 791e1294c3)
2019-11-12 11:12:49 +01:00
mashumafi 717c492eb6 Add setting to exclude addons from script warnings
(cherry picked from commit d7137a6b72)
2019-11-12 11:10:01 +01:00
lupoDharkael ad1e8069d3 GDScript: add variable shadowing warning
(cherry picked from commit 14078fbb82)
2019-11-12 11:09:28 +01:00
Rémi Verschelde a5f4f15510 AudioStreamOGGVorbis: Expose loop and loop_offset as properties
Fixes #11231.

(cherry picked from commit 51d1be5156)
2019-11-12 11:00:33 +01:00
Rémi Verschelde 8067207257 pcre2: Update to upstream version 10.33
(cherry picked from commit 518e23424e)
2019-11-12 08:07:44 +01:00
Fabio Alessandrelli eb29bd988c Update miniupnpc library to latest master
(cherry picked from commit 78907d91f1)
2019-11-12 07:56:46 +01:00
Kaligule 050c4dab00 Add a reference to pow to the description of exp.
This might be especially usefull since godot script doesn't support ** or ^ as operators, so beginners might search for the exponential function, when what they really need is the pow function.

This is exactly what happened to me and since I couldn't find helpfull information in the documentation I had to look it up online, where I found the answer on a helpfull [reddit thread](https://www.reddit.com/r/godot/comments/3mvwz0/how_do_i_do_exponents_in_godot/).

@akien-mga told me how to reference methods here:
godotengine#30909

(cherry picked from commit a2c81a7455)
2019-11-08 15:48:19 +01:00
George Marques 82b15ab469 GDScript: Fix type resolution not being return in some cases
Some situations caused the parser node type to not being update when
trying to resolve the type, returning invalid data and breaking the
parsing when it shouldn't. This patch fix the behavior.

(cherry picked from commit 64d09b7de5)
2019-11-08 15:48:19 +01:00
Michael Alexsander Silva Dias e384d77194 Fix 'GDNativeLibrary' editor being incorrectly opened
(cherry picked from commit 147990cb6d)
2019-11-08 15:48:19 +01:00
Ignacio Etcheverry b6bcd09d7c C#: Fix Color.ToHtml()
(cherry picked from commit 57fe284fe6)
2019-11-08 15:48:19 +01:00
shaderbeast a07d53b262 Mark class_name line as safe in editor
(cherry picked from commit 1e6a52b215)
2019-11-08 15:48:19 +01:00
Cameron Reikes 781006e25a Expression before 'is' may be null
(cherry picked from commit 2339e85b78)
2019-11-08 15:48:19 +01:00
Bojidar Marinov 8112025573 Re-allow indexing on "self" and object types in GDScript
Fixes #25081

(cherry picked from commit e3d05fa42d)
2019-11-08 15:48:19 +01:00
George Marques c9a5ca7ca5 GDScript: Add _ prefix on class name in type compatibility check
This makes sure that the classes internally represented with an
underscore (_) prefix, such as singletons, are still properly checked
for inheritance in the ClassDB.

(cherry picked from commit 05465b9693)
2019-11-08 15:48:19 +01:00
Marcel Admiraal 37f7dcf3bc Call activate function when setting RigidBodyBullet activation state.
(cherry picked from commit 0539023fd4)
2019-11-08 15:48:19 +01:00
Michael Alexsander Silva Dias b7e644bd26 Make 'break' and 'continue' be marked as safe
(cherry picked from commit a8826ad3b8)
2019-11-08 15:48:19 +01:00
Xenoamor 90abe89662 Fix GridMap list text not expanding when palette is resized
This is to close #31304

(cherry picked from commit 69438149f5)
2019-11-08 15:48:19 +01:00
Bastiaan Olij ea3a42c500 Fix self reference issue in core structures for GDNative plugins
(cherry picked from commit bf9a97c2cb)
2019-11-08 15:48:18 +01:00
Ignacio Etcheverry ef92c9740f Make git no longer ignore solution files inside the mono module
(cherry picked from commit 33c0d47273)
2019-11-08 15:48:18 +01:00
Fabio Alessandrelli 53c2e2da50 WebSocketServer now sanitize destination peers.
When relaying messages in multiplayer mode.
Could cause a crash in case a malicious client sends a bogus packet and
for those cases where a peer has just disconnected and a message arrive
from another peer with the disconnected one as destination.

(cherry picked from commit 17be67b8c7)
2019-11-08 15:48:18 +01:00
Fabio Alessandrelli cd0ba31533 Fix WebSocketServer relaying message 2 times.
The WebSocketMultiplayerPeer was relaying the same message two times,
both in _server_relay and _process_multiplayer (which was only supposed
to store the packet, given the server was one of the destination).

_process_multiplayer now only store the packet, and calls _server_relay
which will relay the message to other clients if needed.

(cherry picked from commit d1539db2c6)
2019-11-08 15:48:18 +01:00
Ignacio Etcheverry aa8386c593 Mono: Force preemptive thread suspend mode as a temporary workaround
(cherry picked from commit 5a6070dde3)
2019-11-08 14:01:49 +01:00
Harley Laue 6befb0836e Allow building cvtt with system squish
It looks like the SCsub for cvtt was copied from squish and it left
the `if env['build_squish']:` line intact. This means that using
`scons builtin_squish=no modules/cvtt` would fail and overal builds
would also fail because they'd fail to find `ConvectionKernels.h`

(cherry picked from commit 0fbd00f656)
2019-11-08 14:00:39 +01:00
sheepandshepherd e46f2be4d7 Document GDNativeLibrary
(cherry picked from commit 04dbcd7f5a)
2019-11-08 13:09:55 +01:00
ktksgit eedf4b27a1 Fix crash in PluginScript destructor 2019-11-05 23:30:42 +01:00
Joshlee0915 d51bce47de Added server platform to mono config script 2019-10-30 21:04:18 -06:00
Anish c70a3671b0 Fixes VideostreamGDNative crash on audio_channel=0.
Added an if case to check if the mix_callback exists before running any
of the audio code.

Fixes: #28644
(cherry picked from commit f0757f31a4)
2019-09-26 14:48:53 +02:00
Bojidar Marinov 33b2d65f98 Fix slight issues with autocompletion and member lists in GDScript
Fixes #27152
Fixes #28591

(cherry picked from commit f9d9530902)
2019-09-26 14:48:16 +02:00
Andrii Doroshenko (Xrayez) 9114357bc5 Fix BMP loader to distinguish between compression types
Some of the values in compression enumeration represent uncompressed formats:

https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-wmf/4e588f70-bd92-4a6f-b77f-35d0feaf7a57

This allows the loader to proceed with uncompressed formats.
Note that loading compressed BMP's is still not supported.

(cherry picked from commit 422a8ffe02)
2019-09-26 14:42:51 +02:00
Andrii Doroshenko (Xrayez) f8dce7ade9 Fix BMP loader incorrectly interpreting color table size
Color table should exist for images with bit count <= 8. Importing 16-bit
BMP images could also likely have a color table but they're not currently
supported in Godot.

(cherry picked from commit d5c5aabbf2)
2019-09-26 14:42:13 +02:00
Andrii Doroshenko (Xrayez) 5dd3d3dadf Import 4/1 bit bmp images
Add some sanity checks according to bmp specification.

Read color table and index data within the same scope and
then simply extend the color palette.

This particular implementation has one limitation: not all 4/1 bit images
can be imported as it requires bit unpacking (size dimensions must be
a multiple of 8 for 1-bit and 2 (even) for 4-bit images).

(cherry picked from commit 6484da5721)
2019-09-26 14:41:27 +02:00
Shinryuuji c6ee986f53 Add support for 8bpp bmp files
(cherry picked from commit b9578b8f46)
2019-09-26 14:41:04 +02:00
Vasiliy Makarov d3422f8cf7 Fix pvrtc encoder
Always resize image to square of power2
Enable mipmaps only if original texture has it enabled
Fix #28534, #28541

(cherry picked from commit 4009d26022)
2019-09-24 09:00:46 +02:00
Andrii Doroshenko (Xrayez) f6c0078264 Fix TGA indexed images loaded with flipped color table
This fixes incorrect color table lookup where red and blue channels were flipped.

(cherry picked from commit d0f0f1f1cb)
2019-09-24 09:00:45 +02:00
ShyRed a849625813 Fix missing re-activation of bullet physics sleep feature
Adds the missing option of re-enabling the sleep feature in bullet physics once a body had the sleep feature disabled.

(cherry picked from commit 0877cf6419)
2019-09-24 09:00:45 +02:00