165 Commits

Author SHA1 Message Date
joe bestrotheray
9bc83d76a7 Make dsf log less spammy about uncapping the DSF node
#rb richard.smith

[CL 32512139 by joe bestrotheray in 5.4 branch]
2024-03-26 12:19:11 -04:00
jodon karlik
3b87e72393 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 32499631 by jodon karlik in 5.4 branch]
2024-03-26 02:33:10 -04:00
ryan gerleve
00aca8b9e6 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 32491240 by ryan gerleve in 5.4 branch]
2024-03-25 19:07:44 -04:00
arciel rekman
3eddd55e4f 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 31594002 by arciel rekman in 5.4 branch]
2024-02-16 20:18:08 -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
ryan gerleve
07178a0492 Add cvar to flag net dormant actors that were destroyed by Net.RepGraph.DormantDynamicActorsDestruction as not dormant anymore. This ensures the server initializes the flushed actor's FObjectReplicator correctly with the default state of the object, instead of the current state, since the client no longer has a current state.
[REVIEW] [at]louisphilippe.seguin
#rb LouisPhilippe.Seguin, Mattias.Hornlund
#tests Bug repro with chests, and general gameplay

[CL 30256705 by ryan gerleve in ue5-main branch]
2023-12-11 22:33:25 -05:00
louisphilippe seguin
784658deef NetDriver:
* Added tracking stats to NetConnection that track number of rpcs delayed by unmapped guids and how many frames they were delayed by.
* Added tracking stats to NetDriver that track number of reliable bunches.
* Added console cheats to force only unreliable RPCs to be dropped. This can be used to better simulate a scenario where specific unreliable RPCs get dropped and not resent but not the adjacent property data sampled the same frame. Useful to test gameplay code using unreliable RPCs.
   * NetEmulation.DropAnyUnreliable : drops a % of all unreliables sent
   * NetEmulation.DropUnreliableOfActorClass: drops a % of all unreliables sent by a specific class
   * NetEmulation.DropUnreliableOfSubObjectClass: drops a % of all unreliables sent by a specific class
   * NetEmulation.DropUnreliableRPC: drops a % of all unreliables of the passed function name.
   * NetEmulation.DropNothing: stops dropping unreliable rpcs

#rb Peter.Engstrom, Ryan.Gerleve

[CL 29721788 by louisphilippe seguin in ue5-main branch]
2023-11-14 14:48:44 -05:00
peter engstrom
a9b36a97f1 Iris - Force very high priority on controllers and view targets if cvar Net.ForceConnectionViewerPriority > 0. Deprecated cvar Net.RepGraph.ForceConnectionViewerPriority as the functionality is implemented by Iris as well. Moved said cvar to NetCore module.
#rb louisphilippe.seguin, mattias.hornlund

[CL 29645482 by peter engstrom in ue5-main branch]
2023-11-10 12:54:02 -05:00
louisphilippe seguin
f7abf06158 ReplicationGraph:
* Ensure when an actor is replicated with bNetTemporary set

#rb Ryan.Gerleve

[CL 29411433 by louisphilippe seguin in ue5-main branch]
2023-11-03 13:14:53 -04:00
ryan gerleve
c380c4650d Replication graph: reset bForceCullDistanceToZero when an actor is set to not dormant. Otherwise, if an actor is set to not dormant before it was handled in UReplicationGraphNode_ConnectionDormancyNode::ConditionalGatherDormantActorsForConnection, bForceCullDistanceToZero would remain true, effectively treating the actor as always relevant even if that wasn't the desired behavior.
#rb LouisPhilippe.Seguin

[CL 29069730 by ryan gerleve in ue5-main branch]
2023-10-25 01:24:04 -04:00
dylan fansler
f4f510c925 Null checking for Net Channel to prevent server crashes when we run out of Replication Channels
[CL 28598764 by dylan fansler in ue5-main branch]
2023-10-09 16:58:09 -04:00
louisphilippe seguin
36c722f3c4 Fix wrong printf parameters in checkf & ensuremsgf found in engine code
#rb Fabian.Giesen, Kirill.Zorin
#rnx

[CL 27519547 by louisphilippe seguin in ue5-main branch]
2023-08-31 08:56:30 -04:00
louisphilippe seguin
fcc303003d RepGraph
* Added comment explaining why we always calculate actor distance to view when replicating

#rb trivial
#rnx

[CL 26819814 by louisphilippe seguin in ue5-main branch]
2023-08-03 14:22:46 -04: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
christopher daniel
875d99aab4 Replication / Dormancy and Always Relevant: Fixed bug where an always relevant, dormant actor could lose relevancy on clients. Now that actor will not be destroyed on clients where they are always relevant.
#rnx
#rb LouisPhilippe.Seguin
[REVIEW] [at]Dan.Kaufman, [at]Beth.Reid, [at]Anthony.Glueck

[CL 26069614 by christopher daniel in ue5-main branch]
2023-06-16 16:52:24 -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
nathan green
9a09c86175 - Fixing assert on FloatToIntCastChecked when you set your actor cull distance larger than std::numerics<int>
[REVIEW] [at]Ryan.Gerleve, [at]Cory.Kolek
#jira: FORT-620840

[CL 25906326 by nathan green in ue5-main branch]
2023-06-09 18:01:30 -04:00
joe bestrotheray
6518935a73 Make CVar_RepGraph_DynamicSpatialFrequency_UncapBandwidth non-const in shipping builds so it can be hotfixed on/off
[CL 25891529 by joe bestrotheray in ue5-main branch]
2023-06-09 09:48:29 -04:00
louisphilippe seguin
d2f271bbdd RepGraph: Fix int to float cast warning
#rb trivial
#rnx

[CL 25794864 by louisphilippe seguin in ue5-main branch]
2023-06-05 12:26:09 -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
kirill zorin
de8db5ff76 Converting ARO-facing raw pointers to TObjectPtr ahead of raw pointer ARO API deprecation.
#rb zousar.shaker
#rb markus.breyer
#rb robert.manuszewski

#preflight 646391406b1406b54ab15460

[CL 25489627 by kirill zorin in ue5-main branch]
2023-05-16 10:52:49 -04:00
kirill zorin
a469aafd78 Update callsites to prepare for upcoming TArray/TArrayView<TObjectPtr<...>> restrictions
#rb zousar.shaker
#rb devin.doucette
#rb steve.robb
#rb robert.manuszewski
#rb saam.barati
#preflight 643f4c09a35280ed4f53ccb3

[CL 25100071 by kirill zorin in ue5-main branch]
2023-04-18 22:39:29 -04:00
Brian Bekich
ddda7e829a Reverting uses of FloatCastChecked
#jira UE-181363
#preflight 64222de1c42c7fd1cbb14030

[CL 24813420 by Brian Bekich in ue5-main branch]
2023-03-27 20:15:42 -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