Commit Graph

4415 Commits

Author SHA1 Message Date
PouleyKetchoupp f101349225 Fix applied rotation from moving platforms in move_and_slide
When synchronizing KinematicBody motion with moving the platform using
direct body state, only the linear velocity was taken into account.

This change exposes velocity at local point in direct body state and
uses it in move_and_slide to get the proper velocity that includes
rotations.
2021-08-09 12:04:57 -07:00
Fabio Alessandrelli ef43d95897 [Net] Add "dtls_hostname" property to ENet.
Used to specify the expected "CN" in the server certificate if different
from the server address.
2021-08-09 15:50:52 +02:00
Rémi Verschelde a418d09617
Merge pull request #51166 from RandomShaper/fix_can_reset_3.x 2021-08-09 09:19:25 +02:00
Rémi Verschelde 030bdc5a41
Merge pull request #51325 from raulsntos/fix-msbuild-exception-3.x
[3.x] Ensure MSBuildPanel buttons are instantiated
2021-08-07 12:19:43 +02:00
Raul Santos dd9c07ee46 Ensure MSBuildPanel buttons are instantiated 2021-08-06 22:32:54 +02:00
Francois Belair 6db17a523e Fix LSP completion crashing on sceneless scripts 2021-08-06 15:31:04 -04:00
Yuri Sizov fcbe5a3fde Add theme item descriptions to the online documentation 2021-08-06 18:20:51 +03:00
31 659b89c615
Fix 'script_class' null access when reloading a deleted C# script
(cherry picked from commit 6fd2edddc0)
2021-08-06 13:03:03 +02:00
Rémi Verschelde 70784f983b
Mono: Remove diagnostics incompatible with 3.x codebase 2021-08-06 12:59:17 +02:00
Francois Belair 1f0fa16a15
Fix LSP parsing get_node only from the scene root
(cherry picked from commit 03f8fa9f62)
2021-08-06 11:45:08 +02:00
Raul Santos 332e31260e
Reduce C# Dictionary internal calls
- Implements new `KeyValuePairs` and `KeyValuePairAt` internal calls
to get the `key` and the `value` in one call.
- Caches the `DictionaryEntry` to reuse properties without repeating
internal calls.

(cherry picked from commit 2deefd938f)
2021-08-06 11:10:04 +02:00
Raul Santos ca32c18458
Add documentation to Dictionary in C#
Adds documentation to `Godot.Collections.Dictionary` in C#.

(cherry picked from commit 0669ffcd15)
2021-08-06 11:09:56 +02:00
Raul Santos 5c206c38f9
Simplify C# print methods
- Extracts the parameters logic to a single method
- Simplify the handling of null parameters

(cherry picked from commit ad460cde79)
2021-08-05 16:35:55 +02:00
Rémi Verschelde 63047093c9
Merge pull request #48616 from Razoric480/lsp-3x-rename
Implement LSP didSave notify and rename request [3.x]
2021-08-04 20:28:16 +02:00
Yuri Sizov 3857fd5ceb Fix the editor theme application for the Mono build log 2021-08-03 22:11:33 +03:00
Rémi Verschelde d38180b20f
Merge pull request #51208 from Chaosus/vs_cleanup_warnings_3.x
[3.x] Prevents some warnings from appearing in visual scripts
2021-08-03 11:08:00 +02:00
Yuri Roubinsky 96f957f93b [3.x] Prevents some warnings from appearing in visual scripts 2021-08-03 11:27:45 +03:00
Rémi Verschelde f5836b40d4
doc: Use self-closing tags for `return` and `argument`
For the time being we don't support writing a description for those, preferring
having all details in the method's description.

Using self-closing tags saves half the lines, and prevents contributors from
thinking that they should write the argument or return documentation there.

(cherry picked from commit 7adf4cc9b5)
2021-08-03 10:20:19 +02:00
Haoyu Qiu 812076baf6
Validates VisualScript.add_node input node
(cherry picked from commit 0ca38ffe76)
2021-08-03 09:33:25 +02:00
Haoyu Qiu f4208ad1e8
Do nothing when dragging CSGBox handle perpendicular to the camera
(cherry picked from commit 0f1e107ede)
2021-08-03 09:33:24 +02:00
K. S. Ernest (iFire) Lee 8f592d50c3
glTF2 fallback load PNG and JPG
(cherry picked from commit ddff1c10c3)
2021-08-03 09:15:34 +02:00
K. S. Ernest (iFire) Lee 6ba37005d1
In glTF2 animations, log spam less when running.
(cherry picked from commit 882f7d9bdf)
2021-08-03 09:15:34 +02:00
K. S. Ernest (iFire) Lee 42ad091738
Make curve interpolate crash less.
(cherry picked from commit d67c5afa95)
2021-08-03 09:15:33 +02:00
Raul Santos ecb973ab02
Use `allowEmpty` parameter in Split
(cherry picked from commit b7a66a820b)
2021-08-03 09:15:33 +02:00
Haoyu Qiu ac04032e95 Fix NetworkedMultiplayerENet client memory leak
The host is not destroyed in some error conditions.
2021-08-03 10:14:14 +08:00
Pedro J. Estébanez d272464e6e Implement inherits_script() for NativeScript and PluginScript
(cherry picked from commit 2dcd064056)
2021-08-02 17:58:04 +02:00
Ignacio Roldán Etchevery e72fdc4b95 C#+iOS: Cache AOT compilater output
Implemented some basic caching to avoid unnecessary AOT compilation
of unchanged assemblies that were already compiled previously.
This reduces iOS export times considerably for subsequent builds
since many dependencies never change, such as framework assemblies
and the Godot bindings.

The AOT compiler asm output and object files are now placed in
`res://.mono/temp/obj/<CONFIG>/godot-aot-cache/` instead of a
temporary directory.
2021-08-02 17:27:47 +02:00
Ignacio Etcheverry 417a69c643 Implement CSharpScript::inherits_script()
(cherry picked from commit 840255a04b)
2021-08-02 15:30:13 +02:00
Pedro J. Estébanez 7426b3fa91 Add Script::inherits_script()
Partial cherry-pick of 5d4dc2d45c.

Co-authored-by: Juan Linietsky <reduzio@gmail.com>
2021-08-02 15:18:30 +02:00
Rémi Verschelde 02967a9c5e
Merge pull request #51037 from winterpixelgames/ws-fix
3.x WebsocketPeer outbound buffer fixes and buffer size query
2021-08-01 11:14:03 +02:00
Jordan Schidlowsky 023548c0a5 Websocket peer outbound buffer fixes. Expose outbound buffered amount. 2021-07-31 19:50:05 -06:00
Haoyu Qiu a3b221e99f Make action names translatable 2021-07-31 22:19:47 +08:00
Rémi Verschelde 9735f2803c
Merge pull request #46800 from The-O-King/normal_compression
[3.x] Implement Octahedral Map Normal/Tangent Attribute Compression
2021-07-30 17:34:47 +02:00
Omar El Sheikh d274284069 Octahedral Normal/Tangent Compression
Implement Octahedral Compression for normal/tangent vectors
*Oct32 for uncompressed vectors
*Oct16 for compressed vectors

Reduces vertex size for each attribute by
*Uncompressed: 12 bytes, vec4<float32> -> vec2<unorm16>
*Compressed: 2 bytes, vec4<unorm8> -> vec2<unorm8>

Binormal sign is encoded in the y coordinate of the encoded tangent

Added conversion functions to go from octahedral mapping to cartesian
for normal and tangent vectors

sprite_3d and soft_body meshes write to their vertex buffer memory
directly and need to convert their normals and tangents to the new oct
format before writing

Created a new mesh flag to specify whether a mesh is using octahedral
compression or not
Updated documentation to discuss new flag/defaults

Created shader flags to specify whether octahedral or cartesian vectors
are being used

Updated importers to use octahedral representation as the default format
for importing meshes

Updated ShaderGLES2 to support 64 bit version codes as we hit the limit
of the 32-bit integer that was previously used as a bitset to store
enabled/disabled flags
2021-07-30 10:29:09 -04:00
lawnjelly e06cd3042f Portals - Fix CSG updates on room conversion
Due to a quirk in CSG Shapes, updating is usually deferred to the next frame. This is problematic as we need to read back the geometry on the first frame when converting levels.

This PR adds a function to CSGShape to force immediate updating (if dirty), and calls it during room conversion.
2021-07-29 12:41:23 +01:00
Aaron Franke 48308a5e0a
Fix CSGSphere3D mesh creation
(cherry picked from commit b2156b22ea)
2021-07-28 15:34:00 +02:00
Rémi Verschelde bcc5250cde
Merge pull request #50914 from Razoric480/3x-lsp-symbolkind-fix
[3.x] Fix LSP reporting wrong types
2021-07-27 13:32:46 +02:00
Raul Santos 9fd201c7a4
Ignore paths with invalid chars in PathWhich
(cherry picked from commit d636ebbfe9)
2021-07-27 12:17:14 +02:00
Raul Santos 2d60a64260
Use Array.Empty instead of allocating a every time
Use `System.Array.Empty<T>` to get an empty array instead of allocating
a new one every time. Since arrays are immutable there is no need to
allocate them every time.

(cherry picked from commit accd05f4ad)
2021-07-27 12:17:09 +02:00
Rémi Verschelde 6a6b6fa5cb
Merge pull request #50827 from Calinou/bakedlightmap-add-bounce-indirect-energy 2021-07-27 10:44:41 +02:00
Gallilus 9342457bcd
Change "Add Preload Node" action to "Add Node(s)"
The action might also drop Custom Nodes

(cherry picked from commit 70a6ff0a71)
2021-07-26 13:36:07 +02:00
Aaron Franke 1180256090
Add documentation to Array in C#
(cherry picked from commit 080f44a3b7)
2021-07-26 13:35:52 +02:00
Raul Santos 6ea8334012
Fix documentation in StringExtensions
(cherry picked from commit ba99387bf3)
2021-07-26 13:35:12 +02:00
Hugo Locurcio 974d3aa9cd
Add a property to control the bounce indirect energy in BakedLightmap
Higher values will make indirect lighting brighter.
A value of 1.0 represents physically accurate behavior, but higher values
can be used to make indirect lighting propagate more visibly when using
a low number of bounces.

This can be used to speed up bake times by lowering the number of bounces
then increasing the bounce indirect energy. Unlike BakedLightmapData's
energy property, this property does not affect direct lighting
emitted by light nodes or emissive materials.
2021-07-25 03:04:40 +02:00
Aaron Franke 17551fe29e
[3.x] Add a simple C# .editorconfig 2021-07-24 16:27:57 -04:00
Francois Belair 02bc1bf355 Fix LSP SymbolKind reporting wrong types
Classes were properties, functions interfaces, etc.
2021-07-24 16:25:47 -04:00
Hugo Locurcio 069281d58f
Improve documentation for GDScript constants
(cherry picked from commit 8ff8c1e5f8)
2021-07-24 00:59:35 +02:00
Rémi Verschelde 48d80b31b1
Merge pull request #50709 from DavidCambre/Improve-and-stramline-VisualScriptFuncNodes-Call-Set-Get
[3.x] Improve and streamline VisualScriptFuncNodes Call Set Get
2021-07-23 13:00:24 +02:00
David Cambré af1ea1800d Improve and streamline VisualScriptFuncNodes Call Set Get
This PR improves and streamlines the workflow for VisualScriptFunctionNodes Call Set Get
Uniform design.
Drag in set-get from tree is now working.
port 'pass' not backported to 3.x to keep script backwards compatibility
2021-07-22 21:13:37 +02:00
Rémi Verschelde ca8e4889eb
Merge pull request #50706 from dsnopek/webrtc-gdnative-version-3.x
Update GDNative API version for changes from #50659 (Godot 3.x)
2021-07-22 12:47:24 +02:00
Rémi Verschelde 5ca46ee1fd
Merge pull request #50696 from DavidCambre/Allow-dropping-custom-node-scripts-in-VisualScript-editor
[3.x] Allow dropping custom node scripts in VisualScript editor
2021-07-22 12:42:06 +02:00
Rémi Verschelde 9178e24d30 Expose visual script custom node type hints 2021-07-21 19:33:10 +02:00
David Snopek a27f4de2ef Update GDNative API version for changes from #50659 2021-07-21 10:30:31 -05:00
David Cambré 968dd73141 Allow dropping custom node scripts in VisualScript editor 2021-07-21 15:01:07 +02:00
David Snopek 5b2dcc5f6b Add get_buffered_amount() to WebRTCDataChannel 2021-07-20 16:52:33 -05:00
David Snopek 1899a3b1ea
Fix "IDHandler.get_prop is not a function" error when calling some methods on WebRTCDataChannel
(cherry picked from commit 756ed308ee)
2021-07-20 13:05:11 +02:00
Rémi Verschelde f8264abb46
Mono: Remove info dialog discouraging use in production
While there are still various bugs to solve and features to implement, the C#
support as of Godot 3.4 is fairly mature and already used by a number of users
in production. Now that we default to dotnet CLI as build tool, it also seems
to be more reliable than MSBuild.

The documentation can (and does for the most part) point out some caveats that
users should be aware of, but this info dialog has outlived its intended
purpose.

(cherry picked from commit 671467b888)
2021-07-20 13:05:04 +02:00
Francois Belair 802bb9c01f Implement LSP didSave notify and rename request 2021-07-17 11:50:17 -04:00
Tomasz Chabora 6021ab5b01
Document remaining Visual Script classes
(cherry picked from commit 1054956461)
2021-07-15 10:46:04 +02:00
Andrea Catania 74e6adda57
Add env.Depends to modules_enabled.gen.h generator
Sometimes scons doesn't detects that a new module is being added. This commit fix it.

(cherry picked from commit b667e72adf)
2021-07-14 23:46:44 +02:00
Rémi Verschelde 875045adde
Use modules_enabled.gen.h to improve inter dependency checks
- Fix build with gdscript module disabled. Fixes #31011.
- Remove unused `gdscript` compile option.
- Fix build with regex module disabled.
- Fix ImageLoaderSVG to forward declare thirdparty structs.

(cherry picked from commit f3726ee994)
2021-07-14 23:36:38 +02:00
Rémi Verschelde cbbea6084d
SCons: Generate header with info on which modules are enabled
We already had `MODULE_*_ENABLED` defines but only in the modules
environment, and a few custom `*_ENABLED` defines in the main env
when we needed the information in core.

Now this is defined in a single header which can be included in the
files that need this information.

(cherry picked from commit b7297fb39c)
2021-07-14 23:09:47 +02:00
Rémi Verschelde 6cff43e093
Merge pull request #50150 from Valeryn4/3.x-fix_lightmap_cpu 2021-07-14 12:19:53 +02:00
Rémi Verschelde aa3a5c9f6a
Merge pull request #50184 from JFonS/cpu_lightmapper_soft_shadows
[3.x] Add soft shadows to the CPU lightmapper
2021-07-14 12:18:08 +02:00
Rémi Verschelde b0b2b7df31
Merge pull request #50257 from Calinou/physicsserver3d-add-set-iterations-3.x
Add a method to set the number of physics solver iterations in 3D (3.x)
2021-07-14 07:56:57 +02:00
PouleyKetchoupp 788db5cf47 Clean convex hull decomposition code
Remove unnecessary conversion between triangle data and vertex data
whenever possible.
2021-07-13 11:13:25 -07:00
Rémi Verschelde 9a04e2afeb
Revert "Fix gdnative api generation for methods that return enums"
This reverts commit aaacc753a7.
2021-07-13 17:02:59 +02:00
Francois Belair 5774098a91
Implement didClose notification in LSP
(cherry picked from commit 10429019ad)
2021-07-13 10:20:02 +02:00
Rémi Verschelde 9d2cbe2c02
Merge pull request #50328 from nekomatata/convex-hull-simplification-3.x
[3.x] Options to clean/simplify convex hull generated from mesh
2021-07-12 22:34:22 +02:00
Hugo Locurcio 9259b4adc4
Add a method to set the number of physics solver iterations in 3D
This is only for GodotPhysics, and adds a 3D counterpart to the 2D
method that was recently added.
2021-07-10 16:29:41 +02:00
PouleyKetchoupp 240c33708c Options to clean/simplify convex hull generated from mesh
Clean: remove duplicate and interior vertices (uses Bullet algorithm)
Simplify: modify the geometry for further simplification (uses VHACD
algorithm)

In the editor, single convex hull now uses the clean option.
Added a new editor entry to create a simplified convex hull, can be
useful for creating convex hull from highly tessellated triangle meshes.

Specific change for 3.x:
Add support for Vector<Vector3> and PoolVector<Vector3> in the convex hull generator.
2021-07-09 17:45:59 -07:00
JestemStefan 9513354f68 Added signed_angle_to for Vector3
Added signed_angle_to method for Vector3

Added signed_angle_to for Vector3

formatting fix...
2021-07-09 12:49:12 +02:00
Hugo Locurcio 4a140294fe
Fix typo in Bullet method name: "collisin" -> "collision"
This method is not exposed to scripting, so compatibility with
existing projects should be preserved.
2021-07-07 22:07:32 +02:00
Hugo Locurcio 37ff524d8c
Improve error reporting in WebSocketServer
This should make troubleshooting easier.

(cherry picked from commit 58455b18b5)
2021-07-06 13:38:54 +02:00
Ranie Jade Ramiso aaacc753a7
Fix gdnative api generation for methods that return enums
(cherry picked from commit 78f55698f2)
2021-07-06 13:36:07 +02:00
Hugo Locurcio 3b11b1022d
Remove unused code related to Travis CI
(cherry picked from commit 257a8a337e)
2021-07-06 11:19:56 +02:00
Fabio Alessandrelli 32e91b232c
[Crypto] Delete mbedtls ctx in deconstructor.
Would cause memory leak when the context was `start`ed but not
`finish`ed.

(cherry picked from commit a28d25c441)
2021-07-06 11:10:47 +02:00
Pitanov V.V d3dab1d06c
Fix GridMap erase Octans
(cherry picked from commit 4da4514b71)
2021-07-06 11:10:45 +02:00
JFonS a2ba7910ba Add soft shadows to the CPU lightmapper
Adds the "light_size" property to Lights. It's only considered in baked
lightmaps for soft shadowing purposes.
2021-07-05 19:02:35 +02:00
Питанов Валера 47b9afa3e9 fix lightmap cpu crashes 2021-07-06 01:45:04 +10:00
Rémi Verschelde e3d48d7e2c
Merge pull request #49999 from kleonc/visual_script_editor-fix-position-when-zooming
[3.x] VisualScriptEditor Fix in graph position calculation (do not skip zoom)
2021-06-29 16:31:27 +02:00
kleonc 3336453dff VisualScriptEditor Fix in graph position calculation (do not skip zoom) 2021-06-29 15:32:16 +02:00
Fabio Alessandrelli 63f6b29f51
[Net] Add WebSocketServer handshake_timeout property.
Allows customization of the maximum time a client is allowed to stay in
the the "pending" state (i.e. awaiting HTTP handshake).

This used to be 1 second by before, the new default is 3 seconds.

(cherry picked from commit 458437edef)
2021-06-29 14:02:23 +02:00
Fabio Alessandrelli 4994b3a99e
[Net] Fix WebSocketClient path parsing.
Recent changes to parse_url caused the client to make invalid HTTP
requests if no path was specified.

(cherry picked from commit d244dda597)
2021-06-29 14:02:23 +02:00
Paweł Fertyk 2676d815ab
Validate image formats, check if resize_to_po2 failed
(cherry picked from commit 3dae9993ac)
2021-06-29 14:02:23 +02:00
Francois Belair 59d72279ae
Translate file path to URI on LSP symbol requests
(cherry picked from commit a56c2e459b)
2021-06-29 13:12:15 +02:00
Umang Kalra 71da90f5bb
Fixes missing descriptions in search window of visualscript
(cherry picked from commit 5e8d31ef0e)
2021-06-29 13:11:47 +02:00
Rafał Mikrut cb5faca39a
Prevent setting too big or too small Collision Mask and Layer 2021-06-27 17:40:07 +02:00
Aaron Franke 85a0345d57
[3.x] Add Quat angle_to method 2021-06-18 11:00:44 -04:00
Marcel Admiraal 7e03bd1671 Remove duplicate WARN_PRINTS macro 2021-06-18 12:57:59 +01:00
Aaron Franke b3ac1669c0
[3.x] Fix C# bindings generator for default value types 2021-06-18 01:07:28 -04:00
kobewi dac54b6db3
Fix GridMap still drawing when Alt+Tabbing
(cherry picked from commit 9fbef6f7db)
2021-06-17 12:47:55 +02:00
Fabio Alessandrelli e05a7a4a4b
[Net] ENet non-relaying server now process broadcasts.
Setting `server_relay = false` prevents the server from letting clients
communicate with each other, but without this fix, the server would also
ignore broadcast packets.
With this change, the server still does not relay messages to other
clients, but will correctly process broadcast messages (and "exclusive"
messages) as if they were directed to just the server.

(cherry picked from commit fc255bde29)
2021-06-17 12:47:55 +02:00
Pedro J. Estébanez 2d1943b8d1
Fix slow load/save of scenes with many instances of the same script
(cherry picked from commit 2ca6b9c610)
2021-06-17 12:47:54 +02:00
Rémi Verschelde 465ab36ddf
Merge pull request #49653 from madmiraal/remove-err_prints-3.x
[3.x] Remove duplicate ERR_PRINTS macro
2021-06-16 17:33:22 +02:00
Marcel Admiraal 5a58516231 Remove duplicate ERR_PRINTS macro 2021-06-16 11:56:25 +01:00
bruvzg d86ccf8309 Fix loading RLE compressed TGA files.
Fix memory reads outside of input buffer when loading invalid TGA files.
2021-06-14 18:51:09 +03:00
Rémi Verschelde c45ce768b1
Merge pull request #47854 from mortarroad/3.x-lossless-webp
[3.x] Implement lossless WebP encoding
2021-06-11 19:35:47 +02:00
Morris Tabor 5de08ef1d6 Implement lossless WebP encoding 2021-06-11 18:48:04 +02:00
Rémi Verschelde 80e1585a6e
Style: Cleanup uses of double spaces between words
Or after punctuation. Tried to leave third-party stuff alone, unless it has
been heavily modified for Godot.

(cherry picked from commit c1c76850cb)
2021-06-07 12:06:59 +02:00