Commit graph

5389 commits

Author SHA1 Message Date
Marcel Admiraal b8fe576355 Ensure KinematicBodies only interact with other Bodies with matching mask. 2021-07-19 17:03:43 +01:00
Rémi Verschelde 855c7c7414
Merge pull request #50566 from reduz/optimize-stringname-usage
Optimize StringName usage
2021-07-19 15:20:25 +02:00
reduz 6631f66c2a Optimize StringName usage
* Added a new macro SNAME() that constructs and caches a local stringname.
* Subsequent usages use the cached version.
* Since these use a global static variable, a second refcounter of static usages need to be kept for cleanup time.
* Replaced all theme usages by this new macro.
* Replace all signal emission usages by this new macro.
* Replace all call_deferred usages by this new macro.

This is part of ongoing work to optimize GUI and the editor.
2021-07-18 21:20:02 -03:00
Yuri Roubinsky 88088f351a Prevents some warnings from appearing in visual scripts 2021-07-18 19:41:51 +03:00
David Snopek 756ed308ee Fix "IDHandler.get_prop is not a function" error when calling some methods on WebRTCDataChannel 2021-07-17 20:03:37 -05:00
Meriipu 1475f617a3 Expose the resource name the client used to the websocket server
This information is exposed to the websocket server through the
client_connected-signal.

example.com/chat?id=10 gives the resource name "/chat?id=10"
2021-07-17 07:48:18 +02:00
Hugo Locurcio 97d8608c7d
Enable range coder compression by default in NetworkedMultiplayerENet
From empirical testing, this seems to provide the best compression
compared to other compression algorithms when used in the
Multiplayer Bomber demo.

Other algorithms may provide better compression ratios for more
complex games, but some compression is probably better than
no compression.

Zstandard was also not very efficient in my testing, so I added
a note in the documentation.
2021-07-16 21:49:02 +02:00
Rémi Verschelde 9427bf3842
Merge pull request #50480 from Faless/js/4.x_ci 2021-07-15 16:20:17 +02:00
Fabio Alessandrelli 3d8acc7a54 [HTML5] Fix build (with module_webxr_enabled=no).
The XR API changed a bit, and it's not just a rename, though probably an
easy update for someone who is qualified :).
2021-07-15 14:37:21 +02:00
Rémi Verschelde 671467b888
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.
2021-07-15 11:48:19 +02:00
Rémi Verschelde 06568bbfdf
Misc cleanup of header includes
Was looking for misuse of module headers without checking that the module is
actually enabled and got carried away...
2021-07-15 00:46:43 +02:00
Tomasz Chabora 1054956461 Document remaining Visual Script classes 2021-07-13 23:43:46 +02:00
Rémi Verschelde 4e4bcbc986
Merge pull request #47604 from christinoleo/master
Separate underscore from grapheme punctuation to enable doubleclick and caret jump over snakecase variables in editor
2021-07-13 19:09:11 +02:00
Rémi Verschelde 8747f25653
Merge pull request #50381 from reduz/implement-disable-classes
Implement the ability to disable classes
2021-07-13 15:31:38 +02:00
Leonardo Christino 8b91828e4f Separate underscore from grapheme punctuation to enable doubleclick and caret jump over snakecase variables in editor 2021-07-13 10:03:26 -03:00
reduz 5ad4f26659 Implement the ability to disable classes
* This PR adds the ability to disable classes when building.
* For now it's only possible to do this via command like:
  `scons disable_classes=RayCast2D,Area3D`
* Eventually, a proper UI will be implemented to create a build config file to do this at large scale, as well as detect what is used in the project.
2021-07-13 09:25:14 -03:00
Rémi Verschelde aab6dc301c
Merge pull request #50086 from Geometror/label-improve-layout-options
Improvements to Label's layout options
2021-07-13 13:10:42 +02:00
Rémi Verschelde fc00a83901
Merge pull request #50262 from nekomatata/convex-hull-simplification
Options to clean/simplify convex hull generated from mesh
2021-07-12 22:15:40 +02:00
Fabio Alessandrelli 97e763dddf [Net] Rename WebRTCMultiplayer to WebRTCMultiplayerPeer. 2021-07-12 16:36:34 +02:00
Fabio Alessandrelli b31e8530b2 [Net] Rename NetworkedMultiplayerENet to ENetMultiplayerPeer. 2021-07-12 16:36:34 +02:00
Fabio Alessandrelli 88d68346ee [Net] Rename NetworkedMultiplayerPeer to MultiplayerPeer. 2021-07-12 16:36:34 +02:00
Fabio Alessandrelli 31142ac3ee [Net] Remove most multiplayer hooks from SceneTree.
Use `multiplayer` or `get_multiplayer()` instead of `get_tree()`.
2021-07-12 15:28:01 +02:00
Yuri Roubinsky f9ab70eb60 Fix creating a new function in visual scripts 2021-07-10 14:45:53 +03:00
Rémi Verschelde ca2fda629f
Merge pull request #50290 from reduz/redo-instance-bindings
Redo how instance bindings work
2021-07-09 23:25:33 +02:00
reduz 4469144891 Redo how instance bindings work
* The harcoded 8 slots are no more and impose limits in the new extension system.
* New system is limitless, although it will impose small performance hit with a mutex.
* Use a token to request the instance binding.

**Warning**: Mono will most likely break as a result of this, will need to be modified to use the new system.
2021-07-08 17:08:12 -03:00
Francois Belair 10429019ad Implement didClose notification in LSP 2021-07-08 11:40:15 -04:00
PouleyKetchoupp 1de995ae99 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.
2021-07-07 12:14:12 -07:00
Rémi Verschelde fa90b6e285
Merge pull request #50162 from Calinou/inspector-hint-allow-ormmaterial3d
Allow using ORMMaterial3D by using BaseMaterial3D as a resource hint
2021-07-06 22:56:06 +02:00
Rémi Verschelde 8771e910e1
Merge pull request #49964 from Calinou/websocketserver-improve-error-reporting
Improve error reporting in WebSocketServer
2021-07-06 13:38:43 +02:00
Rémi Verschelde 5ade46199f
Merge pull request #35847 from raniejade/ranie/fix-api-generator
Fix gdnative api generation for methods that return enums
2021-07-06 13:35:23 +02:00
Hugo Locurcio 58455b18b5
Improve error reporting in WebSocketServer
This should make troubleshooting easier.
2021-07-05 16:35:21 +02:00
Rémi Verschelde ffab3949e3
Merge pull request #50048 from Calinou/remove-travis-code
Remove unused code related to Travis CI
2021-07-05 14:15:24 +02:00
Hugo Locurcio 8f7e1b53ff
Allow using ORMMaterial3D by using BaseMaterial3D as a resource hint
Previously, only StandardMaterial3D could be defined as an alternative
to ShaderMaterial.

This also reorders the CanvasItemMaterial property hints to follow
alphabetical order (which is enforced by the inspector).
2021-07-04 17:49:36 +02:00
Hendrik Brucker 56a8d3f30c Improvements to Label's layout options
- Added options to trim the text in case it overruns
- Added more autowrap modes
- Improved line breaking, which ignores trailing spaces
2021-07-04 16:43:55 +02:00
Fabio Alessandrelli a28d25c441 [Crypto] Delete mbedtls ctx in deconstructor.
Would cause memory leak when the context was `start`ed but not
`finish`ed.
2021-07-03 16:12:55 +02:00
Aaron Franke 2508fd0533
Use PROPERTY_USAGE_NONE instead of 0 for no property usage
Also use const more often.
2021-07-01 14:13:27 -04:00
Pitanov V.V 4da4514b71
Fix GridMap erase Octans 2021-07-02 03:26:26 +10:00
Hugo Locurcio 257a8a337e
Remove unused code related to Travis CI 2021-07-01 18:02:00 +02:00
reduz 37776b2867 Clean up RenderingServer and its bindings
* Rewrote bindings for RenderingServer.
* They are now all up to date.
* Several unused methods and deprecated features were cleaned up.
2021-07-01 09:07:36 -03:00
Rémi Verschelde a02620f3a5
Merge pull request #50009 from reduz/fix-suffixes-and-degrees
Fix editor suffixes and degrees conversion
2021-06-30 18:47:40 +02:00
reduz 75688772b3 Fix editor suffixes and degrees conversion
* Functions to convert to/from degrees are all gone. Conversion is done by the editor.
* Use PROPERTY_HINT_ANGLE instead of PROPERTY_HINT_RANGE to edit radian angles in degrees.
* Added possibility to add suffixes to range properties, use "min,max[,step][,suffix:<something>]" example "0,100,1,suffix:m"
* In general, can add suffixes for EditorSpinSlider
Not covered by this PR, will have to be addressed by future ones:

* Ability to switch radians/degrees in the inspector for angle properties (if actually wanted).
* Animations previously made will most likely break, need to add a way to make old ones compatible.
* Only added a "px" suffix to 2D position and a "m" one to 3D position, someone needs to go through the rest of the engine and add all remaining suffixes.
* Likely also need to track down usage of EditorSpinSlider outside properties to add suffixes to it too.
2021-06-30 12:38:25 -03:00
K. S. Ernest (iFire) Lee 364416ecd8 Remove singleton variable shadowing. 2021-06-30 02:37:20 -07:00
K. S. Ernest (iFire) Lee 90bb560984 Protocol shadows a variable. 2021-06-30 01:25:27 -07:00
Rémi Verschelde 74dc5e27c8
Rename GdNavigationServer to GodotNavigationServer
And rename `gdnavigation` module to simply `navigation`.
2021-06-30 00:35:18 +02:00
reduz 64c925cca6 Improve RID_Owner memory usage
* Ability to allocate empty objects in RID_Owner, so RID_PtrOwner is not needed in most cases.
* Improves cache usage, as objects are now allocated together
* Should improve performance in 2D rendering
2021-06-29 12:28:08 -03:00
Rémi Verschelde 05336adb86
Merge pull request #49905 from pfertyk/issue-46480-image-compress-crashes-godot
Validate image formats, check if resize_to_po2 failed
2021-06-29 12:44:20 +02:00
Rémi Verschelde a24f494861
Merge pull request #49944 from MisoMosiSpy/visual-script-logic-oper-mismatch
Fixes Visual Script node operator mismatch
2021-06-29 11:58:23 +02:00
Dipal M Zambare a0b0f7c4ee Fixes Visual script nodes operator mismatch issue #49943 2021-06-29 15:01:34 +05:30
Rémi Verschelde eb318d3e04
Merge pull request #49966 from Faless/net/4.x_ws_timeout
[Net] Add WebSocketServer handshake_timeout property.
2021-06-29 02:00:00 +02:00
Paweł Fertyk 3dae9993ac Validate image formats, check if resize_to_po2 failed 2021-06-28 21:17:06 +02:00