Commit graph

245 commits

Author SHA1 Message Date
Rémi Verschelde
1de51133c9
Merge pull request #60331 from KoBeWi/tween_static() 2022-04-27 13:20:11 +02:00
Fabio Alessandrelli
aee2240d5f [Net] Allow branch-specific MultiplayerAPIs.
Removes custom_multiplayer from Node.
MultiplayerAPI overrides are now set at SceneTree level, and apply to
whole branches.
Impact on performance when using only the default multiplayer or
overriding it is minimal, the use of branches can likely be further
optimized by caching nodes and relevant MultiplayerAPI IDs.
2022-04-26 17:22:54 +02:00
kobewi
3017530e26 Make Tween.interpolate_value() static 2022-04-17 23:13:39 +02:00
bruvzg
9381acb6a4
Make FileAccess and DirAccess classes reference counted. 2022-04-11 13:28:51 +03:00
bruvzg
d1207a0504
[Input] Add extra shortcut_input input processing step to process Unicode character input with Alt / Ctrl modifiers, after processing of shortcuts. 2022-04-05 13:46:45 +03:00
Pierre-Thomas Meisels
63f7f44ccb Make vararg method bind no return and return
Type emit_signal exposed method return type

set UndoRedo add_do_method and add_undo_method exposed return void

Set TreeItem::_call_recursive_bind returns void

Set _rpc_bind and _rpc_id_bind returns void in Node

Set _call_group and _call_group_flags method returns void in SceneTree

Set godot-cpp-test CI flag to false
2022-03-30 11:43:12 +02:00
Markus Sauermann
40c08e522f Revert "Update mouse cursor shape after changes"
This reverts commit 0fce98b4b5.
2022-03-10 09:43:06 +01:00
reduz
21637dfc25 Remove VARIANT_ARG* macros
* Very old macros from the time Godot was created.
* Limited arguments to 5 (then later changed to 8) in many places.
* They were replaced by C++11 Variadic Templates.
* Renamed methods that take argument pointers to have a "p" suffix. This was used in some places and not in others, so made it standard.
* Also added a dereference check for Variant*. Helped catch a couple of bugs.
2022-03-09 18:39:13 +01:00
Markus Sauermann
0fce98b4b5 Update mouse cursor shape after changes
This fixes some cases where the mouse cursor shape did not change automatically, but instead required a MouseMove to update.
2022-03-09 07:54:03 +01:00
kobewi
bc3aff9b46 Various code and documentation improvements 2022-03-05 22:00:35 +01:00
Igor Kordiukiewicz
b870b40d79 Remove files_dropped signal from SceneTree 2022-02-28 07:51:50 +01:00
Rémi Verschelde
0f5455230c
Use switch consistently in _notification (scene folder) 2022-02-15 18:44:55 +01:00
Hendrik Brucker
b396fd4eef Improve compilation speed (forward declarations/includes cleanup) 2022-02-12 02:46:22 +01:00
Fabio Alessandrelli
347d2dfc42 [Net] Move RPC, Node cache out of MultiplayerAPI.
Now uses two interfaces so it can be overridden in the future, and
core no longer depends on Node.

The interfaces are implements in scene/multiplayer.
Replaces root_node with root_path.
Remove all Node references from MultiplayerAPI.
2022-02-05 02:00:23 +01:00
Fabio Alessandrelli
d219547c96 [Net] New replication interface, spawner and synchronizer nodes.
Initial implementation of the MultiplayerReplicationInterface and its
default implementation (SceneReplicationInterface).

New MultiplayerSpawner node helps dealing with instantiation of scenes
on remote peers (e.g. clients).
It supports both custom spawns via a `_spawn_custom` virtual function,
and optional auto-spawn of known scenes via a TypedArray<PackedScenes>
property.

New MultiplayerSynchornizer helps synchronizing states between the local
and remote peers, supports both sync and spawn properties and is
configured via a `SceneReplicationConfig` resource.
It can also sync via path (i.e. without being spawned by a
MultiplayerSpawner if both peers has it in tree, but will not send the
spawn state in that case, only the sync one.
2022-02-04 14:56:30 +01:00
Anilforextra
fc27636999 Vectors: Use clear() and has().
Use clear() instead of resize(0).

Use has() instead of "find(p_val) != -1".
2022-02-02 00:11:09 +05:45
bruvzg
3d79ad6e50
Fix main window title translation. 2022-01-21 15:32:22 +02:00
kobewi
205f56f226 Fix Tween pause behavior 2022-01-09 19:38:18 +01:00
Rémi Verschelde
851fb16350
Merge pull request #56305 from Calinou/rename-lod-threshold 2022-01-04 15:28:06 +01:00
Rémi Verschelde
fe52458154
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
Hugo Locurcio
df09bc38cb
Rename Lod Threshold to Mesh Lod Threshold
This makes it more obvious that the setting only affects mesh LOD,
not manual (H)LOD achieved using visibility ranges.
2021-12-29 00:11:50 +01:00
Nathan Franke
49403cbfa0
Replace String comparisons with "", String() to is_empty()
Also:
- Adds two stress tests to test_string.h
- Changes to .empty() on std::strings
2021-12-09 04:48:38 -06:00
kleonc
23dac24789 Delete objects enqueued for deletion during SceneTree destruction 2021-10-08 16:45:55 +02:00
Hugo Locurcio
570cdc128f
Rename Node's filename property to scene_file_path for clarity 2021-09-30 16:50:25 +02:00
Rémi Verschelde
583eaa9869
Merge pull request #49819 from nekomatata/fix-process-mode-inherit 2021-09-17 19:16:19 +02:00
Rémi Verschelde
195ea41a7a
Merge pull request #51237 from KoBeWi/tween_fix()
Various fixes to Tween code
2021-09-14 10:29:50 +02:00
Rémi Verschelde
8ecc571158
Merge pull request #49063 from Calinou/remove-16x-msaa
Remove 16× MSAA support due to driver bugs and low performance
2021-09-13 17:34:04 +02:00
PouleyKetchoupp
226d6337e5 Fix process mode update when mode owner is set to Inherit
Prevent the root node to be set to PROCESS_MODE_INHERIT, since it causes
undefined behavior.

Fix a case where the process owner node is wrongly set to the direct
parent instead of the proper node.

Add errors for all unhandled cases.
2021-09-06 17:14:12 -07:00
kobewi
f2cb0a8d4b Add Listener2D 2021-08-31 16:53:14 +02:00
Hugo Locurcio
7192852da3
Remove 16× MSAA support due to driver bugs and low performance
In the `master` branch, 16× MSAA caused the entire system to freeze
on NVIDIA GPUs. This is likely caused by graphics drivers not actually
implementing 16× MSAA, but combining 8× MSAA with 2× SSAA instead.

On top of that, modern shader complexity makes 16× MSAA very difficult
to use while keeping a good framerate. 8× MSAA is hard enough to use
as it is.
2021-08-25 07:56:27 +02:00
reduz
5cecdfa8af Entirely removes BIND_VMETHOD in favor of GDVIRTUAL
* `_gui_input`, `_input`, `_unhandled_input` and `_unhandled_key_input` are now regular C++ virutal functions.
* Everything else converted to GDVIRTUAL
* BIND_VMETHOD is gone, always use the new syntax from now on.

Creating `_gui_input` method and using the binder to register events will no longer work, simply override the virtual function now.
2021-08-23 08:10:13 -03:00
Juan Linietsky
1990721d1b
Revert "Add Node processing and physics processing cumulative (as opposed to delta) time" 2021-08-22 08:21:34 -03:00
Mohammad Khashashneh
0c027ef0f1 Add Node processing and physics processing cumulative (as opposed to delta) time. 2021-08-17 21:34:50 +03:00
Aaron Franke
7094ccfbe9
Disable Node3D when compiling without 3D and fix disable_3d option 2021-08-13 08:59:48 -05:00
Hugo Locurcio
7612cff432
Use the Unicode multiplication symbol where relevant 2021-08-12 21:45:33 +02:00
Aaron Franke
339687e04f
Organize methods in Viewport and explicitly name 3D methods with 3D 2021-08-10 09:10:34 -05:00
kobewi
e092a132fe Various fixes to Tween code 2021-08-06 13:07:34 +02:00
Rémi Verschelde
fab3412139
Merge pull request #50899 from akien-mga/refref
Use Ref<T> references as iterators where relevant
2021-07-26 19:45:04 +02:00
Rémi Verschelde
92299989bd
Use Ref<T> references as iterators where relevant
And const when possible.
2021-07-26 19:27:11 +02:00
Aaron Franke
4ecb6fba80
Use doubles for time everywhere in Timer/SceneTree 2021-07-26 02:00:48 -04:00
Rémi Verschelde
ac3322b0af
Use const references where possible for List range iterators 2021-07-25 12:22:25 +02:00
Aaron Franke
4e6efd1b07
Use C++ iterators for Lists in many situations 2021-07-23 17:38:28 -04:00
kobewi
8793ec4564 Show tooltips even when paused or time_scale is 0 2021-07-23 17:49:30 +02:00
Rémi Verschelde
693f9b4e20
Merge pull request #50655 from JFonS/sname_opt
Editor StringName and Viewport optimizations
2021-07-20 21:49:32 +02:00
Joan Fons
a6adb58493 Editor StringName and Viewport optimizations
* Added explicit return type to the SNAME macro.
* Add some extra SNAME usages.
* Change some ClassDB methods to use const StringName & arguments.
* Cache the Window parent in Control because it's used in
  is_layout_rtl(), which is called often.
* Only enable internal processing for viewports that need it.
* Change CanvasItem::group to be a StringName because it's only used as
  that.
2021-07-20 20:35:41 +02:00
Rémi Verschelde
b4baec08cf
Merge pull request #50206 from groud/undoredo_increase_args_count
Increase the number of arguments accepted by UndoRedo methods
2021-07-20 09:50:01 +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
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
Gilles Roudière
2f9a0268dd Increase the number of arguments accepted by UndoRedo methods 2021-07-06 18:52:28 +02:00
Rémi Verschelde
8fb7a9f023
Merge pull request #49719 from LightningAA/rename-node-is-ancestor-of
Rename `is_a_parent_of()` to `is_ancestor_of()`
2021-06-29 12:07:25 +02:00