Commit graph

3793 commits

Author SHA1 Message Date
Rémi Verschelde
4dda00461f
Merge pull request #38011 from madmiraal/fix-csg-3.2
[3.2] Fix multiple issues with CSG module.
2020-04-27 17:05:47 +02:00
Ignacio Etcheverry
8cdcb410e0 Mono/C#: Fix load hook not called for some assemblies on domain reload
(cherry picked from commit f5510262bc)
2020-04-27 10:15:24 +02:00
Ignacio Etcheverry
a98d44f654 C#: Fix always saving copy of csproj even with no changes
This was a regression from 93d7ec8836 (#38110).
Mono's old implementation of Microsoft.Build hardcodes HasUnsavedChanges to
always return true.
This workaround can be reverted once we switch to official Microsoft.Build.

(cherry picked from commit 81f13f6171)
2020-04-27 10:15:07 +02:00
Tom Evans
3bd5fc2e5e Mark assert lines as safe in gdscript
Now calling _reduce_node_type with debugging enabled to determine
if assert line is safe. Part of doing this required the assert line
to be stored away. Now the AssertNode line is being correctly set.
Newlines are now marked safe always

(cherry picked from commit 8dc8833782)
2020-04-27 10:10:20 +02:00
Umang Kalra
94d0f34f70 Fixed the bool _static logic
(cherry picked from commit b192c7d1ac)
2020-04-27 10:09:49 +02:00
Ignacio Etcheverry
6aca932659 C#: Revert marshalling of IDictionary/IEnumerable implementing types
Added marshalling for `System.Collections.Generic.List<T>` and
`System.Collections.Generic.Dictionary<TKey, TValue>`.
2020-04-23 15:36:01 +02:00
Ignacio Etcheverry
dfdb7bdc87 Mono/C#: Fix assemblies being reloaded a second time unnecesarily
(cherry picked from commit c9882e61e2)
2020-04-23 11:34:42 +02:00
Ignacio Etcheverry
cf729f2111 Mono/C#: Allow exporting System.Array of type Godot.Object
(cherry picked from commit 0fec3cb5ed)
2020-04-23 11:17:23 +02:00
Ignacio Etcheverry
317d8decad Mono/C#: Allow debugging exported games
- Include PDB files in exported games.
- Release export templates also allow debugging now.

Right now the only way to enable debugging in exported games is with the  environment variables, which may be cumbersome or not even possible on some platforms.

(cherry picked from commit 71fc87e101)
2020-04-23 11:15:35 +02:00
Ignacio Etcheverry
08f41f474b C#: Save copy of sln and csproj before applying fixes
(cherry picked from commit 93d7ec8836)
2020-04-23 11:14:57 +02:00
Thakee Nathees
95f6bdfa78 GDScript class name existance check enhanced
(cherry picked from commit 62280c3d47)
2020-04-23 11:10:51 +02:00
Thakee Nathees
12c776dba3 line unsafe for indexing with known base type & unkown identifier
(cherry picked from commit 0780ad2800)
2020-04-23 11:10:28 +02:00
Stoofin
243711e77f Pattern bind counts as assignment
Fixes #34697

(cherry picked from commit 44281f233d)
2020-04-23 11:10:06 +02:00
Rémi Verschelde
253fc093b8 DocData: Skip unexposed classes
Properly expose classes that we actually want accessible.

(cherry picked from commit 0ef8bcac4d)
2020-04-21 14:15:34 +02:00
Marcel Admiraal
11b7f050df Fix multiple issues with CSG module.
- Replaces BuildPoly with Build2DFaces, which creates faces as each
  pair of face intersections are processed, instead of trying to create
  them after all the intersections are processed. Ensures that faces are
  merged when possible, and removes degenerate triangles.

- Treats the child as inside the parent when faces are coplanar.

- General clean up of csg.h and csg.cpp.
2020-04-19 14:32:45 +01:00
Rémi Verschelde
cb1366f006 Mono: Fix include for Android support
This was a typo in #37153.

Co-authored-by: Ignacio Etcheverry <ignalfonsore@gmail.com>
(cherry picked from commit 408fab8442)
2020-04-18 22:02:07 +02:00
Nico Mitchell
616d106247 Change round return type to float
(cherry picked from commits c2ffaf5b2b
and f7cc2b090c)
2020-04-16 12:57:21 +02:00
Thakee Nathees
3d69fe95e5 autocomplete for disconnect, is_connected implemented
(cherry picked from commit efe90fce01)
2020-04-16 12:47:19 +02:00
lupoDharkael
c0047023e6 NoiseTexture: prevent race condition because of Ref::unref()
(cherry picked from commit 1f0f0b8cea)
2020-04-16 12:47:18 +02:00
Thakee Nathees
3658f7127e := fails on some nodes fix: #37357
(cherry picked from commit bdd7048cb5)
2020-04-16 11:46:23 +02:00
Ignacio Etcheverry
445f1c6e7b Mono/C#: Add iOS support
Right now, games only work on devices when exported with FullAOT+Interpreter.
There are some issues left that need to addressed for FullAOT alone. Right now,
it's giving issues with the Godot.NativeCalls static constructor.
2020-04-14 18:03:10 +02:00
Ignacio Etcheverry
6b38fe691a Mono/C#: Fix MinGW build not supporting .lib libraries
MinGW should support both its own format `.a` and MSVC's format `.lib`, but Mono's module was only using the former. With this change it's now possible to build with MinGW and link the official Mono for Windows which is built with MSVC.
2020-04-14 18:03:10 +02:00
Thakee Nathees
df87601c88 Fix for loop range bug: #37358
(cherry picked from commit 0b5bad78c0)
2020-04-06 20:58:21 +02:00
Hugo Locurcio
dd4569f15c Remove syntax highlighting for C# verbatim strings due to bugs
This closes #32336.

(cherry picked from commit 49efd6093e)
2020-04-06 18:18:38 +02:00
Thomas ten Cate
c2469d0c6d Add missing docs for assert message in GDScript
Seems like this was overlooked in PR #31142. See also issue #17082.

(cherry picked from commit 4c3c73ef9c)
2020-04-06 18:17:59 +02:00
Ivan.Shakhov
66e4c8be23 fix RiderPathLocator - searching for toolbox on Mac
(cherry picked from commit dc16b8742a)
2020-04-06 18:15:20 +02:00
Ignacio Etcheverry
bda993dd79 C#: Fix uses of old Configuration names
(cherry picked from commit 66c0b7ce98)
2020-04-06 18:14:07 +02:00
Rajat Goswami
19e71f94d8 Adding missing include guards to header files identified by LGTM.
This addresses the issue godotengine/godot#37143

(cherry picked from commit 2ecf928ae3)
2020-03-25 11:38:54 +01:00
Rémi Verschelde
bdde501594 opus/vorbis: Remove dead code not used since 3.0
Since the new audio system in 3.0 we switched the OGG support to
stb_vorbis, and the Opus stream support was disabled as incompatible
(see #7496).

We still build the libraries as they are needed by the theora and webm
modules, but we don't need any Godot code apart from `register_types`.

Fixes #7496.

(cherry picked from commit 7f6b62cef0)
2020-03-25 11:38:54 +01:00
Andrii Doroshenko (Xrayez)
8fedcfbed2 Generate command line help text for mono module
(cherry picked from commit 94b6c1363c)
2020-03-25 11:38:54 +01:00
Ivan.Shakhov
9d0518cf80 Fix warning: Property not found: mono/editor/editor_path_optional (#36995)
(cherry picked from commit 05946be2f1)
2020-03-25 11:38:54 +01:00
Ignacio Etcheverry
d46fcbb16a C#: Replace uses of old Configuration and update old csprojs
(cherry picked from commit 1b634785b5)
2020-03-25 11:38:54 +01:00
Ivan Shakhov
b874e84147 reorder solution configurations + migration
(cherry picked from commit ce01b83c4a)
2020-03-25 11:38:54 +01:00
Thakee Nathees
5798c8135f logic error in gdscript_parser.cpp for-loop-range
there was a logic error in for loop range argument that
check if all of the argument were constants, fixed

(cherry picked from commit bcbcf0f1ea)
2020-03-25 09:45:47 +01:00
Thakee Nathees
40b53bc29a duplicate arguments in a function handled
(cherry picked from commit 5424b626f9)
2020-03-25 09:44:51 +01:00
Rafael Delboni
5736e43fe4 fix: Return only scenes for script owners on LSP completion
Fix: #36680
(cherry picked from commit 2f08f4ef4e)
2020-03-25 09:44:09 +01:00
Rafael Delboni
ecfe9c24a2 Improve LSP completion using scene owner
Fixes: #36473

(cherry picked from commit 06bce137e3)
2020-03-25 09:43:49 +01:00
Oliver Frank
41500249e3 Fix crash after closing a GDScript LSP session
(cherry picked from commit ed482f6167)
2020-03-25 09:43:28 +01:00
of9
511105be67 Migrating language server from Websockets to raw TCP
(cherry picked from commit 24b27043fe)
2020-03-25 09:43:05 +01:00
Ignacio Etcheverry
d1a5f8dbf2 [3.2] Sync csproj when files are changed from the Godot FileSystem dock 2020-03-18 17:57:45 +01:00
Thakee Nathees
708aab7920 typo in gdscript_workspace.cpp/remove_cache_parser() fixed
(cherry picked from commit 07c99340d1)
2020-03-09 09:51:59 +01:00
Phischermen
69c1805735 Added parameters to Load()
(cherry picked from commit 1b0819bd59)
2020-03-06 23:55:25 +01:00
Rémi Verschelde
98d0bf7d7a assimp: Clean and document buildsystem, prepare for unbundling
- Improve the SCsub to allow unbundling and remove unnecessary code.
- Move files around to match upstream source.
- Re-sync with upstream commit 308db73d0b3c2d1870cd3e465eaa283692a4cf23
  to ensure we don't have local modifications.
- Doesn't actually build against current version 5.0.1 due to the lack
  of the new ArmaturePopulate API that Gordon authored. We'll have to
  wait for a public release with that API (5.1?) to enable unbundling.

(cherry picked from commit 9d8a9ea826)
2020-03-06 23:53:23 +01:00
Rémi Verschelde
4c325c0732 Mono: Fix detection of Apple platforms in build script
(cherry picked from commit 5b040ef2e8)
2020-03-06 23:51:26 +01:00
Ivan Shakhov
88f0cd0b27 On Windows find Rider installed for CurrentUser
(cherry picked from commit c95e20a089)
2020-03-04 12:40:15 +01:00
Raul Santos
447acafa97 Fix missing null check in Mono Binding of GD.print
(cherry picked from commit 6b9c22542f)
2020-03-04 12:40:15 +01:00
Hugo Locurcio
a78bbcf8ce Improve the RegEx class documentation
This closes https://github.com/godotengine/godot-docs/issues/2522.

(cherry picked from commit 5b78f5c464)
2020-03-04 12:40:14 +01:00
Hugo Locurcio
08cb8420f7 Mention the duration parameter unit in UPNP.add_port_mapping()
(cherry picked from commit 810be27c78)
2020-03-04 12:40:14 +01:00
Hugo Locurcio
d679edfa7f Add a practical example for @GDScript.linear2db()
One of its most common applications in games is for volume sliders.

See https://www.dr-lex.be/info-stuff/volumecontrols.html for
more information.

(cherry picked from commit a6fd6b78dd)
2020-03-04 12:40:14 +01:00
Hugo Locurcio
21a45dda7a Improve the @GDScript.inverse_lerp() documentation
This closes https://github.com/godotengine/godot-docs/issues/2589.

(cherry picked from commit 6b5573700b)
2020-03-04 12:40:14 +01:00
Ivan Shakhov
f0b63b47aa use Rider MSBuild on Windows, when Rider is selected as external editor
(cherry picked from commit a9c2ab81cf)
2020-03-04 12:40:14 +01:00
Ivan Shakhov
8337cc5f7d Support toolbox custom "Tools install location", by reading .settings.json
(cherry picked from commit 33af53c1a6)
2020-03-04 12:40:14 +01:00
Rafał Mikrut
d001ca320d Fix suspicious | and + operators
(cherry picked from commit d0621b954b)
2020-03-04 12:40:14 +01:00
Phischermen
c75459ac95 Enabled concave collision detection with Areas in Bullet.
(cherry picked from commit 2c01cf54f8)
2020-03-04 09:51:15 +01:00
Fabio Iotti
45248fb0ec Fix OGG audio loops
(cherry picked from commit 4f8d1c47b8)
2020-03-04 09:50:21 +01:00
clayjohn
2c0d391c48 Force mipmaps off when importing RGBA4444 textures 2020-02-29 19:23:56 -08:00
Fabio Alessandrelli
3a73c3f260 Add documentation for new DTLS features. 2020-02-25 11:40:17 +01:00
Fabio Alessandrelli
5e721d07a3 NetworkedMultiplayerENet dtls support. 2020-02-25 11:35:47 +01:00
Fabio Alessandrelli
35a9f0fe64 New PacketPeerDTLS and DTLSServer classes.
Custom instance implementation via the mbedtls module.
2020-02-25 11:35:47 +01:00
Fabio Alessandrelli
dbbd836931 Move mbedlts print func to SSLMbedTLSContext. 2020-02-25 11:35:47 +01:00
SkyJJ
0c53718e7b Add abort mechanism when invoking EditorNavigationMeshGenerator::bake in-game 2020-02-23 02:43:17 +01:00
Fabio Alessandrelli
50763ecac4 Fix EMWSClient::get_connection_status(), try catch
(cherry picked from commit ebeeb67224)
2020-02-18 14:20:34 +01:00
Hugo Locurcio
a083fcc109 Improve error explanations related to NetworkedMultiplayerENet
(cherry picked from commit 61bf5bf73f)
2020-02-18 14:16:53 +01:00
Hugo Locurcio
6edb5ac9e9 Optimize the editor icon generation
Icons are no longer upsampled when using an integer editor scale.
This makes some icons slightly less crisp, but the icons themselves
can be adjusted to mitigate this. When using a non-integer editor
scale setting, upsampling is kept as it improves crispness in a
far more visible manner.

When upsampling is disabled, this speeds up the theme generation
by about 100 ms on average, making the project manager and editor
start slightly faster. This also speeds up switching between themes.

(cherry picked from commit 9e3393a624)
2020-02-14 16:14:56 +01:00
Yuri Roubinsky
74f3fbf7ef Fix VisualScriptClassConstant to be updated properly
(cherry picked from commit 386d0fe988)
2020-02-14 16:12:09 +01:00
Yuri Roubinsky
61901bd7cc Fix GlobalConstant/BasicTypeConstant return type in visual scripts
(cherry picked from commit c19933eec4)
2020-02-14 16:11:54 +01:00
Rémi Verschelde
57de8397b2 Fix Mono check for unsafe object references
(cherry picked from commit 09534e2922)
2020-02-14 16:10:06 +01:00
geequlim
57151c5e31 Fix hover symbol content position
(cherry picked from commit 03d2d01082)
2020-02-14 16:08:14 +01:00
Raul Santos
0fb35401d4 Avoid going out of bounds in IsSubsequenceOf
Closes #35598

(cherry picked from commit 4b79ef5ebe)
2020-02-14 16:03:18 +01:00
Rémi Verschelde
ac63e5d613 Workaround WebM playback bug after AudioServer latency fixes
af9bb0ea15 fixed AudioServer's
`get_output_delay()` (which used to always return 0) while renaming it
to `get_output_latency()`. It now returns the latency from the
AudioDriver, which can be non-0.

While this was a clear bugfix, it broke playback for WebM files without
audio track. It seems like the playback code, even though it queried
the output delay to calculate a time compensation, was designed to work
even though the delay value was actually bogus. Now that it's correct,
it's not working.

As a workaround we comment out uses of the output latency, restoring
the behavior of Godot 3.1.

This code should still be reviewed by someone more versed in video
playback and fixed to properly account for the non-0 driver latency.

Fixes #35760.

(cherry picked from commit da411d1625)
2020-02-14 16:02:34 +01:00
Aaron Franke
9a396a4e07 [Mono] Basis/Transforms Array operator comments and improvements
The behavior for Basis and Transform2D is unchanged, and Transform gets new behavior. All of the behavior is identical to GDScript's behavior. 

(cherry picked from commit 0a39c7b354)
2020-02-14 15:53:59 +01:00
Hugo Locurcio
a45aa3a46f Implement zooming using Ctrl + Mouse wheel in the GridMap editor
The minimum value of the slider was changed to 0.2 as zooming
works in increments of 0.2. This way, the value can go back to 1
after you've reached the slider's minimum value.

(cherry picked from commit 4c1b2171b0)
2020-02-14 15:52:21 +01:00
Hugo Locurcio
1898240af8 Increase the maximum number of octaves in OpenSimplexNoise to 9
An error message is now printed when trying to set the number of octaves
above the maximum allowed value.

The magic constant was also replaced with a define that can be
easily changed.

This closes #28714.

(cherry picked from commit 13622d40fc)
2020-02-06 13:02:08 +01:00
Fabio Iotti
5765154ff2 Fix empty audio infinite loop
(cherry picked from commit 5ed4ad81c3)
2020-02-06 13:02:07 +01:00
Fabián L
04cfcb3ba0 Fixed GetNodeOrNull<T>
GetNodeOrNull<T> was using GetNode instead of GetNodeOrNull

(cherry picked from commit f595486076)
2020-02-06 13:02:07 +01:00
Francois Belair
f6968d5f17 Fix static functions loop using class' functions
Besides being incorrect, it also caused a hard editor crash for purely
static classes or classes with more static functions than methods.
2020-01-28 14:19:09 -05:00
Fabio Alessandrelli
a48d0b5eef Disable Nagle's algorithm for WebSocket TCP.
This should greatly decrease latency for the most common use cases.
A new function WebSocketPeer::set_no_delay will allow to configure it if
so desired.
2020-01-28 14:10:46 +01:00
Rémi Verschelde
f0f0f38d1a
Merge pull request #35516 from Faless/ws/fix_latency_32
Lower WebSocket latency, fixes.
2020-01-26 19:03:00 +01:00
Rémi Verschelde
4cee1cda5e
Merge pull request #35589 from akien-mga/doc-drop-category-property
doc: Drop unused 'category' property from header
2020-01-26 16:34:13 +01:00
Rémi Verschelde
09ced94dd4 doc: Do not expose Variant::NIL as a type in the class reference
Fix signals Variant arguments incorrectly listed as Nil.

Fixes #12520.
2020-01-26 16:08:11 +01:00
Rémi Verschelde
2d20fc39aa doc: Drop unused 'category' property from header
We already removed it from the online docs with #35132.

Currently it can only be "Built-In Types" (Variant types) or "Core"
(everything else), which is of limited use.

We might also want to consider dropping it from `ClassDB` altogether
in Godot 4.0.
2020-01-26 16:02:39 +01:00
Rémi Verschelde
fe26e53065
Merge pull request #35581 from akien-mga/doc-color-constants
doc: Document named color constants
2020-01-26 13:36:44 +01:00
Rémi Verschelde
cbdbfb00ca doc: Document named color constants
Busywork but it's good for our completion rate :)
2020-01-26 12:08:16 +01:00
Rémi Verschelde
bb6c0d3e8b doc: Complete documentation for VideoStreams
Also quick clean up of the matching C++ files.
2020-01-26 11:29:07 +01:00
Rémi Verschelde
139ff35e76
Merge pull request #35567 from Xrayez/doc-noise-null-data
Mention that `NoiseTexture` uses threads internally
2020-01-26 10:22:26 +01:00
clayjohn
c5700f7464 Complete various class references 2020-01-26 00:27:51 -08:00
Andrii Doroshenko (Xrayez)
5b1c6656d3 Mention that NoiseTexture uses threads internally
Provided a snippet on how to properly retrieve the noise texture data
given that it's generated in a thread.
2020-01-26 02:40:09 +02:00
Rémi Verschelde
c96f08dc86
Merge pull request #35527 from neikeq/issue-35259
Mono/C#: Fix _update_exports possible crash with Reference types
2020-01-24 21:51:57 +01:00
Rémi Verschelde
75ab07546b
Merge pull request #35524 from neikeq/issue-35496
Fix C# preprocessor infinite loop and incorrect parsing of `#if!`
2020-01-24 21:51:38 +01:00
Ignacio Etcheverry
966a126186 Mono/C#: Fix _update_exports possible crash with Reference types
The code was attempting to dynamic cast the native instance to Reference after
the managed instance was disposed. As the managed instance acts as a Ref,
the native instance was freed during that disposal.
This made the dynamic cast fail and we attempted to memdelete a second time.

The fix is to make the dynamic cast before disposal.
2020-01-24 18:28:40 +01:00
Ignacio Etcheverry
0604b1839d Fix C# preprocessor infinite loop and incorrect parsing of #if! 2020-01-24 17:53:17 +01:00
Fabio Alessandrelli
5bd9f14ad9 Lower WebSocket latency, fixes.
WSLPeer now tries to flush packet queue after put_packet call.
WSLServer::listen correctly returns TCP_Server::listen return value.
2020-01-24 14:50:53 +01:00
Hugo Locurcio
a002b93d86
Add explanations for errors related to Vector/Quat normalization 2020-01-24 14:19:23 +01:00
Rémi Verschelde
55f580b24a
Merge pull request #35491 from neikeq/issue-35450
Mono/C#: Lighten up unsafe reference checks
2020-01-23 23:06:58 +01:00
Ignacio Etcheverry
55b2e58a98 Mono/C#: Lighten up unsafe reference checks
Because of the weird case with multi-threading and ResourceLoader, it can be the case that a resource is GCed while being referenced again in the main thread. In such cases, a new unsafe reference is created before the finalizer thread removes the previous one.
2020-01-23 21:23:32 +01:00
Rémi Verschelde
cadf946863
Merge pull request #35478 from neikeq/issue-32260
Mono/C#: Add setting to include I18N assemblies in the exported game
2020-01-23 18:24:15 +01:00
Ignacio Etcheverry
59ec19d5a8 Mono/C#: Add setting to include I18N assemblies in the exported game 2020-01-23 17:47:09 +01:00
Rémi Verschelde
b75fff5a56
Merge pull request #35473 from neikeq/default-to-net47
Mono/C#: Default to net47 for new projects
2020-01-23 17:23:33 +01:00
Ignacio Roldán Etcheverry
8dc7f3960c
Merge pull request #35472 from neikeq/issue-35448
Mono/C#: Add Basis.Slerp, update Quat.Xform and add some math checks
2020-01-23 16:21:09 +01:00
Ignacio Etcheverry
82b0899e54 Mono/C#: Add Basis.Slerp, update Quat.Xform and add some math checks 2020-01-23 16:13:28 +01:00