Commit Graph

5334 Commits

Author SHA1 Message Date
6583797305 [Debugger] Move servers-related behaviours to ServersDebugger.
Forcing draw during debug break is now handled by ServersDebugger, and
only happens when the proper message is sent from the EditorDebugger
("servers:draw").
In a similar way, briging the window in foreground is now also handled
by ServersDebugger upon receiving "servers:foreground" which is sent by
the EditorDebugger when resuming from a break ("continue").
2022-02-06 17:36:48 +01:00
87f4bbd668 [Debugger] Move most profilers to ServersDebugger.
Also splits bandwidth/rpc profiler (RPCProfiler is now in
SceneDebugger).
2022-02-06 17:36:48 +01:00
789e648f4d [Debugger] New extensible EngineProfiler class.
Uses GDExtension, replaces old Callable system for profilers, and is
also used internally.
2022-02-06 17:33:45 +01:00
8c7268664d Fix integer vector mul/div operators and bindings.
* Vector2i and Vector3i mul/div by a float results in Vector2 and Vector3 respectively.
* Create specializations to allow proper bindings.

This fixes #44408 and supersedes #44441 and keeps the same rule of int <op> float returnig float, like with scalars.
2022-02-06 13:34:41 +01:00
9d1626b4d7 Merge pull request #57017 from godotengine/string-name-static-false-unclaimed 2022-02-05 20:26:34 +01:00
bd32dd4a48 Merge pull request #56943 from V-Sekai/override-import
Make add_importer and add_post_importer_plugin override existing importers.
2022-02-05 19:50:37 +01:00
5f42e0d0ab Merge pull request #57646 from Faless/mp/4.x_interfaces
[Net] Move RPC, Node cache out of MultiplayerAPI.
2022-02-05 18:26:04 +01:00
eac1883791 Merge pull request #57657 from lawnjelly/err_macros_flush
Add fflush to error macros
2022-02-05 16:08:41 +01:00
9963c4f0d3 Add fflush to error macros
CRASH_NOW macros would previously crash before outputting any error messages. This PR ensures calling fflush for stdout before terminating.
2022-02-05 12:31:54 +00:00
74adf0bf2e Remove RID_Owner.get_rid_by_index
* Implementing this function efficiently is not really possible.
* Replaced by an option to get all RIDs into a buffer for performance.
2022-02-05 11:59:34 +01:00
df1724470d Merge pull request #49775 from fire/faster-cvtt
Faster CVTT by lowering default quality
2022-02-05 10:28:07 +01:00
a0c87d4c11 Merge pull request #57620 from Haydoggo/expression-exp-fix
Fix Expression's parsing of positive exponent literals
2022-02-05 10:14:10 +01:00
1305ff92f7 Make parser treat all exponent literals as float 2022-02-05 16:34:26 +13:00
3acc39095e [Net] Fix bogus FileAccessNetwork deconstructor.
Now correctly erases old instances.
The code will likely need overhaul anyway to be usable.
It doesn't apply to editor runs, there's a bunch of inconsistencies on
how to clients are handled, and I don't really understand why multiple
instances are created for a single client/server.
2022-02-05 03:27:19 +01:00
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
419b342a9a Faster CVTT by reducing quality.
Make BC6 and BC7 CVTT faster while still having better quality than DXT5.
2022-02-04 15:15:26 -08:00
2885befbe6 Merge pull request #55950 from Faless/mp/4.x_replication_nodes 2022-02-04 19:03:10 +01:00
84290fe4b1 Merge pull request #57623 from akien-mga/core-math-struct-em-all 2022-02-04 19:02:57 +01:00
f8eaab5b47 BVH - Sync BVH with 3.x
Templated mask checks and generic NUM_TREES
Fix leaking leaves
2022-02-04 16:51:21 +00:00
5ddb518496 Core: Make all Variant math types structs
Some were declared as structs (public by default) and others as classes
(private by default) but in practice all these math types exposed as
Variants are all 100% public.
2022-02-04 16:48:24 +01:00
e223bad86d Core: Move Vector2i to its own vector2i.h header
Also reduce interdependencies and clean up a bit.
2022-02-04 16:32:21 +01:00
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
5f56d385b0 Core: Move Rect2i to its own rect2i.h header
And take the opportunity to improve interdependencies a bit with forward
declares where possible.
2022-02-04 14:17:30 +01:00
244db37508 Cleanup and move char functions to the char_utils.h header. 2022-02-04 11:35:01 +02:00
b68db2f98a Merge pull request #57571 from Haydoggo/improved-expression 2022-02-04 09:30:50 +01:00
018de19eba Added hex and bin literal support to Expression parser
fixed formatting
2022-02-04 10:49:19 +13:00
f8f19b313d Merge pull request #57562 from AnilBK/string-add-contains
String: Add contains().
2022-02-03 22:21:24 +01:00
adbe948bda String: Add contains(). 2022-02-04 01:28:02 +05:45
7191605324 Merge pull request #57587 from bruvzg/gde_fix_ptr_and_enum_returns
[GDExtension] Fix registration of functions with enum or native pointer return type.
2022-02-03 20:36:59 +01:00
bf0253bab9 Merge pull request #56764 from madmiraal/fix-45592-2 2022-02-03 18:10:30 +01:00
ddd96b3059 [GDExtension] Fix registration of functions with enum or native pointer return type. 2022-02-03 16:03:23 +02:00
ac4fb2996b [Net] Non-blocking request in HTTPClientTCP.
HTTPClientJavaScript already supports non-blocking requests.
2022-02-03 02:45:30 +01:00
6ff753675a Merge pull request #56771 from mhilbrunner/unacceptable
Verify custom HTTP headers, fix off by one error
2022-02-02 18:28:30 +01:00
050908626f Merge pull request #57526 from tavurth/bugfix/high-macos-cpu-usage 2022-02-02 10:16:24 +01:00
c37bd41c79 Increase RemoteDebuggerPeerTCP poll to 6.9ms
Fix high CPU usage on MacOS by reverting the polling for Network
debugging to match 144hz refresh rate.
2022-02-01 23:35:30 +03:00
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
8c7cd904f5 Merge pull request #57469 from Sauermann/fix-rect2i-intersect 2022-02-01 00:05:02 +01:00
23a4fe5b27 Fix incorrect Rect2i calculations: intersects and encloses
Clarify expand documentation
2022-01-31 19:03:57 +01:00
8e79c5fb8d Add support for the escaped UTF-16 and UTF-32 Unicode characters in the scripts and expressions. 2022-01-30 20:16:04 +02:00
736ac25306 Rename the physics server run_on_thread project settings
`run_on_separate_thread` is more explicit.
2022-01-29 17:35:50 +01:00
8a0a3accee simplify formatting scripts, add a clang-tidy script, and run clang-tidy 2022-01-29 04:41:03 -06:00
49297d937c [Net] Simplify IP resolution code, fix caching.
First, we should not insert into cache if the hostname resolution has
failed (as it might be a temporary internet issue), second, the async
resolver should also properly insert into cache.

Took the chance to remove some duplicate code with critical section in
it at the cost of little performance when calling the blocking
resolve_hostname function.
2022-01-29 01:56:36 +01:00
9686d680b7 Merge pull request #57116 from bruvzg/win_net_share 2022-01-28 11:03:23 +01:00
e6caaf4c80 Merge pull request #57205 from TechnoPorg/variant-template-cast
Allow method binds to take Object subclasses as arguments
2022-01-27 23:46:37 +01:00
899cd34426 Merge pull request #57281 from Rubonnek/rename-subsequence 2022-01-27 11:03:13 +01:00
3ef5a97505 Verify custom HTTP headers, fix off by one error 2022-01-27 03:22:37 +01:00
3a83872d26 HTTP comment cleanup 2022-01-27 03:22:37 +01:00
5deb5ebf23 Expose Transform3D::sphere_interpolate_with() 2022-01-27 02:53:20 +01:00
3eb5e0ac50 Rename String::is_subsequence_ofi to String::is_subsequence_ofn 2022-01-26 18:03:56 -05:00
d74d4cbdff Merge pull request #54173 from nathanfranke/fix-exact-match 2022-01-26 13:35:36 +01:00