Commit Graph

80 Commits

Author SHA1 Message Date
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
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
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
urias rooney
4d57c73ff0 ## RepGraph actor reference validation
* Added ValidateActorReferences to RepGraph and RepGraphNode types
  * Iterates over all nodes in the RepGraph and checks for potentally stale actor references

## Performance

Tested on a Win64 Test Server
* ValidateActorReferences: 10-20us

[CL 26714029 by urias rooney in ue5-main branch]
2023-07-31 14:01:45 -04:00
joe bestrotheray
46d2364107 Change saturation analytics so that connection saturation, fast path saturation, and DSF saturation are all tracked separately
#rb LouisPhilippe.Seguin

[CL 26625347 by joe bestrotheray in ue5-main branch]
2023-07-26 18:26:13 -04:00
louisphilippe seguin
84b4cc7018 RepGraph
* Fix log spam caused by actors going outside the legal world bounds and staying OOB.
* Now we will only log a warning once when the actor goes OOB
* net.ReplicationGraph.PrintGraph now prints the list of DynamicSpatializedActors monitored by the Grid2D node.

#rb Ryan.Gerleve

[CL 25934977 by louisphilippe seguin in ue5-main branch]
2023-06-12 15:27:57 -04:00
louisphilippe seguin
5d56917cd7 Fix int to float cast error
#rb trivial

[CL 25794829 by louisphilippe seguin in ue5-main branch]
2023-06-05 12:25:32 -04:00
louisphilippe seguin
d3e3be0585 NetDriver
* Deprecated NetServerMaxTickRate variable and replaced them with Get/Set functions.
* Added FOnNetServerMaxTickRateChanged delegate. Register to receive callbacks when the server tick rate changes.

#jira UE-185786
#rb Ryan.Gerleve

[CL 25793458 by louisphilippe seguin in ue5-main branch]
2023-06-05 11:41:28 -04:00
Brian Bekich
26610f72b2 Enabling UnsafeTypeCastWarningLevel for rep graph
#jira none
#preflight 641882a042618c85c48c0385
#rb louisphilippe.seguin, jon.fairchild, ryan.gerleve

[CL 24732881 by Brian Bekich in ue5-main branch]
2023-03-21 11:42:33 -04:00
brian bekich
09edde2147 Lowering net frequency of rep graph debug actor
#rb ryan.gerleve

[CL 24295943 by brian bekich in ue5-main branch]
2023-02-17 20:29:33 -05:00
anton dunchev
99e519be25 ReplicationGraph amortize the cost of dormant actor cleanup by allowing gathering actor lists for 1 connection at a time.
#rb LouisPhilippe.Seguin
#tests PIE

[CL 24058151 by anton dunchev in ue5-main branch]
2023-02-07 15:43:54 -05:00
anton dunchev
5813842292 Fix stale nodes cleanup from caches when Node disconnected from the connection
#rnx
[FYI] andrew.ladenberger, brian.bekich, LouisPhilippe.Seguin

[CL 23782222 by anton dunchev in ue5-main branch]
2023-01-19 17:27:57 -05:00
anton dunchev
8ef5d19523 Send destruction info for dormant actors from cells that are no longer observed by the network client.
- TimeToLife for cell to send destruction is configurable and overridable by the game per GridSpatialization2DNode
- Exposed ReplicatedDormantDestructionInfosPerFrame CVar to have control over optimization levers
- Added Profiler markers to measure impact of enabling dormant actor cleanup

#rb brian.bekich, LouisPhilippe.Seguin
[FYI] andrew.ladenberger
#tests PIE

[CL 23781800 by anton dunchev in ue5-main branch]
2023-01-19 17:12:18 -05:00
ben zeigler
932a637aa0 Change the replication graph debug actor to a weak reference so it doesn't break seamless travel when pending kill is disabled
#jira UE-160144
#preflight 63c1a5b91a06fc6105ea79fc
#rb LouisPhilippe.Seguin

[CL 23682412 by ben zeigler in ue5-main branch]
2023-01-13 13:51:18 -05:00
henrik karlsson
3c9aacb1ad [Engine/Plugins]
* Updated public headers for ~170 engine plugins using iwyu to remove includes not needed. Removed includes are still available behind UE_ENABLE_INCLUDE_ORDER_DEPRECATED_IN_5_2

#preflight 63c08f4a2a6acaf1622bcc73
#rb none

[CL 23674775 by henrik karlsson in ue5-main branch]
2023-01-13 01:54:01 -05:00
louisphilippe seguin
8ead96f9c2 ReplicationGraph
* Refactored Dependent actor lists so the child actors are stored by streaming levels
* Now dependent actors are not replicated if the connection does not have the streaming level loaded
* Added FLevelBasedActorList struct to RepGraph plugin. Holds actors based on their level (permanent or streaming)

#jira UE-159638
#rb Ryan.Gerleve, Brian.Bekich

[CL 23480107 by louisphilippe seguin in ue5-main branch]
2022-12-12 13:39:19 -05:00
louisphilippe seguin
55b6193ef0 RepGraph
* Deleted deprecated code from before 5.1

#rb Peter.Engstorm

[CL 23428822 by louisphilippe seguin in ue5-main branch]
2022-12-07 10:42:56 -05:00
Brian Bekich
e8cf730f3a Replace some rep graph node strong refs with weak pointers
#jira FORT-536326
#preflight 63861d9533774509005e9d91
#rb louisphilippe.seguin

[CL 23307930 by Brian Bekich in ue5-main branch]
2022-11-29 10:31:11 -05:00
ryan gerleve
ba27312428 Replication graph GridSpatialization2D node uses old world bounds values.
The grid is densely stored and risks very high memory usage at large coordinates.

#jira UE-165198
#rb louisphilippe.seguin
#preflight 6334c113691c0168b71c21f7

[CL 22240520 by ryan gerleve in ue5-main branch]
2022-09-28 22:24:09 -04:00
jaime cifuentes
7d1eb971be Inclusive Terminology Push
Replaced "master" with "main" at ReplicationGraph.h/.cpp

#jira UE-158584
#review @thomas.sarkanen
#preflight 62cea5eaf30df2b55bed965f

[CL 21069494 by jaime cifuentes in ue5-main branch]
2022-07-13 07:34:15 -04:00
Andrew Davidson
8d844cd4a6 Improve support for an extended WORLD_MAX
#rb various, trivial
#preflight 62a1cb46f73a01bd981b9978

[CL 20573655 by Andrew Davidson in ue5-main branch]
2022-06-09 07:03:13 -04:00
louisphilippe seguin
0a220bb418 ReplicationGraph
* Prevent actors outside the destruction radius but inside the current OutOfRange radius check from being added to the OutOfRange list.
* Instead keep actors in the PendingDestructionList until they get inside the send radius or outside the OutOfRange radius.

#rb Brian.Bekich, Jon.Sourbeer

#ROBOMERGE-AUTHOR: louisphilippe.seguin
#ROBOMERGE-SOURCE: CL 20229549 via CL 20229567 via CL 20229593 via CL 20229612
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20231614 by louisphilippe seguin in ue5-main branch]
2022-05-16 16:47:35 -04:00
VesCodes
792559369b PR #9167: Export FStreamingLevelActorListCollection to external modules (Contributed by VesCodes)
#jira UE-151475
#rb trivial

#ROBOMERGE-AUTHOR: louisphilippe.seguin
#ROBOMERGE-SOURCE: CL 20182670 via CL 20182677 via CL 20182678
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20185350 by VesCodes in ue5-main branch]
2022-05-13 14:24:50 -04:00
jason adcock
f7b3c50db2 Improve some memory usage in Networking Code
#rb brian.bekich

#ROBOMERGE-AUTHOR: jason.adcock
#ROBOMERGE-SOURCE: CL 19498421 via CL 19504007 via CL 19504150
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v936-19480137)

[CL 19511197 by jason adcock in ue5-main branch]
2022-03-25 09:12:30 -04:00