Commit Graph

230 Commits

Author SHA1 Message Date
ben woodhouse
2ea61ce0c6 Switch to CSV_PROFILER_STATS instead of CSV_PROFILER for various profiling subsystems. This allows them to be compiled out when CSV_PROFILER_MINIMAL is defined.
As part of this change we also promote dynamic resolution and IO/PackageQueueDepth stats to Minimal since they're important for high level performance reporting.
Also fix up a few places that were redundantly using #if CSV_PROFILER around CSV macros.

#rb mickael.gilabert

[CL 34386798 by ben woodhouse in ue5-main branch]
2024-06-14 18:16:47 -04:00
ryan gerleve
e5fc7229a0 Add a new gracefully-closing state to NetConnection that waits for reliable data to be acknowledged before actually closing communication, and support this in Iris.
This helps make sure reliable client RPCs sent right before the server gracefully disconnects a client by destroying their PlayerController are received, especially under packet loss.
Can be disabled by setting the cvar net.GracefulCloseEnabled.

#rb LouisPhilippe.Seguin, Peter.Engstrom

[CL 34379986 by ryan gerleve in ue5-main branch]
2024-06-14 14:58:36 -04:00
ted percival
c924e5282f Use TVariant instead of std::variant
Removed triviality assertions. TVariant doesn't meet most of them but TArray will treat it as if it does regardless.

#rnx
#rb Ryan.Gerleve

[CL 34348222 by ted percival in ue5-main branch]
2024-06-13 14:21:49 -04:00
ted percival
ba970596c8 Remove actors from Replication Graph when world is unloaded
[FYI] Ryan.Gerleve

[CL 34083211 by ted percival in ue5-main branch]
2024-06-03 20:54:18 -04:00
ted percival
1f9113777c Prevent GC destroying actors that ReplicationGraph still points to.
Log (warn) when an actor is removed from networking when it is already marked garbage.

Report actors that are not removed from ReplicationGraph when the world is cleaned up.

#tests Lego Fortnite flying around for several minutes, entering & exiting caves, with PktEmulation average.
#rb Ryan.Gerleve

[CL 34023091 by ted percival in ue5-main branch]
2024-05-30 20:19:57 -04:00
brandon schaefer
d1becd40a2 Remove the now deleted option to EnableAutoRTFM, this is default and now youve to explicitly disable it for a module
#rb neil.henning

[CL 34015057 by brandon schaefer in ue5-main branch]
2024-05-30 18:00:50 -04:00
ted percival
0113bde277 RepGraph: Remove actors from global list after callbacks
Avoid callbacks reinserting a removed actor into the global list by looking it up (via FGlobalActorReplicationInfoMap::Get()).

[FYI] ryan.gerleve

[CL 33844398 by ted percival in ue5-main branch]
2024-05-22 17:02:16 -04:00
ted percival
ada7369675 Speed up Net.RepGraph.UseWeakPointers
Reduce the number of times weak pointers are resolved to objects within a single function; look up the raw pointer once and reuse it.

#rb Ryan.Gerleve
#rnx

[CL 33579307 by ted percival in ue5-main branch]
2024-05-10 12:57:31 -04:00
ted percival
ba48f54a98 Correct UE_DEPRECATED version from 5.4 to 5.5
#rb LouisPhilippe.Seguin
#rnx

[CL 33578620 by ted percival in ue5-main branch]
2024-05-10 12:35:12 -04:00
ted percival
cc020a8354 Fix FActorRepListType expensive deep copies
Copy/move was round-tripping via the deep-lookup implicit AActor* conversion rather than trivial copying.

Also speeds up comparison by comparing weak pointers without resolving them.

[FYI] ryan.gerleve

[CL 33365539 by ted percival in ue5-main branch]
2024-04-30 23:10:29 -04:00
ted percival
2b5678bf0e Add an option to use weak pointers in RepGraph to catch dangling pointers without crashing.
Adds resilience to RepGraph if there are actor lifetime bugs.

Off by default. Enabled by cvar `Net.RepGraph.UseWeakPointers true`. Can be changed at runtime.

#rb Ryan.Gerleve

[CL 33313595 by ted percival in ue5-main branch]
2024-04-29 16:44:58 -04:00
ted percival
2b87d0ba15 Deprecate type in proper location
#rb Ryan.Gerleve

[CL 33084130 by ted percival in ue5-main branch]
2024-04-18 16:24:26 -04:00
steve robb
2aeafac0fc Replaced ImplicitCast in a variety of places.
[CL 32757787 by steve robb in ue5-main branch]
2024-04-05 09:19:01 -04:00
ryan gerleve
f8740fecc8 Fix for invalid actors remaining in the replication graph if:
-Net.RepGraph.HandleDynamicActorRename is enabled, and
-A replicated actor is added before it's initialized and is routed as a dormant, spatialized actor (which is put on the ReplicationGraphNode_GridSpatialization2D::PendingStaticSpatializedActors list), and
-That actor is then destroyed.

Added automation test "Net.RenameReplicatedActor.EarlyRenameAndDestroy" to EngineTest to test this case and some supporting changes:
-Enable ReplicationGraph plugin for the EngineTest project
-Reset the timer for replication graph logging invalid actor info when a graph is initialized. This ensures the logs appear if multiple tests are run in quick succession.

#rb bradley.heath

[CL 32707299 by ryan gerleve in ue5-main branch]
2024-04-03 15:17:42 -04:00
ryan gerleve
6cca5e7346 Replication graph properly handles renaming statically-spatialized actors.
Also, put more of the invalid actor logging behind the Net.RepGraph.LogDebugInfoPeriod to prevent log spam every frame an invalid actor is detected in the graph.

#jira UE-211081
#rb bradley.heath

[CL 32672002 by ryan gerleve in ue5-main branch]
2024-04-02 13:12:34 -04:00
ted percival
83a158bfe0 Remove deprecation attribute from type
[CL 32625099 by ted percival in ue5-main branch]
2024-03-29 17:53:06 -04:00
ted percival
0cbc66ac0a Build: Fix UE_DEPRECATED attribute location
[CL 32624670 by ted percival in ue5-main branch]
2024-03-29 17:31:15 -04:00
ted percival
b21c6fb914 RepGraph: Hold gathered actors in owned TArray rather than views of unowned actor lists
#rb Ryan.Gerleve
#tests 2 clients on windows

[CL 32624063 by ted percival in ue5-main branch]
2024-03-29 17:04:12 -04:00
ted percival
f7a2902705 RepGraph: Fix skipping subsequent connections if one connection had nothing to replicate
#rb Ryan.Gerleve

[CL 32525282 by ted percival in ue5-main branch]
2024-03-26 18:04:46 -04:00
joe bestrotheray
a34ce7b777 Make dsf log less spammy about uncapping the DSF node
#rb richard.smith

[CL 32441978 by joe bestrotheray in ue5-main branch]
2024-03-22 14:13:39 -04:00
jodon karlik
601b38fd99 Changed UNetDriver::ERemoteFunctionSendPolicy from an enum to an enum class so that other instances of "Default" won't conflict with it.
This class isn't at fault, but it's the easiest change.

#rb Ryan.Gerleve

[CL 32313158 by jodon karlik in ue5-main branch]
2024-03-18 17:35:26 -04:00
ryan gerleve
eb8021c86d Add some optional handling of replicated actor outer changes on servers.
-Only supports dynamically spawned actors, not placed actors
-UNetDriver::NotifyActorRenamed now has a PreviousOuter parameter
-Net driver notifies any ReplicationDriver (replication graph) of actor renames
-ReplicationGraph APIs added to update internal actor level tracking (this can be toggled with the cvar Net.RepGraph.HandleDynamicActorRename)
-Added cvar net.CleanUpRenamedDynamicActors that will tell clients to destroy an actor if the server moves it to a level that's not currently visible on the client (disabled by default to preserve current behavior)

#jira UE-201875
#rb LouisPhilippe.Seguin
[FYI] Todd.Eckert, Jon.Sourbeer

[CL 31915797 by ryan gerleve in ue5-main branch]
2024-02-29 13:26:08 -05:00
steve robb
f8d47335a4 Replaced RemoveAt(N, 1, EAllowShrinking::*) with RemoveAt(N, EAllowShrinking::*).
[CL 31626444 by steve robb in ue5-main branch]
2024-02-19 16:51:58 -05:00
arciel rekman
cc5aa750a3 Add facility to safety-check raw AActor pointers used by ReplicationGraph.
- Attempting to avoid a rare crash and log more info about the circumstances.

#rb Matt.Harris, Ryan.Gerleve

[CL 31600892 by arciel rekman in ue5-main branch]
2024-02-17 10:18:46 -05:00
steve robb
fde2961f55 Fixed up a lot of bool-taking container resize functions to take EAllowShrinking instead.
[CL 30803608 by steve robb in ue5-main branch]
2024-01-23 09:51:10 -05:00