2019-12-27 09:26:59 -05:00
// Copyright Epic Games, Inc. All Rights Reserved.
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
/*=============================================================================
Replication Graph
2018-06-07 22:39:07 -04:00
Implementation of Replication Driver . This is customizable via subclassing UReplicationGraph . Default implementation ( UReplicationGraph ) does not fully function and is intended to be overridden .
Check out BasicReplicationGraph . h for a minimal implementation that works " out of the box " with a minimal feature set .
Check out ShooterGame / UShooterReplicationGraph for a more advanced implementation .
High level overview of ReplicationGraph :
* The graph is a collection of nodes which produce replication lists for each network connection . The graph essentially maintains persistent lists of actors to replicate and feeds them to connections .
* This allows for more work to be shared and greatly improves the scalability of the system with respect to number of actors * number of connections .
* For example , one node on the graph is the spatialization node . All actors that essentially use distance based relevancy will go here . There are also always relevant nodes . Nodes can be global , per connection , or shared ( E . g , " Always relevant for team " nodes ) .
* The main impact here is that virtual functions like IsNetRelevantFor and GetNetPriority are not used by the replication graph . Several properties are also not used or are slightly different in use .
* Instead there are essentially three ways for game code to affect this part of replication :
* The graph itself . Adding new UReplicationNodes or changing the way an actor is placed in the graph .
* FGlobalActorReplicationInfo : The associative data the replication graph keeps , globally , about each actor .
* FConnectionReplicationActorInfo : The associative data that the replication keeps , per connection , about each actor .
* After returned from the graph , the actor lists are further culled for distance and frequency , then merged and prioritized . The end result is a sorted list of actors to replicate that we then do logic for creating or updating actor channels .
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
Subclasses should implement these functions :
UReplicationGraph : : InitGlobalActorClassSettings
Initialize UReplicationGraph : : GlobalActorReplicationInfoMap .
UReplicationGraph : : InitGlobalGraphNodes
Instantiate new UGraphNodes via : : CreateNewNode . Use : : AddGlobalGraphNode if they are global ( for all connections ) .
UReplicationGraph : : RouteAddNetworkActorToNodes / : : RouteRemoveNetworkActorToNodes
Route actor spawning / despawning to the right node . ( Or your nodes can gather the actors themselves )
2018-06-07 22:39:07 -04:00
UReplicationGraph : : InitConnectionGraphNodes
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
Initialize per - connection nodes ( or associate shared nodes with them via : : AddConnectionGraphNode )
2018-06-07 22:39:07 -04:00
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
# pragma once
# include "CoreMinimal.h"
# include "UObject/ObjectMacros.h"
# include "Serialization/BitReader.h"
# include "Misc/NetworkGuid.h"
# include "Engine/EngineBaseTypes.h"
# include "GameFramework/Actor.h"
# include "Misc/EngineVersion.h"
# include "GameFramework/PlayerController.h"
# include "Engine/NetDriver.h"
# include "Engine/PackageMapClient.h"
# include "Misc/NetworkVersion.h"
# include "Engine/ReplicationDriver.h"
# include "ReplicationGraphTypes.h"
# include "ReplicationGraph.generated.h"
2020-01-08 10:41:15 -05:00
struct FReplicationGraphDestructionSettings ;
2020-10-29 13:38:15 -04:00
typedef TObjectKey < class UNetReplicationGraphConnection > FRepGraphConnectionKey ;
2019-08-27 17:30:29 -04:00
# define DO_ENABLE_REPGRAPH_DEBUG_ACTOR !(UE_BUILD_SHIPPING || UE_BUILD_TEST)
2021-02-18 18:13:28 -04:00
UCLASS ( abstract , transient , config = Engine )
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
class REPLICATIONGRAPH_API UReplicationGraphNode : public UObject
{
GENERATED_BODY ( )
public :
UReplicationGraphNode ( ) ;
2022-02-11 14:56:39 -05:00
virtual void Serialize ( FArchive & Ar ) override ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
/** Called when a network actor is spawned or an actor changes replication status */
virtual void NotifyAddNetworkActor ( const FNewReplicatedActorInfo & Actor ) PURE_VIRTUAL ( UReplicationGraphNode : : NotifyAddNetworkActor , ) ;
/** Called when a networked actor is being destroyed or no longer wants to replicate */
2018-06-07 22:39:07 -04:00
virtual bool NotifyRemoveNetworkActor ( const FNewReplicatedActorInfo & Actor , bool bWarnIfNotFound = true ) PURE_VIRTUAL ( UReplicationGraphNode : : NotifyRemoveNetworkActor , return false ; ) ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
/** Called when world changes or when all subclasses should dump any persistent data/lists about replicated actors here. (The new/next world will be set before this is called) */
virtual void NotifyResetAllNetworkActors ( ) ;
/** Mark the node and all its children PendingKill */
virtual void TearDown ( ) ;
virtual void GatherActorListsForConnection ( const FConnectionGatherActorListParameters & Params ) PURE_VIRTUAL ( UReplicationGraphNode : : GatherActorListsForConnection , ) ;
/** Called once per frame prior to replication ONLY on root nodes (nodes created via UReplicationGraph::CreateNode) has RequiresPrepareForReplicationCall=true */
virtual void PrepareForReplication ( ) { } ;
2018-10-29 10:01:28 -04:00
/** Debugging only function to return a normal TArray of actor rep list (for logging, debug UIs, etc) */
2021-11-18 14:37:34 -05:00
virtual void GetAllActorsInNode_Debugging ( TArray < FActorRepListType > & OutArray ) const ;
2018-10-29 10:01:28 -04:00
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
// -----------------------------------------------------
bool GetRequiresPrepareForReplication ( ) const { return bRequiresPrepareForReplicationCall ; }
void Initialize ( const TSharedPtr < FReplicationGraphGlobalData > & InGraphGlobals ) { GraphGlobals = InGraphGlobals ; }
virtual UWorld * GetWorld ( ) const override final { return GraphGlobals . IsValid ( ) ? GraphGlobals - > World : nullptr ; }
virtual void LogNode ( FReplicationGraphDebugInfo & DebugInfo , const FString & NodeName ) const ;
virtual FString GetDebugString ( ) const { return GetName ( ) ; }
2020-10-29 13:38:15 -04:00
void DoCollectActorRepListStats ( struct FActorRepListStatCollector & StatsCollector ) const ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
/** Allocates and initializes ChildNode of a specific type T. This is what you will want to call in your FCreateChildNodeFuncs. */
template < class T >
T * CreateChildNode ( )
{
T * NewNode = NewObject < T > ( this ) ;
NewNode - > Initialize ( GraphGlobals ) ;
AllChildNodes . Add ( NewNode ) ;
return NewNode ;
}
2022-01-27 17:02:43 -05:00
/** Allocates and initializes ChildNode of a specific type T with a given base name. This is what you will want to call in your FCreateChildNodeFuncs. */
template < class T >
T * CreateChildNode ( FName NodeBaseName )
{
FName UniqueNodeName = MakeUniqueObjectName ( this , T : : StaticClass ( ) , NodeBaseName ) ;
T * NewNode = NewObject < T > ( this , UniqueNodeName ) ;
NewNode - > Initialize ( GraphGlobals ) ;
AllChildNodes . Add ( NewNode ) ;
return NewNode ;
}
2019-07-08 09:43:16 -04:00
/** Node removal behavior */
enum class NodeOrdering
{
IgnoreOrdering , // Use faster removal but may break node processing order
KeepOrder , // Use slower removal but keep the node order intact
} ;
2020-09-24 00:43:27 -04:00
/** Remove a child node from our list and flag it for destruction. Returns if the node was found or not */
bool RemoveChildNode ( UReplicationGraphNode * OutChildNode , UReplicationGraphNode : : NodeOrdering NodeOrder = UReplicationGraphNode : : NodeOrdering : : IgnoreOrdering ) ;
2019-07-08 09:43:16 -04:00
/** Remove all null and about to be destroyed nodes from our list */
void CleanChildNodes ( UReplicationGraphNode : : NodeOrdering NodeOrder ) ;
2018-06-07 22:39:07 -04:00
2020-10-29 13:38:15 -04:00
protected :
/**
* Implement this to visit any FActorRepListRefView and FStreamingLevelActorListCollection your node implemented .
*/
virtual void OnCollectActorRepListStats ( struct FActorRepListStatCollector & StatsCollector ) const { }
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
protected :
UPROPERTY ( )
2021-01-27 17:40:25 -04:00
TArray < TObjectPtr < UReplicationGraphNode > > AllChildNodes ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
TSharedPtr < FReplicationGraphGlobalData > GraphGlobals ;
/** Determines if PrepareForReplication() is called. This currently must be set in the constructor, not dynamically. */
bool bRequiresPrepareForReplicationCall = false ;
} ;
// -----------------------------------
2022-05-13 14:24:50 -04:00
struct REPLICATIONGRAPH_API FStreamingLevelActorListCollection
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
{
void AddActor ( const FNewReplicatedActorInfo & ActorInfo ) ;
2018-06-07 22:39:07 -04:00
bool RemoveActor ( const FNewReplicatedActorInfo & ActorInfo , bool bWarnIfNotFound , UReplicationGraphNode * Outer ) ;
2020-09-01 14:07:48 -04:00
bool RemoveActorFast ( const FNewReplicatedActorInfo & ActorInfo , UReplicationGraphNode * Outer ) ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
void Reset ( ) ;
void Gather ( const FConnectionGatherActorListParameters & Params ) ;
void DeepCopyFrom ( const FStreamingLevelActorListCollection & Source ) ;
void GetAll_Debug ( TArray < FActorRepListType > & OutArray ) const ;
void Log ( FReplicationGraphDebugInfo & DebugInfo ) const ;
int32 NumLevels ( ) const { return StreamingLevelLists . Num ( ) ; }
2020-10-22 19:19:16 -04:00
void TearDown ( ) ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
struct FStreamingLevelActors
{
2020-10-22 19:19:16 -04:00
FStreamingLevelActors ( FName InName ) : StreamingLevelName ( InName )
{
repCheck ( InName ! = NAME_None ) ;
}
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
FName StreamingLevelName ;
FActorRepListRefView ReplicationActorList ;
bool operator = = ( const FName & InName ) const { return InName = = StreamingLevelName ; } ;
} ;
/** Lists for streaming levels. Actors that "came from" streaming levels go here. These lists are only returned if the connection has their streaming level loaded. */
static const int32 NumInlineAllocations = 4 ;
TArray < FStreamingLevelActors , TInlineAllocator < NumInlineAllocations > > StreamingLevelLists ;
2019-01-29 04:41:12 -05:00
2022-02-09 15:44:28 -05:00
void CountBytes ( FArchive & Ar ) const
2019-01-29 04:41:12 -05:00
{
StreamingLevelLists . CountBytes ( Ar ) ;
2022-02-09 15:44:28 -05:00
for ( const FStreamingLevelActors & List : StreamingLevelLists )
{
List . ReplicationActorList . CountBytes ( Ar ) ;
}
2019-01-29 04:41:12 -05:00
}
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
} ;
// -----------------------------------
/** A Node that contains ReplicateActorLists. This contains 1 "base" list and a TArray of lists that are conditioned on a streaming level being loaded. */
UCLASS ( )
class REPLICATIONGRAPH_API UReplicationGraphNode_ActorList : public UReplicationGraphNode
{
GENERATED_BODY ( )
public :
2022-02-09 15:44:28 -05:00
virtual void Serialize ( FArchive & Ar ) override ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
virtual void NotifyAddNetworkActor ( const FNewReplicatedActorInfo & ActorInfo ) override ;
2018-06-07 22:39:07 -04:00
virtual bool NotifyRemoveNetworkActor ( const FNewReplicatedActorInfo & ActorInfo , bool bWarnIfNotFound = true ) override ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
virtual void NotifyResetAllNetworkActors ( ) override ;
virtual void GatherActorListsForConnection ( const FConnectionGatherActorListParameters & Params ) override ;
virtual void LogNode ( FReplicationGraphDebugInfo & DebugInfo , const FString & NodeName ) const override ;
2020-10-22 19:19:16 -04:00
virtual void GetAllActorsInNode_Debugging ( TArray < FActorRepListType > & OutArray ) const override ;
virtual void TearDown ( ) override ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
2020-09-01 14:07:48 -04:00
/** Removes the actor very quickly but breaks the list order */
bool RemoveNetworkActorFast ( const FNewReplicatedActorInfo & ActorInfo ) ;
2018-10-29 10:01:28 -04:00
/** Copies the contents of Source into this node. Note this does not copy child nodes, just the ReplicationActorList/StreamingLevelCollection lists on this node. */
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
void DeepCopyActorListsFrom ( const UReplicationGraphNode_ActorList * Source ) ;
protected :
2018-10-29 10:01:28 -04:00
/** Just logs our ReplicationActorList and StreamingLevelCollection (not our child nodes). Useful when subclasses override LogNode */
void LogActorList ( FReplicationGraphDebugInfo & DebugInfo ) const ;
2020-10-29 13:38:15 -04:00
virtual void OnCollectActorRepListStats ( struct FActorRepListStatCollector & StatsCollector ) const override ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
/** The base list that most actors will go in */
FActorRepListRefView ReplicationActorList ;
/** A collection of lists that streaming actors go in */
FStreamingLevelActorListCollection StreamingLevelCollection ;
friend class AReplicationGraphDebugActor ;
} ;
// -----------------------------------
/** A Node that contains ReplicateActorLists. This contains multiple buckets for non streaming level actors and will pull from each bucket on alternating frames. It is a way to broadly load balance. */
UCLASS ( )
class REPLICATIONGRAPH_API UReplicationGraphNode_ActorListFrequencyBuckets : public UReplicationGraphNode
{
GENERATED_BODY ( )
public :
2018-10-29 10:01:28 -04:00
struct FSettings
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
{
2018-10-29 10:01:28 -04:00
int32 NumBuckets = 3 ;
int32 ListSize = 12 ;
bool EnableFastPath = false ; // Whether to return lists as FastPath in "off frames". Defaults to false.
2018-11-16 14:01:06 -05:00
int32 FastPathFrameModulo = 1 ; // Only do fast path if frame num % this = 0
2018-10-29 10:01:28 -04:00
// Threshold for dynamically balancing buckets bsaed on number of actors in this node. E.g, more buckets when there are more actors.
struct FBucketThresholds
{
FBucketThresholds ( int32 InMaxActors , int32 InNumBuckets ) : MaxActors ( InMaxActors ) , NumBuckets ( InNumBuckets ) { }
int32 MaxActors ; // When num actors <= to MaxActors
int32 NumBuckets ; // use this NumBuckets
} ;
TArray < FBucketThresholds , TInlineAllocator < 4 > > BucketThresholds ;
2022-02-11 14:56:39 -05:00
void CountBytes ( FArchive & Ar ) const
{
BucketThresholds . CountBytes ( Ar ) ;
}
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
} ;
2018-10-29 10:01:28 -04:00
/** Default settings for all nodes. By being static, this allows games to easily override the settings are all nodes without having to subclass every graph node class */
static FSettings DefaultSettings ;
/** Settings for this specific node. If not set we will fallback to the static/global DefaultSettings */
TSharedPtr < FSettings > Settings ;
const FSettings & GetSettings ( ) const { return Settings . IsValid ( ) ? * Settings . Get ( ) : DefaultSettings ; }
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
2018-10-29 10:01:28 -04:00
UReplicationGraphNode_ActorListFrequencyBuckets ( ) { if ( ! HasAnyFlags ( RF_ClassDefaultObject ) ) { SetNonStreamingCollectionSize ( GetSettings ( ) . NumBuckets ) ; } }
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
2022-02-11 14:56:39 -05:00
virtual void Serialize ( FArchive & Ar ) override ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
virtual void NotifyAddNetworkActor ( const FNewReplicatedActorInfo & ActorInfo ) override ;
2018-06-07 22:39:07 -04:00
virtual bool NotifyRemoveNetworkActor ( const FNewReplicatedActorInfo & ActorInfo , bool bWarnIfNotFound = true ) override ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
virtual void NotifyResetAllNetworkActors ( ) override ;
virtual void GatherActorListsForConnection ( const FConnectionGatherActorListParameters & Params ) override ;
virtual void LogNode ( FReplicationGraphDebugInfo & DebugInfo , const FString & NodeName ) const override ;
2020-10-22 19:19:16 -04:00
virtual void TearDown ( ) override ;
virtual void GetAllActorsInNode_Debugging ( TArray < FActorRepListType > & OutArray ) const override ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
2020-10-29 13:38:15 -04:00
virtual void OnCollectActorRepListStats ( struct FActorRepListStatCollector & StatsCollector ) const override ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
void SetNonStreamingCollectionSize ( const int32 NewSize ) ;
protected :
void CheckRebalance ( ) ;
int32 TotalNumNonStreamingActors = 0 ;
/** Non streaming actors go in one of these lists */
TArray < FActorRepListRefView , TInlineAllocator < 2 > > NonStreamingCollection ;
/** A collection of lists that streaming actors go in */
FStreamingLevelActorListCollection StreamingLevelCollection ;
friend class AReplicationGraphDebugActor ;
} ;
// -----------------------------------
2018-11-16 14:01:06 -05:00
/** A node intended for dynamic (moving) actors where replication frequency is based on distance to the connection's view location */
UCLASS ( )
class REPLICATIONGRAPH_API UReplicationGraphNode_DynamicSpatialFrequency : public UReplicationGraphNode_ActorList
{
GENERATED_BODY ( )
public :
UReplicationGraphNode_DynamicSpatialFrequency ( ) ;
virtual void GatherActorListsForConnection ( const FConnectionGatherActorListParameters & Params ) override ;
// --------------------------------------------------------
struct FSpatializationZone
{
// Init directly
FSpatializationZone ( float InMinDotProduct , float InMinDistPct , float InMaxDistPct , uint32 InMinRepPeriod , uint32 InMaxRepPeriod , uint32 InMinRepPeriod_FastPath , uint32 InMaxRepPeriod_FastPath ) :
MinDotProduct ( InMinDotProduct ) , MinDistPct ( InMinDistPct ) , MaxDistPct ( InMaxDistPct ) , MinRepPeriod ( InMinRepPeriod ) , MaxRepPeriod ( InMaxRepPeriod ) , FastPath_MinRepPeriod ( InMinRepPeriod_FastPath ) , FastPath_MaxRepPeriod ( InMaxRepPeriod_FastPath ) { }
// Init based on target frame rate
FSpatializationZone ( float InMinDotProduct , float InMinDistPct , float InMaxDistPct , float InMinRepHz , float InMaxRepHz , float InMinRepHz_FastPath , float InMaxRepHz_FastPath , float TickRate ) :
MinDotProduct ( InMinDotProduct ) , MinDistPct ( InMinDistPct ) , MaxDistPct ( InMaxDistPct ) ,
MinRepPeriod ( HzToFrm ( InMinRepHz , TickRate ) ) , MaxRepPeriod ( HzToFrm ( InMaxRepHz , TickRate ) ) , FastPath_MinRepPeriod ( HzToFrm ( InMinRepHz_FastPath , TickRate ) ) , FastPath_MaxRepPeriod ( HzToFrm ( InMaxRepHz_FastPath , TickRate ) ) { }
float MinDotProduct = 1.f ; // Must have dot product >= to this to be in this zone
float MinDistPct = 0.f ; // Min distance as pct of per-connection culldistance, to map to MinRepPeriod
float MaxDistPct = 1.f ; // Max distance as pct of per-connection culldistance, to map to MaxRepPeriod
uint32 MinRepPeriod = 5 ;
uint32 MaxRepPeriod = 10 ;
uint32 FastPath_MinRepPeriod = 1 ;
uint32 FastPath_MaxRepPeriod = 5 ;
static uint32 HzToFrm ( float Hz , float TargetFrameRate )
{
return Hz > 0.f ? ( uint32 ) FMath : : CeilToInt ( TargetFrameRate / Hz ) : 0 ;
}
} ;
struct FSettings
{
FSettings ( ) : MaxBitsPerFrame ( 0 ) , MaxNearestActors ( - 1 ) { }
FSettings ( TArrayView < FSpatializationZone > InZoneSettings , TArrayView < FSpatializationZone > InZoneSettings_NonFastSharedActors , int64 InMaxBitsPerFrame , int32 InMaxNearestActors = - 1 )
: ZoneSettings ( InZoneSettings ) , ZoneSettings_NonFastSharedActors ( InZoneSettings_NonFastSharedActors ) , MaxBitsPerFrame ( InMaxBitsPerFrame ) , MaxNearestActors ( InMaxNearestActors ) { }
TArrayView < FSpatializationZone > ZoneSettings ;
TArrayView < FSpatializationZone > ZoneSettings_NonFastSharedActors ; // Zone Settings for actors that do not support FastShared replication.
int64 MaxBitsPerFrame ;
int32 MaxNearestActors ; // Only replicate the X nearest actors to a connection in this node. -1 = no limit.
} ;
static FSettings DefaultSettings ; // Default settings used by all instance
FSettings * Settings ; // per instance override settings (optional)
FSettings & GetSettings ( ) { return Settings ? * Settings : DefaultSettings ; }
const char * CSVStatName ; // Statname to use for tracking the gather/prioritizing phase of this node
protected :
struct FDynamicSpatialFrequency_SortedItem
{
FDynamicSpatialFrequency_SortedItem ( ) { }
FDynamicSpatialFrequency_SortedItem ( AActor * InActor , int32 InFramesTillReplicate , bool InEnableFastPath , FGlobalActorReplicationInfo * InGlobal , FConnectionReplicationActorInfo * InConnection )
: Actor ( InActor ) , FramesTillReplicate ( InFramesTillReplicate ) , EnableFastPath ( InEnableFastPath ) , GlobalInfo ( InGlobal ) , ConnectionInfo ( InConnection ) { }
FDynamicSpatialFrequency_SortedItem ( AActor * InActor , int32 InDistance , FGlobalActorReplicationInfo * InGlobal )
: Actor ( InActor ) , FramesTillReplicate ( InDistance ) , GlobalInfo ( InGlobal ) { }
bool operator < ( const FDynamicSpatialFrequency_SortedItem & Other ) const { return FramesTillReplicate < Other . FramesTillReplicate ; }
UPROPERTY ( )
AActor * Actor = nullptr ;
int32 FramesTillReplicate = 0 ; // Note this also serves as "Distance Sq" when doing the FSettings::MaxNearestActors pass.
bool EnableFastPath = false ;
FGlobalActorReplicationInfo * GlobalInfo = nullptr ;
FConnectionReplicationActorInfo * ConnectionInfo = nullptr ;
} ;
// Working area for our sorted replication list. Reset each frame for each connection as we build the list
TArray < FDynamicSpatialFrequency_SortedItem > SortedReplicationList ;
// Working ints for adaptive load balancing. Does not count actors that rep every frame
int32 NumExpectedReplicationsThisFrame = 0 ;
int32 NumExpectedReplicationsNextFrame = 0 ;
bool IgnoreCullDistance = false ;
virtual void GatherActors ( const FActorRepListRefView & RepList , FGlobalActorReplicationInfoMap & GlobalMap , FPerConnectionActorInfoMap & ConnectionMap , const FConnectionGatherActorListParameters & Params , UNetConnection * NetConnection ) ;
virtual void GatherActors_DistanceOnly ( const FActorRepListRefView & RepList , FGlobalActorReplicationInfoMap & GlobalMap , FPerConnectionActorInfoMap & ConnectionMap , const FConnectionGatherActorListParameters & Params ) ;
2021-03-18 15:20:03 -04:00
UE_DEPRECATED ( 4.27 , " Please use version of CalcFrequencyForActor that takes FPerConnectionActorInfoMap instead of FConnectionReplicationActorInfo. " )
2019-04-17 13:24:49 -04:00
void CalcFrequencyForActor ( AActor * Actor , UReplicationGraph * RepGraph , UNetConnection * NetConnection , FGlobalActorReplicationInfo & GlobalInfo , FConnectionReplicationActorInfo & ConnectionInfo , FSettings & MySettings , const FNetViewerArray & Viewers , const uint32 FrameNum , int32 ExistingItemIndex ) ;
2021-03-18 15:20:03 -04:00
void CalcFrequencyForActor ( AActor * Actor , UReplicationGraph * RepGraph , UNetConnection * NetConnection , FGlobalActorReplicationInfo & GlobalInfo , FPerConnectionActorInfoMap & ConnectionMap , FSettings & MySettings , const FNetViewerArray & Viewers , const uint32 FrameNum , int32 ExistingItemIndex ) ;
2018-11-16 14:01:06 -05:00
} ;
// -----------------------------------
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
/** Removes dormant (on connection) actors from its rep lists */
UCLASS ( )
2019-04-29 18:27:47 -04:00
class REPLICATIONGRAPH_API UReplicationGraphNode_ConnectionDormancyNode : public UReplicationGraphNode_ActorList
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
{
GENERATED_BODY ( )
public :
2020-10-29 13:38:15 -04:00
/**
* This setting determines the number of frames from the last Gather call when we consider a node obsolete .
* The default value of 0 disables this condition .
* Enable this to reduce the memory footprint of the RepGraph and optimize the exponential cost of dormancy events ( the more each connection moves around the grid cell the more each dormancy events is listened to ) .
* Inversely if clients go back and forth across the same cell multiple times the cost of the first Gather of newly created cell is very high ( it rechecks all dormant actors in the cell before removing them ) .
* This means this optimization is ideal only if you know the clients can ' t go back to previously visited cells , or that they do so very infrequently .
*/
static void SetNumFramesUntilObsolete ( uint32 NumFrames ) ;
public :
void InitConnectionNode ( const FRepGraphConnectionKey & InConnectionOwner , uint32 CurrentFrame )
{
ConnectionOwner = InConnectionOwner ;
LastGatheredFrame = CurrentFrame ;
}
virtual void TearDown ( ) override ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
virtual void GatherActorListsForConnection ( const FConnectionGatherActorListParameters & Params ) override ;
2018-06-07 22:39:07 -04:00
virtual bool NotifyRemoveNetworkActor ( const FNewReplicatedActorInfo & ActorInfo , bool WarnIfNotFound ) override ;
virtual void NotifyResetAllNetworkActors ( ) override ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
void NotifyActorDormancyFlush ( FActorRepListType Actor ) ;
2018-06-07 22:39:07 -04:00
void OnClientVisibleLevelNameAdd ( FName LevelName , UWorld * World ) ;
2020-10-29 13:38:15 -04:00
bool IsNodeObsolete ( uint32 CurrentFrame ) const ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
private :
2020-10-29 13:38:15 -04:00
static uint32 NumFramesUntilObsolete ;
private :
FRepGraphConnectionKey ConnectionOwner ;
uint32 LastGatheredFrame = 0 ;
2018-06-07 22:39:07 -04:00
void ConditionalGatherDormantActorsForConnection ( FActorRepListRefView & ConnectionRepList , const FConnectionGatherActorListParameters & Params , FActorRepListRefView * RemovedList ) ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
int32 TrickleStartCounter = 10 ;
2018-06-07 22:39:07 -04:00
// Tracks actors we've removed in this per-connection node, so that we can restore them if the streaming level is unloaded and reloaded.
FStreamingLevelActorListCollection RemovedStreamingLevelActorListCollection ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
} ;
/** Stores per-connection copies of a master actor list. Skips and removes elements from per connection list that are fully dormant */
UCLASS ( )
class REPLICATIONGRAPH_API UReplicationGraphNode_DormancyNode : public UReplicationGraphNode_ActorList
{
GENERATED_BODY ( )
public :
2020-10-29 13:38:15 -04:00
/** Connection Z location has to be < this for ConnectionsNodes to be made. */
static float MaxZForConnection ;
public :
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
virtual void NotifyAddNetworkActor ( const FNewReplicatedActorInfo & ActorInfo ) override { ensureMsgf ( false , TEXT ( " UReplicationGraphNode_DormancyNode::NotifyAddNetworkActor not functional. " ) ) ; }
2018-06-07 22:39:07 -04:00
virtual bool NotifyRemoveNetworkActor ( const FNewReplicatedActorInfo & ActorInfo , bool bWarnIfNotFound = true ) override { ensureMsgf ( false , TEXT ( " UReplicationGraphNode_DormancyNode::NotifyRemoveNetworkActor not functional. " ) ) ; return false ; }
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
virtual void NotifyResetAllNetworkActors ( ) override ;
void AddDormantActor ( const FNewReplicatedActorInfo & ActorInfo , FGlobalActorReplicationInfo & GlobalInfo ) ;
void RemoveDormantActor ( const FNewReplicatedActorInfo & ActorInfo , FGlobalActorReplicationInfo & ActorRepInfo ) ;
virtual void GatherActorListsForConnection ( const FConnectionGatherActorListParameters & Params ) override ;
void OnActorDormancyFlush ( FActorRepListType Actor , FGlobalActorReplicationInfo & GlobalInfo ) ;
2021-10-25 20:05:28 -04:00
void ConditionalGatherDormantDynamicActors ( FActorRepListRefView & RepList , const FConnectionGatherActorListParameters & Params , FActorRepListRefView * RemovedList , bool bEnforceReplistUniqueness = false , FActorRepListRefView * RemoveFromList = nullptr ) ;
2019-01-11 02:57:03 -05:00
2019-04-29 18:27:47 -04:00
UReplicationGraphNode_ConnectionDormancyNode * GetExistingConnectionNode ( const FConnectionGatherActorListParameters & Params ) ;
2019-04-08 21:05:50 -04:00
2019-04-29 18:27:47 -04:00
UReplicationGraphNode_ConnectionDormancyNode * GetConnectionNode ( const FConnectionGatherActorListParameters & Params ) ;
2019-01-11 02:57:03 -05:00
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
private :
2020-10-29 13:38:15 -04:00
UReplicationGraphNode_ConnectionDormancyNode * CreateConnectionNode ( const FConnectionGatherActorListParameters & Params ) ;
2020-09-24 00:43:27 -04:00
/** Function called on every ConnectionDormancyNode in our list */
typedef TFunction < void ( UReplicationGraphNode_ConnectionDormancyNode * ) > FConnectionDormancyNodeFunction ;
/**
* Iterates over all ConnectionDormancyNodes and calls the function on those still valid .
2020-10-29 13:38:15 -04:00
* If the node is considered obsolete , the function will destroy or skip over the ConnectionDormancyNode
2020-09-24 00:43:27 -04:00
*/
void CallFunctionOnValidConnectionNodes ( FConnectionDormancyNodeFunction Function ) ;
private :
typedef TSortedMap < FRepGraphConnectionKey , UReplicationGraphNode_ConnectionDormancyNode * > FConnectionDormancyNodeMap ;
FConnectionDormancyNodeMap ConnectionNodes ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
} ;
UCLASS ( )
class REPLICATIONGRAPH_API UReplicationGraphNode_GridCell : public UReplicationGraphNode_ActorList
{
GENERATED_BODY ( )
public :
virtual void NotifyAddNetworkActor ( const FNewReplicatedActorInfo & ActorInfo ) override { ensureMsgf ( false , TEXT ( " UReplicationGraphNode_Simple2DSpatializationLeaf::NotifyAddNetworkActor not functional. " ) ) ; }
2018-10-29 10:01:28 -04:00
virtual bool NotifyRemoveNetworkActor ( const FNewReplicatedActorInfo & ActorInfo , bool bWarnIfNotFound = true ) override { ensureMsgf ( false , TEXT ( " UReplicationGraphNode_Simple2DSpatializationLeaf::NotifyRemoveNetworkActor not functional. " ) ) ; return false ; }
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
virtual void LogNode ( FReplicationGraphDebugInfo & DebugInfo , const FString & NodeName ) const override ;
virtual void GetAllActorsInNode_Debugging ( TArray < FActorRepListType > & OutArray ) const override ;
void AddStaticActor ( const FNewReplicatedActorInfo & ActorInfo , FGlobalActorReplicationInfo & GlobalRepInfo , bool bParentNodeHandlesDormancyChange ) ;
void AddDynamicActor ( const FNewReplicatedActorInfo & ActorInfo ) ;
void RemoveStaticActor ( const FNewReplicatedActorInfo & ActorInfo , FGlobalActorReplicationInfo & ActorRepInfo , bool bWasAddedAsDormantActor ) ;
void RemoveDynamicActor ( const FNewReplicatedActorInfo & ActorInfo ) ;
2018-10-29 10:01:28 -04:00
// Allow graph to override function for creating the dynamic node in the cell
TFunction < UReplicationGraphNode * ( UReplicationGraphNode_GridCell * Parent ) > CreateDynamicNodeOverride ;
2019-01-11 02:57:03 -05:00
UReplicationGraphNode_DormancyNode * GetDormancyNode ( ) ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
private :
UPROPERTY ( )
2021-01-27 17:40:25 -04:00
TObjectPtr < UReplicationGraphNode > DynamicNode = nullptr ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
UPROPERTY ( )
2021-01-27 17:40:25 -04:00
TObjectPtr < UReplicationGraphNode_DormancyNode > DormancyNode = nullptr ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
2018-10-29 10:01:28 -04:00
UReplicationGraphNode * GetDynamicNode ( ) ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
void OnActorDormancyFlush ( FActorRepListType Actor , FGlobalActorReplicationInfo & GlobalInfo , UReplicationGraphNode_DormancyNode * DormancyNode ) ;
void ConditionalCopyDormantActors ( FActorRepListRefView & FromList , UReplicationGraphNode_DormancyNode * ToNode ) ;
2018-10-29 10:01:28 -04:00
void OnStaticActorNetDormancyChange ( FActorRepListType Actor , FGlobalActorReplicationInfo & GlobalInfo , ENetDormancy NewVlue , ENetDormancy OldValue ) ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
} ;
// -----------------------------------
UCLASS ( )
class REPLICATIONGRAPH_API UReplicationGraphNode_GridSpatialization2D : public UReplicationGraphNode
{
GENERATED_BODY ( )
public :
UReplicationGraphNode_GridSpatialization2D ( ) ;
2022-02-11 14:56:39 -05:00
virtual void Serialize ( FArchive & Ar ) override ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
virtual void NotifyAddNetworkActor ( const FNewReplicatedActorInfo & Actor ) override ;
2018-06-07 22:39:07 -04:00
virtual bool NotifyRemoveNetworkActor ( const FNewReplicatedActorInfo & ActorInfo , bool bWarnIfNotFound = true ) override ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
virtual void NotifyResetAllNetworkActors ( ) override ;
virtual void PrepareForReplication ( ) override ;
virtual void GatherActorListsForConnection ( const FConnectionGatherActorListParameters & Params ) override ;
void AddActor_Static ( const FNewReplicatedActorInfo & ActorInfo , FGlobalActorReplicationInfo & ActorRepInfo ) { AddActorInternal_Static ( ActorInfo , ActorRepInfo , false ) ; }
void AddActor_Dynamic ( const FNewReplicatedActorInfo & ActorInfo , FGlobalActorReplicationInfo & ActorRepInfo ) { AddActorInternal_Dynamic ( ActorInfo ) ; }
void AddActor_Dormancy ( const FNewReplicatedActorInfo & ActorInfo , FGlobalActorReplicationInfo & ActorRepInfo ) ;
void RemoveActor_Static ( const FNewReplicatedActorInfo & ActorInfo ) ;
void RemoveActor_Dynamic ( const FNewReplicatedActorInfo & ActorInfo ) { RemoveActorInternal_Dynamic ( ActorInfo ) ; }
void RemoveActor_Dormancy ( const FNewReplicatedActorInfo & ActorInfo ) ;
// Called if cull distance changes. Note the caller must update Global/Connection actor rep infos. This just changes cached state within this node
2021-06-07 20:09:45 -04:00
virtual void NotifyActorCullDistChange ( AActor * Actor , FGlobalActorReplicationInfo & GlobalInfo , float OldDist ) ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
float CellSize ;
FVector2D SpatialBias ;
float ConnectionMaxZ = WORLD_MAX ; // Connection locations have to be <= to this to pull from the grid
2019-04-01 09:05:39 -04:00
/** When the GridBounds is set we limit the creation of cells to be exclusively inside the passed region.
Viewers who gather nodes outside this region will be clamped to the closest cell inside the box .
Actors whose location is outside the box will be clamped to the closest cell inside the box .
*/
void SetBiasAndGridBounds ( const FBox & GridBox ) ;
2018-10-29 10:01:28 -04:00
// Allow graph to override function for creating cell nodes in this grid.
TFunction < UReplicationGraphNode_GridCell * ( UReplicationGraphNode_GridSpatialization2D * Parent ) > CreateCellNodeOverride ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
void ForceRebuild ( ) { bNeedsRebuild = true ; }
2021-10-12 21:21:22 -04:00
// Marks a class as preventing spatial rebuilds when an instance leaves the grid
void AddToClassRebuildDenyList ( UClass * Class ) { ClassRebuildDenyList . Set ( Class , true ) ; }
UE_DEPRECATED ( 5.0 , " Use AddToClassRebuildDenyList instead " )
void AddSpatialRebuildBlacklistClass ( UClass * Class ) { AddToClassRebuildDenyList ( Class ) ; }
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
# if !(UE_BUILD_SHIPPING || UE_BUILD_TEST)
TArray < FString > DebugActorNames ;
# endif
2019-04-08 21:05:50 -04:00
// When enabled the RepGraph tells clients to destroy dormant dynamic actors when they go out of relevancy.
bool bDestroyDormantDynamicActors = true ;
2018-06-07 22:39:07 -04:00
protected :
/** For adding new actor to the graph */
virtual void AddActorInternal_Dynamic ( const FNewReplicatedActorInfo & ActorInfo ) ;
2018-11-16 14:01:06 -05:00
virtual void AddActorInternal_Static ( const FNewReplicatedActorInfo & ActorInfo , FGlobalActorReplicationInfo & ActorRepInfo , bool IsDormancyDriven ) ; // Can differ the actual call to implementation if actor is not ready
virtual void AddActorInternal_Static_Implementation ( const FNewReplicatedActorInfo & ActorInfo , FGlobalActorReplicationInfo & ActorRepInfo , bool IsDormancyDriven ) ;
2018-06-07 22:39:07 -04:00
virtual void RemoveActorInternal_Dynamic ( const FNewReplicatedActorInfo & Actor ) ;
virtual void RemoveActorInternal_Static ( const FNewReplicatedActorInfo & Actor , FGlobalActorReplicationInfo & ActorRepInfo , bool WasAddedAsDormantActor ) ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
private :
2019-04-01 09:05:39 -04:00
bool WillActorLocationGrowSpatialBounds ( const FVector & Location ) const ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
/** Called when an actor is out of spatial bounds */
void HandleActorOutOfSpatialBounds ( AActor * Actor , const FVector & Location3D , const bool bStaticActor ) ;
2019-04-01 09:05:39 -04:00
// Optional value to limit the grid to a specific region
FBox GridBounds ;
2018-10-29 10:01:28 -04:00
// Classmap of actor classes which CANNOT force a rebuild of the spatialization tree. They will be clamped instead. E.g, projectiles.
2021-10-12 21:21:22 -04:00
TClassMap < bool > ClassRebuildDenyList ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
struct FActorCellInfo
{
bool IsValid ( ) const { return StartX ! = - 1 ; }
void Reset ( ) { StartX = - 1 ; }
int32 StartX = - 1 ;
int32 StartY ;
int32 EndX ;
int32 EndY ;
} ;
struct FCachedDynamicActorInfo
{
FCachedDynamicActorInfo ( const FNewReplicatedActorInfo & InInfo ) : ActorInfo ( InInfo ) { }
FNewReplicatedActorInfo ActorInfo ;
FActorCellInfo CellInfo ;
} ;
TMap < FActorRepListType , FCachedDynamicActorInfo > DynamicSpatializedActors ;
struct FCachedStaticActorInfo
{
FCachedStaticActorInfo ( const FNewReplicatedActorInfo & InInfo , bool bInDormDriven ) : ActorInfo ( InInfo ) , bDormancyDriven ( bInDormDriven ) { }
FNewReplicatedActorInfo ActorInfo ;
bool bDormancyDriven = false ; // This actor will be removed from static actor list if it becomes non dormant.
} ;
TMap < FActorRepListType , FCachedStaticActorInfo > StaticSpatializedActors ;
2018-11-16 14:01:06 -05:00
// Static spatialized actors that were not fully initialized when registering with this node. We differ their placement in the grid until the next frame
struct FPendingStaticActors
{
FPendingStaticActors ( const FActorRepListType & InActor , const bool InDormancyDriven ) : Actor ( InActor ) , DormancyDriven ( InDormancyDriven ) { }
bool operator = = ( const FActorRepListType & InActor ) const { return InActor = = Actor ; } ;
FActorRepListType Actor ;
bool DormancyDriven ;
} ;
TArray < FPendingStaticActors > PendingStaticSpatializedActors ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
void OnNetDormancyChange ( FActorRepListType Actor , FGlobalActorReplicationInfo & GlobalInfo , ENetDormancy NewVlue , ENetDormancy OldValue ) ;
void PutStaticActorIntoCell ( const FNewReplicatedActorInfo & ActorInfo , FGlobalActorReplicationInfo & ActorRepInfo , bool bDormancyDriven ) ;
2018-10-29 10:01:28 -04:00
UReplicationGraphNode_GridCell * GetCellNode ( UReplicationGraphNode_GridCell * & NodePtr )
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
{
2018-10-29 10:01:28 -04:00
if ( NodePtr = = nullptr )
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
{
2018-10-29 10:01:28 -04:00
if ( CreateCellNodeOverride )
{
NodePtr = CreateCellNodeOverride ( this ) ;
}
else
{
NodePtr = CreateChildNode < UReplicationGraphNode_GridCell > ( ) ;
}
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
}
2018-10-29 10:01:28 -04:00
return NodePtr ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
}
TArray < TArray < UReplicationGraphNode_GridCell * > > Grid ;
TArray < UReplicationGraphNode_GridCell * > & GetGridX ( int32 X )
{
if ( Grid . Num ( ) < = X )
{
Grid . SetNum ( X + 1 ) ;
}
return Grid [ X ] ;
}
UReplicationGraphNode_GridCell * & GetCell ( TArray < UReplicationGraphNode_GridCell * > & GridX , int32 Y )
{
if ( GridX . Num ( ) < = Y )
{
GridX . SetNum ( Y + 1 ) ;
}
return GridX [ Y ] ;
2019-04-08 21:05:50 -04:00
}
UReplicationGraphNode_GridCell * & GetCell ( int32 X , int32 Y )
{
TArray < UReplicationGraphNode_GridCell * > & GridX = GetGridX ( X ) ;
return GetCell ( GridX , Y ) ;
}
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
bool bNeedsRebuild = false ;
void GetGridNodesForActor ( FActorRepListType Actor , const FGlobalActorReplicationInfo & ActorRepInfo , TArray < UReplicationGraphNode_GridCell * > & OutNodes ) ;
void GetGridNodesForActor ( FActorRepListType Actor , const UReplicationGraphNode_GridSpatialization2D : : FActorCellInfo & CellInfo , TArray < UReplicationGraphNode_GridCell * > & OutNodes ) ;
2019-04-08 13:33:31 -04:00
FActorCellInfo GetCellInfoForActor ( FActorRepListType Actor , const FVector & Location3D , float CullDistance ) ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
// This is a reused TArray for gathering actor nodes. Just to prevent using a stack based TArray everywhere or static/reset patten.
TArray < UReplicationGraphNode_GridCell * > GatheredNodes ;
friend class AReplicationGraphDebugActor ;
} ;
// -----------------------------------
UCLASS ( )
class REPLICATIONGRAPH_API UReplicationGraphNode_AlwaysRelevant : public UReplicationGraphNode
{
GENERATED_BODY ( )
public :
UReplicationGraphNode_AlwaysRelevant ( ) ;
virtual void NotifyAddNetworkActor ( const FNewReplicatedActorInfo & Actor ) override { }
2018-06-07 22:39:07 -04:00
virtual bool NotifyRemoveNetworkActor ( const FNewReplicatedActorInfo & ActorInfo , bool bWarnIfNotFound = true ) override { return false ; }
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
virtual void NotifyResetAllNetworkActors ( ) override { }
virtual void PrepareForReplication ( ) override ;
virtual void GatherActorListsForConnection ( const FConnectionGatherActorListParameters & Params ) override ;
void AddAlwaysRelevantClass ( UClass * Class ) ;
protected :
UPROPERTY ( )
2021-01-27 17:40:25 -04:00
TObjectPtr < UReplicationGraphNode > ChildNode = nullptr ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
// Explicit list of classes that are always relevant. This
TArray < UClass * > AlwaysRelevantClasses ;
} ;
// -----------------------------------
2019-04-17 13:24:49 -04:00
USTRUCT ( )
struct FAlwaysRelevantActorInfo
{
GENERATED_BODY ( )
UPROPERTY ( )
2021-01-27 17:40:25 -04:00
TObjectPtr < const UNetConnection > Connection = nullptr ;
2019-04-17 13:24:49 -04:00
UPROPERTY ( )
2021-01-27 17:40:25 -04:00
TObjectPtr < AActor > LastViewer = nullptr ;
2019-04-17 13:24:49 -04:00
UPROPERTY ( )
2021-01-27 17:40:25 -04:00
TObjectPtr < AActor > LastViewTarget = nullptr ;
2019-04-17 13:24:49 -04:00
bool operator = = ( UNetConnection * Other ) const
{
return Connection = = Other ;
}
} ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
/** Adds actors that are always relevant for a connection. This engine version just adds the PlayerController and ViewTarget (usually the pawn) */
UCLASS ( )
2018-06-07 22:39:07 -04:00
class REPLICATIONGRAPH_API UReplicationGraphNode_AlwaysRelevant_ForConnection : public UReplicationGraphNode_ActorList
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
{
GENERATED_BODY ( )
public :
2018-06-07 22:39:07 -04:00
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
virtual void GatherActorListsForConnection ( const FConnectionGatherActorListParameters & Params ) override ;
2020-10-22 19:19:16 -04:00
virtual void TearDown ( ) override ;
2018-06-07 22:39:07 -04:00
/** Rebuilt-every-frame list based on UNetConnection state */
FActorRepListRefView ReplicationActorList ;
2019-04-17 13:24:49 -04:00
/** List of previously (or currently if nothing changed last tick) focused actor data per connection */
2019-05-15 13:13:22 -04:00
UPROPERTY ( )
TArray < FAlwaysRelevantActorInfo > PastRelevantActors ;
2020-10-29 13:38:15 -04:00
protected :
virtual void OnCollectActorRepListStats ( struct FActorRepListStatCollector & StatsCollector ) const override ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
} ;
// -----------------------------------
USTRUCT ( )
struct FTearOffActorInfo
{
GENERATED_BODY ( )
2019-01-11 02:57:03 -05:00
FTearOffActorInfo ( ) : TearOffFrameNum ( 0 ) , Actor ( nullptr ) , bHasReppedOnce ( false ) { }
FTearOffActorInfo ( AActor * InActor , uint32 InTearOffFrameNum ) : TearOffFrameNum ( InTearOffFrameNum ) , Actor ( InActor ) , bHasReppedOnce ( false ) { }
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
uint32 TearOffFrameNum ;
UPROPERTY ( )
2021-01-27 17:40:25 -04:00
TObjectPtr < AActor > Actor ;
2019-01-11 02:57:03 -05:00
bool bHasReppedOnce ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
} ;
2019-06-09 12:57:48 -04:00
/** Manages actors that are Tear Off. We will try to replicate these actors one last time to each connection. */
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
UCLASS ( )
class REPLICATIONGRAPH_API UReplicationGraphNode_TearOff_ForConnection : public UReplicationGraphNode
{
GENERATED_BODY ( )
public :
2022-02-11 14:56:39 -05:00
virtual void Serialize ( FArchive & Ar ) override ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
virtual void NotifyAddNetworkActor ( const FNewReplicatedActorInfo & ActorInfo ) override { }
2018-06-07 22:39:07 -04:00
virtual bool NotifyRemoveNetworkActor ( const FNewReplicatedActorInfo & ActorInfo , bool bWarnIfNotFound = true ) override { return false ; }
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
virtual void NotifyResetAllNetworkActors ( ) override { TearOffActors . Reset ( ) ; }
virtual void GatherActorListsForConnection ( const FConnectionGatherActorListParameters & Params ) override ;
virtual void LogNode ( FReplicationGraphDebugInfo & DebugInfo , const FString & NodeName ) const override ;
2019-01-11 02:57:03 -05:00
void NotifyTearOffActor ( AActor * Actor , uint32 FrameNum ) ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
// Fixme: not safe to have persistent FActorRepListrefViews yet, so need a uproperty based list to hold the persistent items.
UPROPERTY ( )
TArray < FTearOffActorInfo > TearOffActors ;
FActorRepListRefView ReplicationActorList ;
2020-10-29 13:38:15 -04:00
protected :
virtual void OnCollectActorRepListStats ( struct FActorRepListStatCollector & StatsCollector ) const override ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
} ;
// -----------------------------------
/** Manages actor replication for an entire world / net driver */
UCLASS ( transient , config = Engine )
class REPLICATIONGRAPH_API UReplicationGraph : public UReplicationDriver
{
GENERATED_BODY ( )
public :
UReplicationGraph ( ) ;
/** The per-connection manager class to instantiate. This will be read off the instantiated UNetReplicationManager. */
UPROPERTY ( Config )
TSubclassOf < UNetReplicationGraphConnection > ReplicationConnectionManagerClass ;
UPROPERTY ( )
2021-01-27 17:40:25 -04:00
TObjectPtr < UNetDriver > NetDriver ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
/** List of connection managers. This list is not sorted and not stable. */
UPROPERTY ( )
2021-01-27 17:40:25 -04:00
TArray < TObjectPtr < UNetReplicationGraphConnection > > Connections ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
/** ConnectionManagers that we have created but haven't officially been added to the net driver's ClientConnection list. This is a hack for silly order of initialization issues. */
UPROPERTY ( )
2021-01-27 17:40:25 -04:00
TArray < TObjectPtr < UNetReplicationGraphConnection > > PendingConnections ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
/** The max distance between an FActorDestructionInfo and a connection that we will replicate. */
float DestructInfoMaxDistanceSquared = 15000.f * 15000.f ;
2019-01-29 04:41:12 -05:00
//~ Begin UObject Interface
virtual void Serialize ( FArchive & Ar ) override ;
//~ End UObject Interface
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
// --------------------------------------------------------------
2019-01-29 04:41:12 -05:00
//~ Begin UReplicationDriver Interface
2018-10-29 10:01:28 -04:00
virtual void SetRepDriverWorld ( UWorld * InWorld ) override ;
2019-01-29 04:41:12 -05:00
virtual void InitForNetDriver ( UNetDriver * InNetDriver ) override ;
2018-10-29 10:01:28 -04:00
virtual void InitializeActorsInWorld ( UWorld * InWorld ) override ;
2018-05-14 10:06:37 -04:00
virtual void ResetGameWorldState ( ) override { }
2021-04-29 19:32:06 -04:00
virtual void TearDown ( ) override ;
2018-05-14 10:06:37 -04:00
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
/** Called by the NetDriver when the client connection is ready/added to the NetDriver's client connection list */
virtual void AddClientConnection ( UNetConnection * NetConnection ) override ;
virtual void RemoveClientConnection ( UNetConnection * NetConnection ) override ;
virtual void AddNetworkActor ( AActor * Actor ) override ;
2019-01-29 04:41:12 -05:00
virtual void RemoveNetworkActor ( AActor * Actor ) override ;
virtual void ForceNetUpdate ( AActor * Actor ) override ;
virtual void FlushNetDormancy ( AActor * Actor , bool bWasDormInitial ) override ;
virtual void NotifyActorTearOff ( AActor * Actor ) override ;
virtual void NotifyActorFullyDormantForConnection ( AActor * Actor , UNetConnection * Connection ) override ;
virtual void NotifyActorDormancyChange ( AActor * Actor , ENetDormancy OldDormancyState ) override ;
2021-02-18 18:13:28 -04:00
virtual void NotifyDestructionInfoCreated ( AActor * Actor , FActorDestructionInfo & DestructionInfo ) override { }
2019-10-21 20:02:40 -04:00
virtual void SetRoleSwapOnReplicate ( AActor * Actor , bool bSwapRoles ) override ;
2019-01-29 04:41:12 -05:00
virtual bool ProcessRemoteFunction ( class AActor * Actor , UFunction * Function , void * Parameters , FOutParmRec * OutParms , FFrame * Stack , class UObject * SubObject ) override ;
virtual int32 ServerReplicateActors ( float DeltaSeconds ) override ;
virtual void PostTickDispatch ( ) override ;
//~ End UReplicationDriver Interface
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
virtual void RouteAddNetworkActorToNodes ( const FNewReplicatedActorInfo & ActorInfo , FGlobalActorReplicationInfo & GlobalInfo ) ;
virtual void RouteRemoveNetworkActorToNodes ( const FNewReplicatedActorInfo & ActorInfo ) ;
bool IsConnectionReady ( UNetConnection * Connection ) ;
2019-02-22 03:58:16 -05:00
void SetActorDiscoveryBudget ( int32 ActorDiscoveryBudgetInKBytesPerSec ) ;
2020-01-16 14:59:36 -05:00
/** Sets the global and connection-specific cull distance setting of this actor */
void SetAllCullDistanceSettingsForActor ( const FActorRepListType & Actor , float CullDistanceSquared ) ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
// --------------------------------------------------------------
/** Creates a new node for the graph. This and UReplicationNode::CreateChildNode should be the only things that create the graph node UObjects */
template < class T >
T * CreateNewNode ( )
{
T * NewNode = NewObject < T > ( this ) ;
InitNode ( NewNode ) ;
return NewNode ;
}
2022-01-27 17:02:43 -05:00
/** Creates a new node for the graph with a given base name. This and UReplicationNode::CreateChildNode should be the only things that create the graph node UObjects */
template < class T >
T * CreateNewNode ( FName NodeBaseName )
{
FName UniqueNodeName = MakeUniqueObjectName ( this , T : : StaticClass ( ) , NodeBaseName ) ;
T * NewNode = NewObject < T > ( this , UniqueNodeName ) ;
InitNode ( NewNode ) ;
return NewNode ;
}
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
/** Add a global node to the root that will have a chance to emit actor rep lists for all connections */
void AddGlobalGraphNode ( UReplicationGraphNode * GraphNode ) ;
2021-04-08 14:32:07 -04:00
void RemoveGlobalGraphNode ( UReplicationGraphNode * GraphNode ) ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
/** Associate a node to a specific connection. When this connection replicates, this GraphNode will get a chance to add. */
void AddConnectionGraphNode ( UReplicationGraphNode * GraphNode , UNetReplicationGraphConnection * ConnectionManager ) ;
void AddConnectionGraphNode ( UReplicationGraphNode * GraphNode , UNetConnection * NetConnection ) { AddConnectionGraphNode ( GraphNode , FindOrAddConnectionManager ( NetConnection ) ) ; }
void RemoveConnectionGraphNode ( UReplicationGraphNode * GraphNode , UNetReplicationGraphConnection * ConnectionManager ) ;
void RemoveConnectionGraphNode ( UReplicationGraphNode * GraphNode , UNetConnection * NetConnection ) { RemoveConnectionGraphNode ( GraphNode , FindOrAddConnectionManager ( NetConnection ) ) ; }
// --------------------------------------------------------------
virtual UWorld * GetWorld ( ) const override final { return GraphGlobals . IsValid ( ) ? GraphGlobals - > World : nullptr ; }
2018-10-29 10:01:28 -04:00
virtual void LogGraph ( FReplicationGraphDebugInfo & DebugInfo ) const ;
virtual void LogGlobalGraphNodes ( FReplicationGraphDebugInfo & DebugInfo ) const ;
virtual void LogConnectionGraphNodes ( FReplicationGraphDebugInfo & DebugInfo ) const ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
2020-10-29 13:38:15 -04:00
virtual void CollectRepListStats ( struct FActorRepListStatCollector & StatCollector ) const ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
const TSharedPtr < FReplicationGraphGlobalData > & GetGraphGlobals ( ) const { return GraphGlobals ; }
uint32 GetReplicationGraphFrame ( ) const { return ReplicationGraphFrame ; }
2019-08-27 17:30:29 -04:00
# if DO_ENABLE_REPGRAPH_DEBUG_ACTOR
2019-01-18 09:25:18 -05:00
virtual class AReplicationGraphDebugActor * CreateDebugActor ( ) const ;
2019-01-17 11:42:07 -05:00
# endif
2019-08-27 17:30:29 -04:00
/** Print the Net Culling Distance of all actors in the RepGraph. When a connection is specified will also output the cull distance in the connection info list*/
void DebugPrintCullDistances ( UNetReplicationGraphConnection * SpecificConnection = nullptr ) const ;
2018-06-07 22:39:07 -04:00
/** Prioritization Constants: these affect how the final priority of an actor is calculated in the prioritize phase */
struct FPrioritizationConstants
{
2019-02-19 15:08:31 -05:00
float MaxDistanceScaling = 60000.f * 60000.f ; // Distance scaling for prioritization scales up to this distance, everything passed this distance is the same or "capped"
2018-10-29 10:01:28 -04:00
uint32 MaxFramesSinceLastRep = 20 ; // Time since last rep scales up to this
2018-06-07 22:39:07 -04:00
} ;
FPrioritizationConstants PrioritizationConstants ;
2018-10-29 10:01:28 -04:00
struct FFastSharedPathConstants
{
float DistanceRequirementPct = 0.1f ; // Must be this close, as a factor of cull distance *squared*, to use fast shared replication path
int32 MaxBitsPerFrame = 2048 ; // 5kBytes/sec @ 20hz
int32 ListSkipPerFrame = 3 ;
} ;
FFastSharedPathConstants FastSharedPathConstants ;
/** Invoked when a rep list is requested that exceeds the size of the preallocated lists */
static TFunction < void ( int32 ) > OnListRequestExceedsPooledSize ;
2018-11-16 14:01:06 -05:00
// --------------------------------------------------------------
2022-01-12 19:47:06 -05:00
virtual void ReplicateActorsForConnection ( UNetConnection * NetConnection , FPerConnectionActorInfoMap & ConnectionActorInfoMap , UNetReplicationGraphConnection * ConnectionManager , const uint32 FrameNum ) ;
2019-02-22 03:58:16 -05:00
int64 ReplicateSingleActor ( AActor * Actor , FConnectionReplicationActorInfo & ActorInfo , FGlobalActorReplicationInfo & GlobalActorInfo , FPerConnectionActorInfoMap & ConnectionActorInfoMap , UNetReplicationGraphConnection & ConnectionManager , const uint32 FrameNum ) ;
int64 ReplicateSingleActor_FastShared ( AActor * Actor , FConnectionReplicationActorInfo & ConnectionData , FGlobalActorReplicationInfo & GlobalActorInfo , UNetReplicationGraphConnection & ConnectionManager , const uint32 FrameNum ) ;
2018-11-16 14:01:06 -05:00
void UpdateActorChannelCloseFrameNum ( AActor * Actor , FConnectionReplicationActorInfo & ConnectionData , const FGlobalActorReplicationInfo & GlobalData , const uint32 FrameNum , UNetConnection * NetConnection ) const ;
2019-05-03 21:38:19 -04:00
void NotifyConnectionSaturated ( class UNetReplicationGraphConnection & Connection ) ;
2019-12-18 16:13:37 -05:00
void SetActorDestructionInfoToIgnoreDistanceCulling ( AActor * DestroyedActor ) ;
2019-11-26 10:14:18 -05:00
uint16 GetReplicationPeriodFrameForFrequency ( float NetUpdateFrequency ) const
{
check ( NetDriver ) ;
check ( NetUpdateFrequency ! = 0.0f ) ;
// Replication Graph is frame based. Convert NetUpdateFrequency to ReplicationPeriodFrame based on Server MaxTickRate.
uint32 FramesBetweenUpdates = ( uint32 ) FMath : : RoundToInt ( NetDriver - > NetServerMaxTickRate / NetUpdateFrequency ) ;
FramesBetweenUpdates = FMath : : Clamp < uint32 > ( FramesBetweenUpdates , 1 , MAX_uint16 ) ;
return ( uint16 ) FramesBetweenUpdates ;
}
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
protected :
virtual void InitializeForWorld ( UWorld * World ) ;
virtual void InitNode ( UReplicationGraphNode * Node ) ;
/** Override this function to initialize the per-class data for replication */
virtual void InitGlobalActorClassSettings ( ) ;
/** Override this function to init/configure your project's Global Graph */
virtual void InitGlobalGraphNodes ( ) ;
/** Override this function to init/configure graph for a specific connection. Note they do not all have to be unique: connections can share nodes (e.g, 2 nodes for 2 teams) */
virtual void InitConnectionGraphNodes ( UNetReplicationGraphConnection * ConnectionManager ) ;
UNetReplicationGraphConnection * FindOrAddConnectionManager ( UNetConnection * NetConnection ) ;
void HandleStarvedActorList ( const FPrioritizedRepList & List , int32 StartIdx , FPerConnectionActorInfoMap & ConnectionActorInfoMap , uint32 FrameNum ) ;
/** How long, in frames, without replicating before an actor channel is closed on a connection. This is a global value added to the individual actor's ActorChannelFrameTimeout */
uint32 GlobalActorChannelFrameNumTimeout ;
TSharedPtr < FReplicationGraphGlobalData > GraphGlobals ;
2018-06-07 22:39:07 -04:00
/** Temporary List we use while prioritizing actors */
FPrioritizedRepList PrioritizedReplicationList ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
/** A list of nodes that can add actors to all connections. They don't necessarily *have to* add actors to each connection, but they will get a chance to. These are added via ::AddGlobalGraphNode */
UPROPERTY ( )
2021-01-27 17:40:25 -04:00
TArray < TObjectPtr < UReplicationGraphNode > > GlobalGraphNodes ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
/** A list of nodes that want PrepareForReplication() to be called on them at the top of the replication frame. */
UPROPERTY ( )
2021-01-27 17:40:25 -04:00
TArray < TObjectPtr < UReplicationGraphNode > > PrepareForReplicationNodes ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
FGlobalActorReplicationInfoMap GlobalActorReplicationInfoMap ;
/** The authoritative set of "what actors are in the graph" */
TSet < AActor * > ActiveNetworkActors ;
/** Special case handling of specific RPCs. Currently supports immediate send/flush for multicasts */
TMap < FObjectKey /** UFunction* */ , FRPCSendPolicyInfo > RPCSendPolicyMap ;
2018-11-16 14:01:06 -05:00
TClassMap < bool > RPC_Multicast_OpenChannelForClass ; // Set classes to true here to open channel for them when receiving multicast RPC (and within cull distance range)
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
2018-10-29 10:01:28 -04:00
FReplicationGraphCSVTracker CSVTracker ;
FOutBunch * FastSharedReplicationBunch = nullptr ;
class UActorChannel * FastSharedReplicationChannel = nullptr ;
2019-02-19 16:40:41 -05:00
FName FastSharedReplicationFuncName = NAME_None ;
2018-10-29 10:01:28 -04:00
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
# if REPGRAPH_DETAILS
bool bEnableFullActorPrioritizationDetailsAllConnections = false ;
# endif
2022-03-25 09:12:30 -04:00
private :
/** Whether or not a connection was saturated during an update. */
bool bWasConnectionSaturated = false ;
protected :
2018-10-29 10:01:28 -04:00
/** Default Replication Path */
2019-04-17 13:24:49 -04:00
void ReplicateActorListsForConnections_Default ( UNetReplicationGraphConnection * ConnectionManager , FGatheredReplicationActorLists & GatheredReplicationListsForConnection , FNetViewerArray & Viewers ) ;
2018-10-29 10:01:28 -04:00
/** "FastShared" Replication Path */
2019-04-17 13:24:49 -04:00
void ReplicateActorListsForConnections_FastShared ( UNetReplicationGraphConnection * ConnectionManager , FGatheredReplicationActorLists & GatheredReplicationListsForConnection , FNetViewerArray & Viewers ) ;
2018-10-29 10:01:28 -04:00
/** Connections needing a FlushNet in PostTickDispatch */
TArray < UNetConnection * > ConnectionsNeedingsPostTickDispatchFlush ;
2020-09-01 14:07:48 -04:00
virtual void AddReplayViewers ( UNetConnection * NetConnection , FNetViewerArray & Viewers ) { }
2021-02-18 18:13:28 -04:00
/** Collects basic stats on the replicated actors */
struct FFrameReplicationStats
{
// Total number of actors replicated.
int32 NumReplicatedActors = 0 ;
// Number of actors who did not send any data when ReplicateActor was called on them.
int32 NumReplicatedCleanActors = 0 ;
// Number of actors replicated using the fast path.
int32 NumReplicatedFastPathActors = 0 ;
2021-03-18 15:20:03 -04:00
// Total connections replicated to during the tick including children (splitscreen) and replay connections.
int32 NumConnections = 0 ;
2021-02-18 18:13:28 -04:00
void Reset ( )
{
* this = FFrameReplicationStats ( ) ;
}
} ;
/** Event called after ServerReplicateActors to dispatch the replication stats from this frame */
2021-09-06 12:23:53 -04:00
virtual void PostServerReplicateStats ( const FFrameReplicationStats & Stats ) ;
2021-02-18 18:13:28 -04:00
2020-09-01 14:07:48 -04:00
private :
UNetReplicationGraphConnection * FixGraphConnectionList ( TArray < UNetReplicationGraphConnection * > & OutList , int32 & ConnectionId , UNetConnection * RemovedNetConnection ) ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
private :
2021-02-18 18:13:28 -04:00
/** Collect replication data during ServerReplicateActors */
FFrameReplicationStats FrameReplicationStats ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
/** Internal frame counter for replication. This is only updated by us. The one of UNetDriver can be updated by RPC calls and is only used to invalidate shared property CLs/serialiation data. */
uint32 ReplicationGraphFrame = 0 ;
2019-02-22 03:58:16 -05:00
/** Separate bandwidth cap for traffic used when opening actor channels. Ignored if set to 0 */
int32 ActorDiscoveryMaxBitsPerFrame ;
2019-03-18 17:13:59 -04:00
/** Internal time used to track when the next update should occur based on frequency settings. */
float TimeLeftUntilUpdate = 0.f ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
UNetReplicationGraphConnection * CreateClientConnectionManagerInternal ( UNetConnection * Connection ) ;
friend class AReplicationGraphDebugActor ;
} ;
// --------------------------------------------------------------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------------------------------
2019-04-17 13:24:49 -04:00
USTRUCT ( )
struct FLastLocationGatherInfo
{
GENERATED_BODY ( )
2020-01-08 10:41:15 -05:00
FLastLocationGatherInfo ( ) : Connection ( nullptr ) , LastLocation ( ForceInitToZero ) , LastOutOfRangeLocationCheck ( ForceInitToZero ) { }
FLastLocationGatherInfo ( const UNetConnection * InConnection , FVector InLastLocation ) : Connection ( InConnection ) , LastLocation ( InLastLocation ) , LastOutOfRangeLocationCheck ( InLastLocation ) { }
2019-04-17 13:24:49 -04:00
UPROPERTY ( )
2021-01-27 17:40:25 -04:00
TObjectPtr < const UNetConnection > Connection ;
2019-04-17 13:24:49 -04:00
UPROPERTY ( )
FVector LastLocation ;
2020-01-08 10:41:15 -05:00
UPROPERTY ( )
FVector LastOutOfRangeLocationCheck ;
2019-04-17 13:24:49 -04:00
bool operator = = ( UNetConnection * Other ) const
{
return Connection = = Other ;
}
} ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
/** Manages actor replication for a specific connection */
UCLASS ( transient )
class REPLICATIONGRAPH_API UNetReplicationGraphConnection : public UReplicationConnectionDriver
{
GENERATED_BODY ( )
public :
UNetReplicationGraphConnection ( ) ;
UPROPERTY ( )
2021-01-27 17:40:25 -04:00
TObjectPtr < UNetConnection > NetConnection ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
/** A map of all of our per-actor data */
FPerConnectionActorInfoMap ActorInfoMap ;
2018-06-07 22:39:07 -04:00
DECLARE_MULTICAST_DELEGATE_TwoParams ( FOnPostReplicatePrioritizedLists , UNetReplicationGraphConnection * , FPrioritizedRepList * ) ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
FOnPostReplicatePrioritizedLists OnPostReplicatePrioritizeLists ;
DECLARE_MULTICAST_DELEGATE_TwoParams ( FOnClientVisibleLevelNamesAdd , FName , UWorld * ) ;
2018-06-07 22:39:07 -04:00
FOnClientVisibleLevelNamesAdd OnClientVisibleLevelNameAdd ; // Global Delegate, will be called for every level
TMap < FName , FOnClientVisibleLevelNamesAdd > OnClientVisibleLevelNameAddMap ; // LevelName lookup map delegates
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
DECLARE_MULTICAST_DELEGATE_OneParam ( FOnClientVisibleLevelNamesRemove , FName ) ;
FOnClientVisibleLevelNamesRemove OnClientVisibleLevelNameRemove ;
2021-06-22 00:27:54 -04:00
// Stored list of dormant actors in a previous cell when it's been left - this is for
// the dormant dynamic actor destruction feature.
2021-10-12 21:21:22 -04:00
// This property doesn't support multiple spatialization grids and has been switched to use PrevDormantActorListPerNode.
//FActorRepListRefView PrevDormantActorList;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
# if REPGRAPH_DETAILS
bool bEnableFullActorPrioritizationDetails = false ;
# endif
2022-03-25 09:12:30 -04:00
bool bEnableDebugging ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
UPROPERTY ( )
2021-01-27 17:40:25 -04:00
TObjectPtr < class AReplicationGraphDebugActor > DebugActor = nullptr ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
2020-09-01 14:07:48 -04:00
/** Index of the connection in the global list. Will be reassigned when any client disconnects so it is a key that can be referenced only during a single tick */
int32 ConnectionOrderNum ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
2020-09-01 14:07:48 -04:00
// ID that is assigned by the replication graph. Will be reassigned/compacted as clients disconnect. Useful for spacing out connection operations. E.g., not stable but always compact.
UE_DEPRECATED ( 4.26 , " This variable was renamed to ConnectionOrderNum to better reflect that it is not persistent and should not be considered an ID. " )
int32 ConnectionId ;
2019-01-11 02:57:03 -05:00
2019-05-15 13:13:22 -04:00
UPROPERTY ( )
TArray < FLastLocationGatherInfo > LastGatherLocations ;
2019-04-17 13:24:49 -04:00
2019-02-22 03:58:16 -05:00
// Nb of bits sent for actor channel creation when a dedicated budget is allocated for this
int32 QueuedBitsForActorDiscovery = 0 ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
/** Returns connection graph nodes. This is const so that you do not mutate the array itself. You should use AddConnectionGraphNode/RemoveConnectionGraphNode. */
2019-03-22 17:02:53 -04:00
const TArray < UReplicationGraphNode * > & GetConnectionGraphNodes ( ) const { return ConnectionGraphNodes ; }
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
2019-01-29 04:41:12 -05:00
//~ Begin UObject Interface
virtual void Serialize ( FArchive & Ar ) override ;
//~ End UObject Interface
//~ Begin UReplicationConnectionDriver Interface
virtual void TearDown ( ) override ;
2019-04-08 13:31:52 -04:00
virtual void NotifyClientVisibleLevelNamesAdd ( FName LevelName , UWorld * StreamingWorld ) override ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
2019-04-08 13:31:52 -04:00
virtual void NotifyClientVisibleLevelNamesRemove ( FName LevelName ) override { OnClientVisibleLevelNameRemove . Broadcast ( LevelName ) ; }
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
virtual void NotifyActorChannelAdded ( AActor * Actor , class UActorChannel * Channel ) override ;
virtual void NotifyActorChannelRemoved ( AActor * Actor ) override ;
virtual void NotifyActorChannelCleanedUp ( UActorChannel * Channel ) override ;
virtual void NotifyAddDestructionInfo ( FActorDestructionInfo * DestructInfo ) override ;
virtual void NotifyRemoveDestructionInfo ( FActorDestructionInfo * DestructInfo ) override ;
2020-01-09 16:30:55 -05:00
virtual void NotifyAddDormantDestructionInfo ( AActor * Actor ) override ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
virtual void NotifyResetDestructionInfo ( ) override ;
2019-01-29 04:41:12 -05:00
//~ End UReplicationConnectionDriver Interface
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
2020-01-09 16:30:55 -05:00
virtual void NotifyResetAllNetworkActors ( ) ;
2019-04-17 13:24:49 -04:00
/** Generates a set of all the visible level names for this connection and its subconnections (if any) */
virtual void GetClientVisibleLevelNames ( TSet < FName > & OutLevelNames ) const ;
2021-10-12 21:21:22 -04:00
FActorRepListRefView & GetPrevDormantActorListForNode ( const UReplicationGraphNode * GridNode ) ;
void RemoveActorFromAllPrevDormantActorLists ( AActor * InActor ) ;
2019-04-08 13:31:52 -04:00
private :
2021-10-12 21:21:22 -04:00
// Stored list of dormant actors in a previous cell when it's been left - this is for
// the dormant dynamic actor destruction feature.
TMap < TObjectKey < UReplicationGraphNode > , FActorRepListRefView > PrevDormantActorListPerNode ;
2019-04-08 13:31:52 -04:00
friend UReplicationGraph ;
2022-05-16 16:47:35 -04:00
/** Holds relevant data when parsing deleted actors that could be sent to a viewer */
struct FRepGraphDestructionViewerInfo
{
FRepGraphDestructionViewerInfo ( ) = default ;
FRepGraphDestructionViewerInfo ( const FVector & InViewerLocation , const FVector & InOutOfRangeLocationCheck )
: ViewerLocation ( InViewerLocation )
, LastOutOfRangeLocationCheck ( InOutOfRangeLocationCheck )
{ }
FVector ViewerLocation ;
FVector LastOutOfRangeLocationCheck ;
} ;
typedef TArray < FRepGraphDestructionViewerInfo , TInlineAllocator < REPGRAPH_VIEWERS_PER_CONNECTION > > FRepGraphDestructionViewerInfoArray ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
// ----------------------------------------
/** Called right after this is created to associate with the owning Graph */
void InitForGraph ( UReplicationGraph * Graph ) ;
/** Called after InitForGraph is called to associate this connection manager with a net connection */
void InitForConnection ( UNetConnection * Connection ) ;
/** Adds a node to this connection manager */
void AddConnectionGraphNode ( UReplicationGraphNode * Node ) ;
/** Remove a node to this connection manager */
void RemoveConnectionGraphNode ( UReplicationGraphNode * Node ) ;
bool PrepareForReplication ( ) ;
2022-05-16 16:47:35 -04:00
int64 ReplicateDestructionInfos ( const FRepGraphDestructionViewerInfoArray & DestructionViewersInfo , const FReplicationGraphDestructionSettings & DestructionSettings ) ;
2019-01-11 02:57:03 -05:00
int64 ReplicateDormantDestructionInfos ( ) ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
2020-01-08 10:41:15 -05:00
/** Update the last location for viewers on a connection */
void UpdateGatherLocationsForConnection ( const FNetViewerArray & ConnectionViewers , const FReplicationGraphDestructionSettings & DestructionSettings ) ;
/** Update the location info of a specific viewer */
void OnUpdateViewerLocation ( FLastLocationGatherInfo * LocationInfo , const FNetViewer & Viewer , const FReplicationGraphDestructionSettings & DestructionSettings ) ;
2021-09-27 19:54:25 -04:00
void SetActorNotDormantOnConnection ( AActor * InActor ) ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
UPROPERTY ( )
2021-01-27 17:40:25 -04:00
TArray < TObjectPtr < UReplicationGraphNode > > ConnectionGraphNodes ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
UPROPERTY ( )
2021-01-27 17:40:25 -04:00
TObjectPtr < UReplicationGraphNode_TearOff_ForConnection > TearOffNode ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
/** DestructionInfo handling. This is how we send "delete this actor" to clients when the actor is deleted on the server (placed in map actors) */
struct FCachedDestructInfo
{
2018-11-16 14:01:06 -05:00
FCachedDestructInfo ( FActorDestructionInfo * InDestructInfo ) : DestructionInfo ( InDestructInfo ) , CachedPosition ( InDestructInfo - > DestroyedPosition ) { }
2020-01-08 10:41:15 -05:00
bool operator = = ( const FCachedDestructInfo & rhs ) const { return DestructionInfo = = rhs . DestructionInfo ; } ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
bool operator = = ( const FActorDestructionInfo * InDestructInfo ) const { return InDestructInfo = = DestructionInfo ; } ;
FActorDestructionInfo * DestructionInfo ;
FVector CachedPosition ;
2019-01-29 04:41:12 -05:00
void CountBytes ( FArchive & Ar ) const
{
if ( DestructionInfo )
{
Ar . CountBytes ( sizeof ( FActorDestructionInfo ) , sizeof ( FActorDestructionInfo ) ) ;
DestructionInfo - > CountBytes ( Ar ) ;
}
}
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
} ;
2020-01-08 10:41:15 -05:00
/**
* List of destroyed actors that were too far from the connection to be relevant .
* Is periodically evaluated when the viewer crosses a specific distance .
*/
TArray < FCachedDestructInfo > OutOfRangeDestroyedActors ;
/** List of destroyed actors that need to be replicated */
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
TArray < FCachedDestructInfo > PendingDestructInfoList ;
2020-01-08 10:41:15 -05:00
/** Set used to guard against double adds into PendingDestructInfoList */
TSet < FActorDestructionInfo * > TrackedDestructionInfoPtrs ;
2019-01-11 02:57:03 -05:00
struct FCachedDormantDestructInfo
{
TWeakObjectPtr < ULevel > Level ;
TWeakObjectPtr < UObject > ObjOuter ;
FNetworkGUID NetGUID ;
FString PathName ;
} ;
2020-01-08 10:41:15 -05:00
/** List of dormant actors that should be removed from the client */
2019-01-11 02:57:03 -05:00
TArray < FCachedDormantDestructInfo > PendingDormantDestructList ;
2021-08-03 11:56:47 -04:00
/** Set used to guard against double adds into PendingDormantDestructList */
TSet < FNetworkGUID > TrackedDormantDestructionInfos ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
} ;
// --------------------------------------------------------------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------------------------------
/** Specialized actor for replicating debug information about replication to specific connections. This actor is never spawned in shipping builds and never counts towards bandwidth limits */
UCLASS ( NotPlaceable , Transient )
class REPLICATIONGRAPH_API AReplicationGraphDebugActor : public AActor
{
GENERATED_BODY ( )
public :
AReplicationGraphDebugActor ( )
{
bReplicates = true ; // must be set for RPCs to be sent
}
// To prevent demo netdriver from replicating.
virtual bool IsNetRelevantFor ( const AActor * RealViewer , const AActor * ViewTarget , const FVector & SrcLocation ) const override { return false ; }
virtual bool IsReplayRelevantFor ( const AActor * RealViewer , const AActor * ViewTarget , const FVector & SrcLocation , const float CullDistanceSquared ) const override { return false ; }
UPROPERTY ( )
2021-01-27 17:40:25 -04:00
TObjectPtr < UReplicationGraph > ReplicationGraph ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
2019-08-27 17:30:29 -04:00
UFUNCTION ( Server , Reliable )
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
void ServerStartDebugging ( ) ;
2019-08-27 17:30:29 -04:00
UFUNCTION ( Server , Reliable )
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
void ServerStopDebugging ( ) ;
2019-08-27 17:30:29 -04:00
UFUNCTION ( Server , Reliable )
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
void ServerCellInfo ( ) ;
2019-08-27 17:30:29 -04:00
UFUNCTION ( Server , Reliable )
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
void ServerPrintAllActorInfo ( const FString & Str ) ;
2019-08-27 17:30:29 -04:00
UFUNCTION ( Server , Reliable )
2018-06-07 22:39:07 -04:00
void ServerSetCullDistanceForClass ( UClass * Class , float CullDistance ) ;
2019-08-27 17:30:29 -04:00
UFUNCTION ( Server , Reliable )
2018-10-29 10:01:28 -04:00
void ServerSetPeriodFrameForClass ( UClass * Class , int32 PeriodFrame ) ;
2019-08-27 17:30:29 -04:00
UFUNCTION ( Server , Reliable )
2018-11-16 14:01:06 -05:00
void ServerSetConditionalActorBreakpoint ( AActor * Actor ) ;
2019-08-27 17:30:29 -04:00
UFUNCTION ( Server , Reliable )
void ServerPrintCullDistances ( ) ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
UFUNCTION ( Client , Reliable )
void ClientCellInfo ( FVector CellLocation , FVector CellExtent , const TArray < AActor * > & Actors ) ;
void PrintCullDistances ( ) ;
void PrintAllActorInfo ( FString MatchString ) ;
UPROPERTY ( )
2021-01-27 17:40:25 -04:00
TObjectPtr < UNetReplicationGraphConnection > ConnectionManager ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
virtual UNetConnection * GetNetConnection ( ) const override ;
} ;
2020-01-08 10:41:15 -05:00
// --------------------------------------------------------------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------------------------------
struct FReplicationGraphDestructionSettings
{
FReplicationGraphDestructionSettings ( float InDestructInfoMaxDistanceSquared , float InOutOfRangeDistanceCheckThresholdSquared )
: DestructInfoMaxDistanceSquared ( InDestructInfoMaxDistanceSquared )
, OutOfRangeDistanceCheckThresholdSquared ( InOutOfRangeDistanceCheckThresholdSquared )
2022-05-16 16:47:35 -04:00
, MaxPendingListDistanceSquared ( DestructInfoMaxDistanceSquared + OutOfRangeDistanceCheckThresholdSquared )
2020-01-08 10:41:15 -05:00
{ }
float DestructInfoMaxDistanceSquared ;
float OutOfRangeDistanceCheckThresholdSquared ;
2022-05-16 16:47:35 -04:00
float MaxPendingListDistanceSquared ;
2020-01-08 10:41:15 -05:00
} ;