Files
UnrealEngineUWP/Engine/Plugins/Runtime/ReplicationGraph/Source/Private/ReplicationGraph.cpp

6063 lines
237 KiB
C++
Raw Normal View History

// 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
//
/**
*
* ===================== TODO / WIP Notes =====================
*
* TODO Missing Features:
* -bNetTemporary
*
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
* --------------------------------
*
* Game Code API
*
*
* Function Status (w/ RepDriver enabled)
* ----------------------------------------------------------------------------------------
* ForceNetUpdate Compatible/Working
* FlushNetDormancy Compatible/Working
* SetNetUpdateTime NOOP
* ForceNetRelevant NOOP
* ForceActorRelevantNextUpdate NOOP
*
* FindOrAddNetworkObjectInfo NOOP. Accessing legacy system data directly. This sucks and should never have been exposed to game code directly.
* FindNetworkObjectInfo NOOP. Will want to deprecate both of these functions and get them out of our code base
*
*
* FastShared Path information:
* ------------------------------
* -Bind FClassReplicationInfo::FastSharedReplicationFunc to a function. That function should call a NetMulticast, Unrelable RPC with some parameters.
* -Those parameters are your "fastshared" data. It should be a struct of shareable data (no UObject references of connection specific data).
* -Return actors of this type in a list with the EActorRepListTypeFlags::FastShared flag.
* -UReplicationGraphNode_ActorListFrequencyBuckets can do this. See ::GatherActorListsForConnection.
* -(You must opt in to this by setting UReplicationGraphNode_ActorListFrequencyBuckets::EnableFastPath=true)
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
*
*/
#include "ReplicationGraph.h"
#include "EngineGlobals.h"
#include "Engine/World.h"
#include "Engine/LocalPlayer.h"
#include "EngineUtils.h"
#include "Engine/Engine.h"
#include "Net/DataReplication.h"
#include "Engine/ActorChannel.h"
#include "Engine/NetworkObjectList.h"
#include "Net/RepLayout.h"
#include "Net/UnrealNetwork.h"
#include "Net/NetworkProfiler.h"
#include "HAL/LowLevelMemTracker.h"
#include "UObject/UObjectIterator.h"
#include "Engine/Level.h"
#include "Templates/UnrealTemplate.h"
#include "Stats/StatsMisc.h"
#include "Net/DataChannel.h"
#include "UObject/UObjectGlobals.h"
#include "DrawDebugHelpers.h"
#include "Misc/ScopeExit.h"
#include "Net/NetworkGranularMemoryLogging.h"
#include "Net/Core/Trace/NetTrace.h"
#include "Engine/ServerStatReplicator.h"
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 USE_SERVER_PERF_COUNTERS
#include "PerfCountersModule.h"
#endif
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 CVar_RepGraph_Pause = 0;
static FAutoConsoleVariableRef CVarRepGraphPause(TEXT("Net.RepGraph.Pause"), CVar_RepGraph_Pause,
TEXT("Pauses actor replication in the Replication Graph."), ECVF_Default);
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 CVar_RepGraph_Frequency = 0;
static FAutoConsoleVariableRef CVarRepGraphFrequency(TEXT("Net.RepGraph.Frequency.Override"), CVar_RepGraph_Frequency,
TEXT("Explicit override for actor replication frequency"), ECVF_Default);
int32 CVar_RepGraph_Frequency_MatchTargetInPIE = 1;
static FAutoConsoleVariableRef CVarRepGraphFrequencyMatchTargetInPIE(TEXT("Net.RepGraph.Frequency.MatchTargetInPIE"), CVar_RepGraph_Frequency_MatchTargetInPIE,
TEXT("In PIE, repgraph will update at the UNetDriver::NetServerMaxTickRate rate"), ECVF_Default);
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 CVar_RepGraph_UseLegacyBudget = 1;
static FAutoConsoleVariableRef CVarRepGraphUseLegacyBudget(TEXT("Net.RepGraph.UseLegacyBudget"), CVar_RepGraph_UseLegacyBudget,
TEXT("Use legacy IsNetReady() to make dynamic packget budgets"), ECVF_Default);
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 CVar_RepGraph_FixedBudget = 0;
static FAutoConsoleVariableRef CVarRepGraphFixedBudge(TEXT("Net.RepGraph.FixedBudget"), CVar_RepGraph_FixedBudget,
TEXT("Set fixed (independent of frame rate) packet budget. In BIts/frame"), ECVF_Default);
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 CVar_RepGraph_SkipDistanceCull = 0;
static FAutoConsoleVariableRef CVarRepGraphSkipDistanceCull(TEXT("Net.RepGraph.SkipDistanceCull"), CVar_RepGraph_SkipDistanceCull,
TEXT("Debug option to skip distance culling during evaluation"), ECVF_Default);
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 CVar_RepGraph_PrintCulledOnConnectionClasses = 0;
static FAutoConsoleVariableRef CVarRepGraphPrintCulledOnConnectionClasses(TEXT("Net.RepGraph.PrintCulledOnConnectionClasses"), CVar_RepGraph_PrintCulledOnConnectionClasses,
TEXT("Debug option to print culling stats"), ECVF_Default);
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 CVar_RepGraph_TrackClassReplication = 0;
static FAutoConsoleVariableRef CVarRepGraphTrackClassReplication(TEXT("Net.RepGraph.TrackClassReplication"), CVar_RepGraph_TrackClassReplication,
TEXT("Debug option to track class replication stats"), ECVF_Default);
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 CVar_RepGraph_NbDestroyedGridsToTriggerGC = 100;
static FAutoConsoleVariableRef CVarRepGraphNbDestroyedGridsToTriggerGC(TEXT("Net.RepGraph.NbDestroyedGridsToTriggerGC"), CVar_RepGraph_NbDestroyedGridsToTriggerGC,
TEXT("After destroying this many grids, force a garbage collection to free memory"), ECVF_Default);
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 CVar_RepGraph_PrintTrackClassReplication = 0;
static FAutoConsoleVariableRef CVarRepGraphPrintTrackClassReplication(TEXT("Net.RepGraph.PrintTrackClassReplication"), CVar_RepGraph_PrintTrackClassReplication,
TEXT("Debug option to print class replication stats"), ECVF_Default);
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 CVar_RepGraph_DormantDynamicActorsDestruction = 0;
static FAutoConsoleVariableRef CVarRepGraphDormantDynamicActorsDestruction(TEXT("Net.RepGraph.DormantDynamicActorsDestruction"), CVar_RepGraph_DormantDynamicActorsDestruction,
TEXT("If true, irrelevant dormant actors will be destroyed on the client"), ECVF_Default);
int32 CVar_RepGraph_ReplicatedDormantDestructionInfosPerFrame = MAX_int32;
static FAutoConsoleVariableRef CVarRepGraphReplicatedDormantDestructionInfosPerFrame(TEXT("Net.RepGraph.ReplicatedDormantDestructionInfosPerFrame"), CVar_RepGraph_ReplicatedDormantDestructionInfosPerFrame,
TEXT("If CVarRepGraphDormantDynamicActorsDestruction is true, this is the max number of destruction infos sent to a client per frame"), ECVF_Default);
float CVar_RepGraph_OutOfRangeDistanceCheckRatio = 0.5f;
static FAutoConsoleVariableRef CVarRepGraphOutOfRangeDistanceCheckRatio(TEXT("Net.RepGraph.OutOfRangeDistanceCheckRatio"), CVar_RepGraph_OutOfRangeDistanceCheckRatio,
TEXT("The ratio of DestructInfoMaxDistance that gives the distance traveled before we reevaluate the out of range destroyed actors list"), ECVF_Default);
int32 CVar_RepGraph_DormancyNode_ObsoleteBehavior = 0;
static FAutoConsoleVariableRef CVarRepGraphDormancyNodeObsoleteBehavior(TEXT("Net.RepGraph.DormancyNodeObsoleteBehavior"), CVar_RepGraph_DormancyNode_ObsoleteBehavior, TEXT("This changes how the dormancy node deals with obsolete nodes. 0 = ignore. 1 = lazily destroy the node"), ECVF_Default);
static TAutoConsoleVariable<float> CVar_ForceConnectionViewerPriority(TEXT("Net.RepGraph.ForceConnectionViewerPriority"), 1, TEXT("Force the connection's player controller and viewing pawn as topmost priority."));
int32 CVar_RepGraph_GridSpatialization2D_DestroyDormantDynamicActorsDefault = 1;
static FAutoConsoleVariableRef CVarRepGraphGridSpatialization2DDestroyDormantDynamicActorsDefault(TEXT("Net.RepGraph.GridSpatialization2DDestroyDormantDynamicActorsDefault"), CVar_RepGraph_GridSpatialization2D_DestroyDormantDynamicActorsDefault, TEXT("Configure what the default for UReplicationGraphNode_GridSpatialization2D::DestroyDormantDynamicActors should be."), ECVF_Default);
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
REPGRAPH_DEVCVAR_SHIPCONST(int32, "Net.RepGraph.LogNetDormancyDetails", CVar_RepGraph_LogNetDormancyDetails, 0, "Logs actors that are removed from the replication graph/nodes.");
REPGRAPH_DEVCVAR_SHIPCONST(int32, "Net.RepGraph.LogActorRemove", CVar_RepGraph_LogActorRemove, 0, "Logs actors that are removed from the replication graph/nodes.");
REPGRAPH_DEVCVAR_SHIPCONST(int32, "Net.RepGraph.LogActorAdd", CVar_RepGraph_LogActorAdd, 0, "Logs actors that are added to replication graph/nodes.");
REPGRAPH_DEVCVAR_SHIPCONST(int32, "Net.RepGraph.Verify", CVar_RepGraph_Verify, 0, "Additional, slow, verification is done on replication graph nodes. Guards against: invalid actors and dupes");
REPGRAPH_DEVCVAR_SHIPCONST(int32, "Net.RepGraph.DisableBandwithLimit", CVar_RepGraph_DisableBandwithLimit, 0, "Disables the IsNetReady() check, effectively replicating all actors that want to replicate 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
REPGRAPH_DEVCVAR_SHIPCONST(int32, "Net.RepGraph.TrickleDistCullOnDormancyNodes", CVar_RepGraph_TrickleDistCullOnDormancyNodes, 1, "Actors in a dormancy node that are distance culled will trickle through as dormancy node empties");
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
REPGRAPH_DEVCVAR_SHIPCONST(int32, "Net.RepGraph.EnableRPCSendPolicy", CVar_RepGraph_EnableRPCSendPolicy, 1, "Enables RPC send policy (e.g, force certain functions to send immediately rather than be queued)");
REPGRAPH_DEVCVAR_SHIPCONST(int32, "Net.RepGraph.EnableFastSharedPath", CVar_RepGraph_EnableFastSharedPath, 1, "Enables FastShared replication path for lists with EActorRepListTypeFlags::FastShared flag");
REPGRAPH_DEVCVAR_SHIPCONST(int32, "Net.RepGraph.EnableDynamicAllocationWarnings", CVar_RepGraph_EnableDynamicAllocationWarnings, 1, "Enables debug information whenever RepGraph needs to allocate new Actor Lists.");
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_STATS_GROUP(TEXT("ReplicationDriver"), STATGROUP_RepDriver, STATCAT_Advanced);
DECLARE_DWORD_COUNTER_STAT(TEXT("Rep Actor List Dupes"), STAT_NetRepActorListDupes, STATGROUP_RepDriver);
DECLARE_DWORD_COUNTER_STAT(TEXT("Actor Channels Opened"), STAT_NetActorChannelsOpened, STATGROUP_RepDriver);
DECLARE_DWORD_COUNTER_STAT(TEXT("Actor Channels Closed"), STAT_NetActorChannelsClosed, STATGROUP_RepDriver);
DECLARE_DWORD_COUNTER_STAT(TEXT("Num Processed Connections"), STAT_NumProcessedConnections, STATGROUP_RepDriver);
CSV_DEFINE_CATEGORY(ReplicationGraphMS, WITH_SERVER_CODE);
CSV_DEFINE_CATEGORY(ReplicationGraphKBytes, WITH_SERVER_CODE);
CSV_DEFINE_CATEGORY(ReplicationGraphChannelsOpened, WITH_SERVER_CODE);
CSV_DEFINE_CATEGORY(ReplicationGraphNumReps, WITH_SERVER_CODE);
CSV_DEFINE_CATEGORY(ReplicationGraphVisibleLevels, WITH_SERVER_CODE);
CSV_DEFINE_CATEGORY(ReplicationGraphForcedUpdates, WITH_SERVER_CODE);
CSV_DEFINE_CATEGORY(ReplicationGraphCleanMS, WITH_SERVER_CODE);
CSV_DEFINE_CATEGORY(ReplicationGraphCleanNumReps, WITH_SERVER_CODE);
CSV_DEFINE_CATEGORY(ReplicationGraph, WITH_SERVER_CODE);
static TAutoConsoleVariable<FString> CVarRepGraphConditionalBreakpointActorName(TEXT("Net.RepGraph.ConditionalBreakpointActorName"), TEXT(""),
TEXT("Helper CVar for debugging. Set this string to conditionally log/breakpoint various points in the repgraph pipeline. Useful for bugs like 'why is this actor channel closing'"), ECVF_Default );
// Variable that can be programatically set to a specific actor/connection
FActorConnectionPair DebugActorConnectionPair;
/** Used to call Describe on a Connection or Channel, handling the null case. */
template<typename T>
static FORCEINLINE FString DescribeSafe(T* Describable)
{
return Describable ? Describable->Describe() : FString(TEXT("None"));
}
FORCEINLINE bool RepGraphConditionalActorBreakpoint(AActor* Actor, UNetConnection* NetConnection)
{
#if !(UE_BUILD_SHIPPING)
if (CVarRepGraphConditionalBreakpointActorName.GetValueOnGameThread().Len() > 0 && GetNameSafe(Actor).Contains(CVarRepGraphConditionalBreakpointActorName.GetValueOnGameThread()))
{
return true;
}
// Alternatively, DebugActorConnectionPair can be set by code to catch a specific actor/connection pair
if (DebugActorConnectionPair.Actor.Get() == Actor && (DebugActorConnectionPair.Connection == nullptr || DebugActorConnectionPair.Connection == NetConnection ))
{
return true;
}
#endif
return false;
}
// CVar that can be set to catch actor channel open/closing problems. This catches if we open/close actor channels for the same actor/connection pair too many times.
REPGRAPH_DEVCVAR_SHIPCONST(int32, "Net.RepGraph.ActorChannelWarnThreshold", CVar_RepGraph_WarnThreshold, 0, "");
TMap<FActorConnectionPair, int32> ActorChannelCreateCounter;
TMap<FActorConnectionPair, int32> ActorChannelDestroyCounter;
#if WITH_SERVER_CODE
static TAutoConsoleVariable<FString> CVarRepGraphConditionalPairActorName(TEXT("Net.RepGraph.ConditionalPairName"), TEXT(""), TEXT(""), ECVF_Default );
void UpdateActorConnectionCounter(AActor* InActor, UNetConnection* InConnection, TMap<FActorConnectionPair, int32>& Counter)
{
#if !(UE_BUILD_SHIPPING)
if (CVar_RepGraph_WarnThreshold <= 0)
{
return;
}
if (CVarRepGraphConditionalPairActorName.GetValueOnGameThread().Len() > 0 && !GetNameSafe(InActor).Contains(CVarRepGraphConditionalPairActorName.GetValueOnGameThread()))
{
return;
}
if (DebugActorConnectionPair.Actor.IsValid() == false)
{
int32& Count = Counter.FindOrAdd( FActorConnectionPair(InActor, InConnection) );
Count++;
if (Count > CVar_RepGraph_WarnThreshold)
{
UE_LOG(LogReplicationGraph, Warning, TEXT("Setting WARN Pair: %s - %s"), *GetPathNameSafe(InActor), *InConnection->Describe());
DebugActorConnectionPair = FActorConnectionPair(InActor, InConnection);
}
}
#endif
}
#endif // WITH_SERVER_CODE
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
// --------------------------------------------------------------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------------------------------
TFunction<void(int32)> UReplicationGraph::OnListRequestExceedsPooledSize;
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
UReplicationGraph::UReplicationGraph()
{
ReplicationConnectionManagerClass = UNetReplicationGraphConnection::StaticClass();
GlobalActorChannelFrameNumTimeout = 2;
ActorDiscoveryMaxBitsPerFrame = 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
if (!HasAnyFlags(RF_ClassDefaultObject))
{
GraphGlobals = MakeShared<FReplicationGraphGlobalData>();
GraphGlobals->GlobalActorReplicationInfoMap = &GlobalActorReplicationInfoMap;
GraphGlobals->ReplicationGraph = this;
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
}
// Rebindable function for handling rep list requests that exceed preallocated pool size
#if !(UE_BUILD_SHIPPING || UE_BUILD_TEST)
if (!OnListRequestExceedsPooledSize)
{
OnListRequestExceedsPooledSize = [](int32 NewExpectedSize)
{
if (CVar_RepGraph_EnableDynamicAllocationWarnings)
{
FReplicationGraphDebugInfo DebugInfo(*GLog);
DebugInfo.Flags = FReplicationGraphDebugInfo::ShowNativeClasses;
for (TObjectIterator<UReplicationGraph> It; It; ++It)
{
It->LogGraph(DebugInfo);
}
ensureAlwaysMsgf(false, TEXT("Very large replication list size requested. NewExpectedSize: %d"), NewExpectedSize);
}
};
}
#endif
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
}
extern void CountReplicationGraphSharedBytes_Private(FArchive& Ar);
void UReplicationGraph::Serialize(FArchive& Ar)
{
Super::Serialize(Ar);
if (Ar.IsCountingMemory())
{
GRANULAR_NETWORK_MEMORY_TRACKING_INIT(Ar, "UReplicationGraph::Serialize");
// Currently, there is some global memory associated with RepGraph.
// If there happens to be multiple RepGraphs, that would cause it to be counted multiple times.
// This works, as "obj list" is the primary use case of counting memory, but it would break
// if different legitimate memory counts happened in the same frame.
static uint64 LastSharedCountFrame = 0;
if (GFrameCounter != LastSharedCountFrame)
{
LastSharedCountFrame = GFrameCounter;
GRANULAR_NETWORK_MEMORY_TRACKING_TRACK("RepGraphSharedBytes", CountReplicationGraphSharedBytes_Private(Ar));
}
GRANULAR_NETWORK_MEMORY_TRACKING_TRACK("PrioritizedReplicationList", PrioritizedReplicationList.CountBytes(Ar));
GRANULAR_NETWORK_MEMORY_TRACKING_TRACK("GlobalActorReplicationInfoMap", GlobalActorReplicationInfoMap.CountBytes(Ar));
GRANULAR_NETWORK_MEMORY_TRACKING_TRACK("ActiveNetworkActors", ActiveNetworkActors.CountBytes(Ar));
GRANULAR_NETWORK_MEMORY_TRACKING_TRACK("RPCSendPolicyMap", RPCSendPolicyMap.CountBytes(Ar));
GRANULAR_NETWORK_MEMORY_TRACKING_TRACK("RPC_Multicast_OpenChannelForClass", RPC_Multicast_OpenChannelForClass.CountBytes(Ar));
GRANULAR_NETWORK_MEMORY_TRACKING_TRACK("CSVTracker", CSVTracker.CountBytes(Ar));
if (FastSharedReplicationBunch)
{
GRANULAR_NETWORK_MEMORY_TRACKING_TRACK("FastSharedReplicationBunch",
Ar.CountBytes(sizeof(FOutBunch), sizeof(FOutBunch));
FastSharedReplicationBunch->CountMemory(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
void UReplicationGraph::InitForNetDriver(UNetDriver* InNetDriver)
{
#if WITH_SERVER_CODE
LLM_SCOPE_BYTAG(NetRepGraph);
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
NetDriver = InNetDriver;
InitGlobalActorClassSettings();
InitGlobalGraphNodes();
for (UNetConnection* ClientConnection : NetDriver->ClientConnections)
{
AddClientConnection(ClientConnection);
}
#endif // WITH_SERVER_CODE
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 UReplicationGraph::TearDown()
{
CSVTracker.TearDown();
Super::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
void UReplicationGraph::InitNode(UReplicationGraphNode* Node)
{
Node->Initialize(GraphGlobals);
if (Node->GetRequiresPrepareForReplication())
{
PrepareForReplicationNodes.Add(Node);
}
}
void UReplicationGraph::InitGlobalActorClassSettings()
{
// AInfo and APlayerControllers have no world location, so distance scaling should always be 0
FClassReplicationInfo NonSpatialClassInfo;
NonSpatialClassInfo.DistancePriorityScale = 0.f;
GlobalActorReplicationInfoMap.SetClassInfo( AInfo::StaticClass(), NonSpatialClassInfo );
GlobalActorReplicationInfoMap.SetClassInfo( APlayerController::StaticClass(), NonSpatialClassInfo );
RPC_Multicast_OpenChannelForClass.Reset();
RPC_Multicast_OpenChannelForClass.Set(AActor::StaticClass(), true); // Open channels for multicast RPCs by default
RPC_Multicast_OpenChannelForClass.Set(AController::StaticClass(), false); // multicasts should never open channels on Controllers since opening a channel on a non-owner breaks the Controller's replication.
RPC_Multicast_OpenChannelForClass.Set(AServerStatReplicator::StaticClass(), 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
}
void UReplicationGraph::InitGlobalGraphNodes()
{
// TODO: We should come up with a basic/default implementation for people to use to model
}
void UReplicationGraph::InitConnectionGraphNodes(UNetReplicationGraphConnection* ConnectionManager)
{
// This handles tear off actors. Child classes should call Super::InitConnectionGraphNodes.
ConnectionManager->TearOffNode = CreateNewNode<UReplicationGraphNode_TearOff_ForConnection>();
ConnectionManager->AddConnectionGraphNode(ConnectionManager->TearOffNode);
}
void UReplicationGraph::AddGlobalGraphNode(UReplicationGraphNode* GraphNode)
{
GlobalGraphNodes.Add(GraphNode);
}
void UReplicationGraph::RemoveGlobalGraphNode(UReplicationGraphNode* GraphNode)
{
if(GraphNode)
{
GlobalGraphNodes.RemoveSwap(GraphNode);
PrepareForReplicationNodes.RemoveSwap(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
void UReplicationGraph::AddConnectionGraphNode(UReplicationGraphNode* GraphNode, UNetReplicationGraphConnection* ConnectionManager)
{
ConnectionManager->AddConnectionGraphNode(GraphNode);
}
void UReplicationGraph::RemoveConnectionGraphNode(UReplicationGraphNode* GraphNode, UNetReplicationGraphConnection* ConnectionManager)
{
ConnectionManager->RemoveConnectionGraphNode(GraphNode);
}
UNetReplicationGraphConnection* UReplicationGraph::FindOrAddConnectionManager(UNetConnection* NetConnection)
{
#if WITH_SERVER_CODE
check(NetConnection);
// Children do not have a connection manager, this is handled by their parent.
// We do not want to create connection managers for children, so redirect them.
if (NetConnection->GetUChildConnection() != nullptr)
{
NetConnection = ((UChildConnection*)NetConnection)->Parent;
UE_LOG(LogReplicationGraph, Verbose, TEXT("UReplicationGraph::FindOrAddConnectionManager was called with a child connection, redirecting to parent"));
check(NetConnection != nullptr);
}
check(NetConnection->GetDriver() == 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
// Could use an acceleration map if necessary
RG_QUICK_SCOPE_CYCLE_COUNTER(UReplicationGraph_FindConnectionManager)
for (UNetReplicationGraphConnection* ConnManager : Connections)
{
if (ConnManager->NetConnection == NetConnection)
{
return ConnManager;
}
}
for (UNetReplicationGraphConnection* ConnManager : PendingConnections)
{
if (ConnManager->NetConnection == NetConnection)
{
return ConnManager;
}
}
// We dont have one yet, create one but put it in the pending list. ::AddClientConnection *should* be called soon!
UNetReplicationGraphConnection* NewManager = CreateClientConnectionManagerInternal(NetConnection);
PendingConnections.Add(NewManager);
return NewManager;
#else
return nullptr;
#endif // WITH_SERVER_CODE
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 UReplicationGraph::AddClientConnection(UNetConnection* NetConnection)
{
#if WITH_SERVER_CODE
// Children do not have a connection manager, do not proceed with this function in this case.
// Default behavior never calls this function with child connections anyways, so this is really only here for protection.
if (NetConnection->GetUChildConnection() != nullptr)
{
UE_LOG(LogReplicationGraph, Warning, TEXT("UReplicationGraph::AddClientConnection was called with a child connection, dropping."));
return;
}
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
// We may have already created a manager for this connection in the pending list
for (int32 i=PendingConnections.Num()-1; i >= 0; --i)
{
if (UNetReplicationGraphConnection* ConnManager = PendingConnections[i])
{
if (ConnManager->NetConnection == NetConnection)
{
PendingConnections.RemoveAtSwap(i, 1, false);
Connections.Add(ConnManager);
return;
}
}
}
// Create it
Connections.Add(CreateClientConnectionManagerInternal(NetConnection));
#endif // WITH_SERVER_CODE
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* UReplicationGraph::CreateClientConnectionManagerInternal(UNetConnection* Connection)
{
repCheckf(Connection->GetReplicationConnectionDriver() == nullptr, TEXT("Connection %s on NetDriver %s already has a ReplicationConnectionDriver %s"), *GetNameSafe(Connection), *GetNameSafe(Connection->Driver), *Connection->GetReplicationConnectionDriver()->GetName() );
// Create the object
UNetReplicationGraphConnection* NewConnectionManager = NewObject<UNetReplicationGraphConnection>(this, ReplicationConnectionManagerClass.Get());
// Give it an ID
const int32 NewConnectionNum = Connections.Num() + PendingConnections.Num();
NewConnectionManager->ConnectionOrderNum = NewConnectionNum;
PRAGMA_DISABLE_DEPRECATION_WARNINGS
NewConnectionManager->ConnectionId = NewConnectionNum;
PRAGMA_ENABLE_DEPRECATION_WARNINGS
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 it with us
NewConnectionManager->InitForGraph(this);
// Associate NetConnection with it
NewConnectionManager->InitForConnection(Connection);
// Create Graph Nodes for this specific connection
InitConnectionGraphNodes(NewConnectionManager);
return NewConnectionManager;
}
UNetReplicationGraphConnection* UReplicationGraph::FixGraphConnectionList(TArray<UNetReplicationGraphConnection*>& OutList, int32& ConnectionNum, UNetConnection* RemovedNetConnection)
{
UNetReplicationGraphConnection* RemovedGraphConnection(nullptr);
for (int32 Index = 0; Index < OutList.Num(); ++Index)
{
UNetReplicationGraphConnection* CurrentGraphConnection = OutList[Index];
if (CurrentGraphConnection->NetConnection != RemovedNetConnection)
{
// Fix the ConnectionOrderNum
const int32 NewConnectionNum = ConnectionNum++;
CurrentGraphConnection->ConnectionOrderNum = NewConnectionNum;
PRAGMA_DISABLE_DEPRECATION_WARNINGS
CurrentGraphConnection->ConnectionId = NewConnectionNum;
PRAGMA_ENABLE_DEPRECATION_WARNINGS
}
else
{
// Found the connection to remove
ensureMsgf(RemovedGraphConnection==nullptr, TEXT("Found multiple GraphConnections for the same NetConnection: %s. PreviousGraphConnection(%i): %s | CurrentGraphConnection(%i): %s"),
*RemovedNetConnection->Describe(),
RemovedGraphConnection->ConnectionOrderNum, *RemovedGraphConnection->GetName(),
CurrentGraphConnection->ConnectionOrderNum, *CurrentGraphConnection->GetName());
RemovedGraphConnection = CurrentGraphConnection;
OutList.RemoveAtSwap(Index--, 1, false);
}
}
return RemovedGraphConnection;
}
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 UReplicationGraph::RemoveClientConnection(UNetConnection* NetConnection)
{
// Children do not have a connection manager, do not attempt to remove it here.
// Default behavior never calls this function with child connections anyways, so this is really only here for protection.
if (NetConnection->GetUChildConnection() != nullptr)
{
UE_LOG(LogReplicationGraph, Warning, TEXT("UReplicationGraph::RemoveClientConnection was called with a child connection!"));
return;
}
int32 ConnectionNum = 0;
UNetReplicationGraphConnection* ActiveGraphConnectionRemoved = FixGraphConnectionList(Connections, ConnectionNum, NetConnection);
UNetReplicationGraphConnection* PendingGraphConnectionRemoved = FixGraphConnectionList(PendingConnections, ConnectionNum, NetConnection);
if (ActiveGraphConnectionRemoved)
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
{
ActiveGraphConnectionRemoved->TearDown();
ensure(PendingGraphConnectionRemoved == 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
if (PendingGraphConnectionRemoved)
{
PendingGraphConnectionRemoved->TearDown();
ensure(ActiveGraphConnectionRemoved == 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
if (!ActiveGraphConnectionRemoved && !PendingGraphConnectionRemoved)
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
{
// At least one list should have found the connection
UE_LOG(LogReplicationGraph, Warning, TEXT("UReplicationGraph::RemoveClientConnection could not find connection in Connection (%d) or PendingConnections (%d) lists"), *GetNameSafe(NetConnection), Connections.Num(), PendingConnections.Num());
}
}
void UReplicationGraph::SetRepDriverWorld(UWorld* InWorld)
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 (GraphGlobals.IsValid())
{
GraphGlobals->World = InWorld;
}
}
void UReplicationGraph::InitializeActorsInWorld(UWorld* InWorld)
{
#if WITH_SERVER_CODE
check(GraphGlobals.IsValid());
checkf(GraphGlobals->World == InWorld, TEXT("UReplicationGraph::InitializeActorsInWorld world mismatch. %s vs %s"), *GetPathNameSafe(GraphGlobals->World), *GetPathNameSafe(InWorld));
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 (InWorld)
{
if (InWorld->AreActorsInitialized())
{
InitializeForWorld(InWorld);
}
else
{
// World isn't initialized yet. This happens when launching into a map directly from command line
InWorld->OnActorsInitialized.AddLambda([&](const UWorld::FActorsInitializedParams& P)
{
this->InitializeForWorld(P.World);
});
}
}
#endif // WITH_SERVER_CODE
}
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 UReplicationGraph::InitializeForWorld(UWorld* World)
{
#if WITH_SERVER_CODE
LLM_SCOPE_BYTAG(NetRepGraph);
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
ActiveNetworkActors.Reset();
GlobalActorReplicationInfoMap.ResetActorMap();
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
for (UReplicationGraphNode* Manager : GlobalGraphNodes)
{
Manager->NotifyResetAllNetworkActors();
}
for (UNetReplicationGraphConnection* RepGraphConnection : Connections)
{
RepGraphConnection->NotifyResetAllNetworkActors();
}
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 (World)
{
for (FActorIterator Iter(World); Iter; ++Iter)
{
AActor* Actor = *Iter;
if (IsValid(Actor) && ULevel::IsNetActor(Actor))
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
{
AddNetworkActor(Actor);
}
}
}
#endif // WITH_SERVER_CODE
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 UReplicationGraph::AddNetworkActor(AActor* Actor)
{
LLM_SCOPE_BYTAG(NetRepGraph);
QUICK_SCOPE_CYCLE_COUNTER(UReplicationGraph_AddNetworkActor);
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 (IsActorValidForReplicationGather(Actor) == false)
{
return;
}
if (NetDriver && !NetDriver->ShouldReplicateActor(Actor))
{
return;
}
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 bWasAlreadyThere = false;
ActiveNetworkActors.Add(Actor, &bWasAlreadyThere);
if (bWasAlreadyThere)
{
// Guarding against double adds
return;
}
// Create global rep info
FGlobalActorReplicationInfo& GlobalInfo = GlobalActorReplicationInfoMap.Get(Actor);
GlobalInfo.bWantsToBeDormant = Actor->NetDormancy > DORM_Awake;
RouteAddNetworkActorToNodes(FNewReplicatedActorInfo(Actor), GlobalInfo);
}
void UReplicationGraph::SetRoleSwapOnReplicate(AActor* Actor, bool bSwapRoles)
{
if (FGlobalActorReplicationInfo* GlobalInfo = GlobalActorReplicationInfoMap.Find(Actor))
{
GlobalInfo->bSwapRolesOnReplicate = bSwapRoles;
}
}
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 UReplicationGraph::RouteAddNetworkActorToNodes(const FNewReplicatedActorInfo& ActorInfo, FGlobalActorReplicationInfo& GlobalInfo)
{
// The base implementation just routes to every global node. Subclasses will want a more direct routing function where possible.
for (UReplicationGraphNode* Node : GlobalGraphNodes)
{
Node->NotifyAddNetworkActor(ActorInfo);
}
}
void UReplicationGraph::RemoveNetworkActor(AActor* Actor)
{
QUICK_SCOPE_CYCLE_COUNTER(UReplicationGraph_RemoveNetworkActor);
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 (ActiveNetworkActors.Remove(Actor) == 0)
{
// Guarding against double removes
return;
}
// Tear off actors have already been removed from the nodes, so we don't need to route them again.
if (Actor->GetTearOff() == false)
{
UE_CLOG(CVar_RepGraph_LogActorRemove > 0, LogReplicationGraph, Display, TEXT("UReplicationGraph::RemoveNetworkActor %s"), *Actor->GetFullName());
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
RouteRemoveNetworkActorToNodes(FNewReplicatedActorInfo(Actor));
}
GlobalActorReplicationInfoMap.Remove(Actor);
{
QUICK_SCOPE_CYCLE_COUNTER(UReplicationGraph_RemoveNetworkActor_FromConnectionsMap);
for (UNetReplicationGraphConnection* ConnectionManager : Connections)
{
ConnectionManager->ActorInfoMap.RemoveActor(Actor);
ConnectionManager->RemoveActorFromAllPrevDormantActorLists(Actor);
}
}
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 UReplicationGraph::RouteRemoveNetworkActorToNodes(const FNewReplicatedActorInfo& ActorInfo)
{
QUICK_SCOPE_CYCLE_COUNTER(UReplicationGraph_RouteRemoveNetworkActorToNodes);
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 implementation just routes to every global node. Subclasses will want a more direct routing function where possible.
for (UReplicationGraphNode* Node : GlobalGraphNodes)
{
Node->NotifyRemoveNetworkActor(ActorInfo);
}
}
void UReplicationGraph::ForceNetUpdate(AActor* Actor)
{
if (FGlobalActorReplicationInfo* RepInfo = GlobalActorReplicationInfoMap.Find(Actor))
{
RepInfo->ForceNetUpdateFrame = ReplicationGraphFrame;
#if REPGRAPH_ENABLE_FORCENETUPDATE_DELEGATE
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
RepInfo->Events.ForceNetUpdate.Broadcast(Actor, *RepInfo);
#endif // REPGRAPH_ENABLE_FORCENETUPDATE_DELEGATE
CSVTracker.PostActorForceUpdated(Actor->GetClass());
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 UReplicationGraph::FlushNetDormancy(AActor* Actor, bool bWasDormInitial)
{
QUICK_SCOPE_CYCLE_COUNTER(UReplicationGraph_FlushNetDormancy);
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 (Actor->IsActorInitialized() == false)
{
UE_CLOG(CVar_RepGraph_LogActorAdd > 0, LogReplicationGraph, Display, TEXT("UReplicationGraph::FlushNetDormancy called on %s but not fully initiailized yet. Discarding."), *Actor->GetPathName());
return;
}
if (IsActorValidForReplication(Actor) == false)
{
UE_CLOG(CVar_RepGraph_LogNetDormancyDetails > 0, LogReplicationGraph, Display, TEXT("UReplicationGraph::FlushNetDormancy called on %s. Ignored since actor is destroyed or about to be"), *Actor->GetPathName());
return;
}
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
FGlobalActorReplicationInfo& GlobalInfo = GlobalActorReplicationInfoMap.Get(Actor);
const bool bNewWantsToBeDormant = (Actor->NetDormancy > DORM_Awake);
UE_CLOG(CVar_RepGraph_LogNetDormancyDetails > 0, LogReplicationGraph, Display, TEXT("UReplicationGraph::FlushNetDormancy %s. Old WantsToBeDormant: %d. New WantsToBeDormant: %d"), *Actor->GetPathName(), GlobalInfo.bWantsToBeDormant, bNewWantsToBeDormant);
if (GlobalInfo.bWantsToBeDormant != bNewWantsToBeDormant)
{
UE_LOG(LogReplicationGraph, Verbose, TEXT("UReplicationGraph::FlushNetDormancy %s. WantsToBeDormant is changing (%d -> %d) from a Flush! We expect NotifyActorDormancyChange to be called first."), *Actor->GetPathName(), (bool)GlobalInfo.bWantsToBeDormant, bNewWantsToBeDormant);
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
GlobalInfo.bWantsToBeDormant = Actor->NetDormancy > DORM_Awake;
}
if (GlobalInfo.bWantsToBeDormant == false)
{
// This actor doesn't want to be dormant. Suppress the Flush call into the nodes. This is to prevent wasted work since the AActor code calls NotifyActorDormancyChange then Flush always.
return;
}
if (ReplicationGraphFrame == GlobalInfo.LastFlushNetDormancyFrame)
{
// We already did this work this frame, we can early out
return;
}
GlobalInfo.LastFlushNetDormancyFrame = ReplicationGraphFrame;
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 (bWasDormInitial)
{
AddNetworkActor(Actor);
}
FNotifyActorFlushDormancy DormancyFlushEvent = GlobalInfo.Events.DormancyFlush;
DormancyFlushEvent.Broadcast(Actor, GlobalInfo);
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
// Stinks to have to iterate through like this, especially when net driver is doing a similar thing.
// Dormancy should probably be rewritten.
for (UNetReplicationGraphConnection* ConnectionManager: Connections)
{
ConnectionManager->SetActorNotDormantOnConnection(Actor);
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 UReplicationGraph::NotifyActorTearOff(AActor* Actor)
{
// All connections that currently have a channel for the actor will put this actor on their TearOffNode.
for (UNetReplicationGraphConnection* ConnectionManager: Connections)
{
if (FConnectionReplicationActorInfo* Info = ConnectionManager->ActorInfoMap.Find(Actor))
{
UActorChannel* Channel = Info->Channel;
if (Channel && Channel->Actor)
{
Info->bTearOff = true; // Tells ServerReplicateActors to close the channel the next time this replicates
ConnectionManager->TearOffNode->NotifyTearOffActor(Actor, Info->LastRepFrameNum); // Tells this connection to gather this actor (until it replicates again)
}
}
}
// Remove the actor from the rest of the graph. The tear off node will add it from here.
RouteRemoveNetworkActorToNodes(FNewReplicatedActorInfo(Actor));
}
void UReplicationGraph::NotifyActorFullyDormantForConnection(AActor* Actor, UNetConnection* Connection)
{
RG_QUICK_SCOPE_CYCLE_COUNTER(UReplicationGraph_NotifyActorFullyDormantForConnection);
// Children do not have a connection manager, so redirect as necessary.
// This is unlikely to be reached as child connections don't open their own channels
if (Connection->GetUChildConnection() != nullptr)
{
Connection = ((UChildConnection*)Connection)->Parent;
UE_LOG(LogReplicationGraph, Warning, TEXT("UReplicationGraph::NotifyActorFullyDormantForConnection was called for a child connection %s on actor %s"), *Connection->GetName(), *Actor->GetName());
check(Connection != 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
// This is kind of bad but unavoidable. Possibly could use acceleration map (actor -> connections) but that would be a pain to maintain.
for (UNetReplicationGraphConnection* ConnectionManager: Connections)
{
if (ConnectionManager->NetConnection == Connection)
{
if (FConnectionReplicationActorInfo* Info = ConnectionManager->ActorInfoMap.Find(Actor))
{
Info->bDormantOnConnection = true;
}
break;
}
}
}
void UReplicationGraph::NotifyActorDormancyChange(AActor* Actor, ENetDormancy OldDormancyState)
{
QUICK_SCOPE_CYCLE_COUNTER(UReplicationGraph_NotifyActorDormancyChange);
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
FGlobalActorReplicationInfo* ActorRepInfo = GlobalActorReplicationInfoMap.Find(Actor);
if (!ActorRepInfo)
{
UE_CLOG(CVar_RepGraph_LogNetDormancyDetails > 0, LogReplicationGraph, Display, TEXT("UReplicationGraph::NotifyActorDormancyChange %s. Ignoring change since actor is not registered yet."), *Actor->GetPathName());
return;
}
if (IsActorValidForReplication(Actor) == false)
{
UE_CLOG(CVar_RepGraph_LogNetDormancyDetails > 0, LogReplicationGraph, Display, TEXT("UReplicationGraph::NotifyActorDormancyChange %s. Ignoring change since actor is destroyed or about to be."), *Actor->GetPathName());
return;
}
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
ENetDormancy CurrentDormancy = Actor->NetDormancy;
UE_CLOG(CVar_RepGraph_LogNetDormancyDetails > 0, LogReplicationGraph, Display, TEXT("UReplicationGraph::NotifyActorDormancyChange %s. Old WantsToBeDormant: %d. New WantsToBeDormant: %d"), *Actor->GetPathName(), ActorRepInfo->bWantsToBeDormant, CurrentDormancy > DORM_Awake ? 1 : 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
const bool bOldWantsToBeDormant = OldDormancyState > DORM_Awake;
const bool bNewWantsToBeDormant = CurrentDormancy > DORM_Awake;
ActorRepInfo->bWantsToBeDormant = bNewWantsToBeDormant;
ActorRepInfo->Events.DormancyChange.Broadcast(Actor, *ActorRepInfo, CurrentDormancy, OldDormancyState);
// Is the actor coming out of dormancy via changing its dormancy state?
if (!bNewWantsToBeDormant && bOldWantsToBeDormant)
{
// Since the actor will now be in a non dormant state, calls to FlushNetDormancy will be be suppressed.
// So we need to clear the per-connection dormancy bool here, since the one in FlushNetDormancy won't do it.
for (UNetReplicationGraphConnection* ConnectionManager: Connections)
{
ConnectionManager->SetActorNotDormantOnConnection(Actor);
}
}
}
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
FORCEINLINE bool ReadyForNextReplication(FConnectionReplicationActorInfo& ConnectionData, FGlobalActorReplicationInfo& GlobalData, const uint32 FrameNum)
{
return (ConnectionData.NextReplicationFrameNum <= FrameNum || GlobalData.ForceNetUpdateFrame > ConnectionData.LastRepFrameNum);
}
FORCEINLINE bool ReadyForNextReplication_FastPath(FConnectionReplicationActorInfo& ConnectionData, FGlobalActorReplicationInfo& GlobalData, const uint32 FrameNum)
{
return (ConnectionData.FastPath_NextReplicationFrameNum <= FrameNum || GlobalData.ForceNetUpdateFrame > ConnectionData.FastPath_LastRepFrameNum);
}
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
// ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
// Server Replicate Actors
// ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FNativeClassAccumulator ChangeClassAccumulator;
FNativeClassAccumulator NoChangeClassAccumulator;
#if !(UE_BUILD_SHIPPING || UE_BUILD_TEST)
bool bTrackClassReplication = false;
#else
const bool bTrackClassReplication = false;
#endif
int32 UReplicationGraph::ServerReplicateActors(float DeltaSeconds)
{
LLM_SCOPE_BYTAG(NetRepGraph);
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)
if (CVar_RepGraph_Pause)
{
return 0;
}
// Frequency throttling: intended for testing and PIE special case
int32 TargetUpdatesPerSecond = CVar_RepGraph_Frequency; // Explicit override for testing
#if WITH_EDITOR
if ( CVar_RepGraph_Frequency <= 0 && CVar_RepGraph_Frequency_MatchTargetInPIE > 0)
{
if (GIsEditor && GIsPlayInEditorWorld)
{
// When PIE, use target server tick rate. This is not perfect but will be closer than letting rep graph tick every frame.
TargetUpdatesPerSecond = NetDriver->NetServerMaxTickRate;
}
}
#endif
const float TimeBetweenUpdates = TargetUpdatesPerSecond > 0 ? (1.f / (float)TargetUpdatesPerSecond) : 0.f;
TimeLeftUntilUpdate -= DeltaSeconds;
if (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
{
return 0;
}
TimeLeftUntilUpdate = TimeBetweenUpdates;
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
#endif
SCOPED_NAMED_EVENT(UReplicationGraph_ServerReplicateActors, FColor::Green);
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
++NetDriver->ReplicationFrame; // This counter is used by RepLayout to utilize CL/serialization sharing. We must increment it ourselves, but other places can increment it too, in order to invalidate the shared state.
const uint32 FrameNum = ReplicationGraphFrame; // This counter is used internally and drives all frame based replication logic.
FrameReplicationStats.Reset();
bWasConnectionSaturated = false;
TSet<UNetConnection*> ConnectionsToClose;
ON_SCOPE_EXIT
{
// We increment this after our replication has happened. If we increment at the beginning of this function, then we rep with FrameNum X, then start the next game frame with the same FrameNum X. If at the top of that frame,
// when processing packets, ticking, etc, we get calls to TearOff, ForceNetUpdate etc which make use of ReplicationGraphFrame, they will be using a stale frame num. So we could replicate, get a server move next frame, ForceNetUpdate, but think we
// already replicated this frame.
ReplicationGraphFrame++;
for (UNetConnection* ConnectionToClose : ConnectionsToClose)
{
ConnectionToClose->Close();
}
};
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 WITH_SERVER_CODE
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
// -------------------------------------------------------
// PREPARE (Global)
// -------------------------------------------------------
{
QUICK_SCOPE_CYCLE_COUNTER(NET_PrepareReplication);
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
for (UReplicationGraphNode* Node : PrepareForReplicationNodes)
{
Node->PrepareForReplication();
}
}
// -------------------------------------------------------
// For Each Connection
// -------------------------------------------------------
// Total number of children processed, added to all the connections later for stat tracking purposes.
int32 NumChildrenConnectionsProcessed = 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
for (UNetReplicationGraphConnection* ConnectionManager: Connections)
{
// Prepare for Replication also handles children as well.
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 (ConnectionManager->PrepareForReplication() == false)
{
// Connection is not ready to replicate
continue;
}
FNetViewerArray ConnectionViewers;
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
UNetConnection* const NetConnection = ConnectionManager->NetConnection;
APlayerController* const PC = NetConnection->PlayerController;
FPerConnectionActorInfoMap& ConnectionActorInfoMap = ConnectionManager->ActorInfoMap;
repCheckf(NetConnection->GetReplicationConnectionDriver() == ConnectionManager, TEXT("NetConnection %s mismatch rep driver. %s vs %s"), *GetNameSafe(NetConnection), *GetNameSafe(NetConnection->GetReplicationConnectionDriver()), *GetNameSafe(ConnectionManager));
const bool bReplayConnection = NetConnection->IsReplay();
if (bReplayConnection && !NetConnection->IsReplayReady())
{
// replay isn't ready to record right now
continue;
}
CSV_SCOPED_TIMING_STAT_EXCLUSIVE_CONDITIONAL(ReplayNetConnection, bReplayConnection);
ConnectionViewers.Emplace(NetConnection, 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
// Send ClientAdjustments (movement RPCs) do this first and never let bandwidth saturation suppress these.
if (PC)
{
PC->SendClientAdjustment();
}
// Do the above but on all splitscreen connections as well.
for (int32 ChildIdx = 0; ChildIdx < NetConnection->Children.Num(); ++ChildIdx)
{
UNetConnection* ChildConnection = NetConnection->Children[ChildIdx];
if (ChildConnection && ChildConnection->PlayerController && ChildConnection->ViewTarget)
{
ChildConnection->PlayerController->SendClientAdjustment();
ConnectionViewers.Emplace(ChildConnection, 0.f);
}
}
NumChildrenConnectionsProcessed += NetConnection->Children.Num();
// treat all other non-replay connections as viewers
if (bReplayConnection)
{
for (UNetReplicationGraphConnection* RepGraphConn : Connections)
{
if ((RepGraphConn->NetConnection != NetConnection) && !RepGraphConn->NetConnection->IsReplay() && RepGraphConn->PrepareForReplication())
{
ConnectionViewers.Emplace(RepGraphConn->NetConnection, 0.f);
}
}
AddReplayViewers(NetConnection, ConnectionViewers);
}
ON_SCOPE_EXIT
{
NetConnection->TrackReplicationForAnalytics(bWasConnectionSaturated);
bWasConnectionSaturated = false;
};
const FReplicationGraphDestructionSettings DestructionSettings(DestructInfoMaxDistanceSquared, CVar_RepGraph_OutOfRangeDistanceCheckRatio * DestructInfoMaxDistanceSquared);
ConnectionManager->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
// --------------------------------------------------------------------------------------------------------------
// GATHER list of ReplicationLists for this connection
// --------------------------------------------------------------------------------------------------------------
FGatheredReplicationActorLists GatheredReplicationListsForConnection;
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
TSet<FName> AllVisibleLevelNames;
ConnectionManager->GetClientVisibleLevelNames(AllVisibleLevelNames);
const FConnectionGatherActorListParameters Parameters(ConnectionViewers, *ConnectionManager, AllVisibleLevelNames, FrameNum, GatheredReplicationListsForConnection);
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
{
QUICK_SCOPE_CYCLE_COUNTER(NET_ReplicateActors_GatherForConnection);
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
for (UReplicationGraphNode* Node : GlobalGraphNodes)
{
Node->GatherActorListsForConnection(Parameters);
}
for (UReplicationGraphNode* Node : ConnectionManager->ConnectionGraphNodes)
{
Node->GatherActorListsForConnection(Parameters);
}
ConnectionManager->UpdateGatherLocationsForConnection(ConnectionViewers, DestructionSettings);
if (GatheredReplicationListsForConnection.NumLists() == 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
{
// No lists were returned, kind of weird but not fatal. Early out because code below assumes at least 1 list
UE_LOG(LogReplicationGraph, Warning, TEXT("No Replication Lists were returned for connection"));
return 0;
}
}
// --------------------------------------------------------------------------------------------------------------
// PROCESS gathered replication lists
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
// --------------------------------------------------------------------------------------------------------------
{
QUICK_SCOPE_CYCLE_COUNTER(NET_ReplicateActors_ProcessGatheredLists);
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
ReplicateActorListsForConnections_Default(ConnectionManager, GatheredReplicationListsForConnection, ConnectionViewers);
ReplicateActorListsForConnections_FastShared(ConnectionManager, GatheredReplicationListsForConnection, ConnectionViewers);
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
}
{
QUICK_SCOPE_CYCLE_COUNTER(NET_ReplicateActors_PostProcessGatheredLists);
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
// ------------------------------------------
// Handle stale, no longer relevant, actor channels.
// ------------------------------------------
{
QUICK_SCOPE_CYCLE_COUNTER(NET_ReplicateActors_LookForNonRelevantChannels);
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
for (auto MapIt = ConnectionActorInfoMap.CreateChannelIterator(); MapIt; ++MapIt)
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
{
FConnectionReplicationActorInfo& ConnectionActorInfo = *MapIt.Value().Get();
UActorChannel* Channel = MapIt.Key();
checkSlow(Channel != nullptr);
checkSlow(ConnectionActorInfo.Channel != nullptr);
// We check for Channel closing early and bail.
// It may be possible when using Dormancy that an Actor's Channel was closed, but a new channel was created
// before the original Cleaned Up.
if (Channel->Closing)
{
UE_LOG(LogReplicationGraph, Verbose, TEXT("NET_ReplicateActors_LookForNonRelevantChannels (key) Channel %s is closing. Skipping."), *Channel->Describe());
continue;
}
else if (ConnectionActorInfo.Channel->Closing)
{
UE_LOG(LogReplicationGraph, Verbose, TEXT("NET_ReplicateActors_LookForNonRelevantChannels (value) Channel %s is closing. Skipping."), *ConnectionActorInfo.Channel->Describe());
continue;
}
ensureMsgf(Channel == ConnectionActorInfo.Channel, TEXT("Channel: %s ConnectionActorInfo.Channel: %s."), *Channel->Describe(), *ConnectionActorInfo.Channel->Describe());
if (ConnectionActorInfo.ActorChannelCloseFrameNum > 0 && ConnectionActorInfo.ActorChannelCloseFrameNum <= 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
{
AActor* Actor = Channel->Actor;
if (ensureMsgf(Actor,
TEXT("Stale Connection Actor Info with Valid Channel but Invalid Actor. RelevantTime=%f, LastUpdateTime=%f, LastRepFrameNum=%d, RepPeriod=%d, CloseFrame=%d, CurrentRepFrame=%d, bTearOff=%d, bDormant=%d, Channel=%s, State=%d"),
Channel->RelevantTime, Channel->LastUpdateTime, ConnectionActorInfo.LastRepFrameNum, ConnectionActorInfo.ReplicationPeriodFrame, ConnectionActorInfo.ActorChannelCloseFrameNum,
FrameNum, !!ConnectionActorInfo.bTearOff, !!ConnectionActorInfo.bDormantOnConnection, *(Channel->Describe()), static_cast<int32>(NetConnection->GetConnectionState())))
{
if (Actor->IsNetStartupActor())
continue;
UpdateActorConnectionCounter(Actor, Channel->Connection, ActorChannelDestroyCounter);
//UE_CLOG(DebugConnection, LogReplicationGraph, Display, TEXT("Closing Actor Channel:0x%x 0x%X0x%X, %s %d <= %d"), ConnectionActorInfo.Channel, Actor, NetConnection, *GetNameSafe(ConnectionActorInfo.Channel->Actor), ConnectionActorInfo.ActorChannelCloseFrameNum, FrameNum);
if (RepGraphConditionalActorBreakpoint(Actor, NetConnection))
{
UE_LOG(LogReplicationGraph, Display, TEXT("Closing Actor Channel due to timeout: %s. %d <= %d (%s)"), *(ConnectionActorInfo.Channel->Describe()), ConnectionActorInfo.ActorChannelCloseFrameNum, FrameNum, *NetConnection->Describe());
}
INC_DWORD_STAT_BY( STAT_NetActorChannelsClosed, 1 );
ConnectionActorInfo.Channel->Close(EChannelCloseReason::Relevancy);
// Make sure that we remove this actor from the PrevDormantActorList since it won't be dormant anymore since it will be destroyed
ConnectionManager->SetActorNotDormantOnConnection(Actor);
}
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
}
}
}
// ------------------------------------------
// Handle Destruction Infos. These are actors that have been destroyed on the server but that we need to tell the client about.
// ------------------------------------------
{
QUICK_SCOPE_CYCLE_COUNTER(NET_ReplicateActors_ReplicateDestructionInfos);
ConnectionManager->ReplicateDestructionInfos(ConnectionViewers, DestructionSettings.DestructInfoMaxDistanceSquared);
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
}
// ------------------------------------------
// Handle Dormant Destruction Infos. These are actors that are dormant but no longer relevant to the client.
// ------------------------------------------
{
QUICK_SCOPE_CYCLE_COUNTER(NET_ReplicateActors_ReplicateDormantDestructionInfos);
ConnectionManager->ReplicateDormantDestructionInfos();
}
#if DO_ENABLE_REPGRAPH_DEBUG_ACTOR
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
{
RG_QUICK_SCOPE_CYCLE_COUNTER(NET_ReplicateActors_ReplicateDebugActor);
if (ConnectionManager->DebugActor)
{
FGlobalActorReplicationInfo& GlobalInfo = GlobalActorReplicationInfoMap.Get(ConnectionManager->DebugActor);
FConnectionReplicationActorInfo& ActorInfo = ConnectionActorInfoMap.FindOrAdd(ConnectionManager->DebugActor);
int64 DebugActorBits = ReplicateSingleActor(ConnectionManager->DebugActor, ActorInfo, GlobalInfo, ConnectionActorInfoMap, *ConnectionManager, FrameNum);
// Do not count the debug actor towards our bandwidth limit
NetConnection->QueuedBits -= DebugActorBits;
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
}
}
#endif
}
if (NetConnection->GetPendingCloseDueToReplicationFailure())
{
ConnectionsToClose.Add(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
}
}
SET_DWORD_STAT(STAT_NumProcessedConnections, Connections.Num() + NumChildrenConnectionsProcessed);
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)
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 (CVar_RepGraph_PrintTrackClassReplication)
{
CVar_RepGraph_PrintTrackClassReplication = 0;
UE_LOG(LogReplicationGraph, Display, TEXT("Changed Classes: %s"), *ChangeClassAccumulator.BuildString());
UE_LOG(LogReplicationGraph, Display, TEXT("No Change Classes: %s"), *NoChangeClassAccumulator.BuildString());
}
#endif
FrameReplicationStats.NumConnections = Connections.Num() + NumChildrenConnectionsProcessed;
PostServerReplicateStats(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
CSVTracker.EndReplicationFrame();
#endif // WITH_SERVER_CODE
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
return 0;
}
void UReplicationGraph::ReplicateActorListsForConnections_Default(UNetReplicationGraphConnection* ConnectionManager, FGatheredReplicationActorLists& GatheredReplicationListsForConnection, FNetViewerArray& Viewers)
{
#if WITH_SERVER_CODE
#if !(UE_BUILD_SHIPPING || UE_BUILD_TEST)
const bool bEnableFullActorPrioritizationDetails = DO_REPGRAPH_DETAILS(bEnableFullActorPrioritizationDetailsAllConnections || ConnectionManager->bEnableFullActorPrioritizationDetails);
const bool bDoDistanceCull = (CVar_RepGraph_SkipDistanceCull == 0);
const bool bDoCulledOnConnectionCount = (CVar_RepGraph_PrintCulledOnConnectionClasses == 1);
bTrackClassReplication = (CVar_RepGraph_TrackClassReplication > 0 || CVar_RepGraph_PrintTrackClassReplication > 0);
if (!bTrackClassReplication)
{
ChangeClassAccumulator.Reset();
NoChangeClassAccumulator.Reset();
}
#else
const bool bEnableFullActorPrioritizationDetails = false;
const bool bDoDistanceCull = true;
const bool bDoCulledOnConnectionCount = false;
#endif
// Debug accumulators
FNativeClassAccumulator DormancyClassAccumulator;
FNativeClassAccumulator DistanceClassAccumulator;
int32 NumGatheredListsOnConnection = 0;
int32 NumGatheredActorsOnConnection = 0;
int32 NumPrioritizedActorsOnConnection = 0;
UNetConnection* const NetConnection = ConnectionManager->NetConnection;
FPerConnectionActorInfoMap& ConnectionActorInfoMap = ConnectionManager->ActorInfoMap;
const uint32 FrameNum = ReplicationGraphFrame;
// --------------------------------------------------------------------------------------------------------------
// PRIORITIZE Gathered Actors For Connection
// --------------------------------------------------------------------------------------------------------------
{
QUICK_SCOPE_CYCLE_COUNTER(NET_ReplicateActors_PrioritizeForConnection);
// We will make a prioritized list for each item in the packet budget. (Each item may accept multiple categories. Each list has one category)
// This means, depending on the packet budget, a gathered list could end up in multiple prioritized lists. This would not be desirable in most cases but is not explicitly forbidden.
PrioritizedReplicationList.Reset();
TArray<FPrioritizedRepList::FItem>* SortingArray = &PrioritizedReplicationList.Items;
NumGatheredListsOnConnection += GatheredReplicationListsForConnection.NumLists();
const float MaxDistanceScaling = PrioritizationConstants.MaxDistanceScaling;
const uint32 MaxFramesSinceLastRep = PrioritizationConstants.MaxFramesSinceLastRep;
const TArray<FActorRepListConstView>& GatheredLists = GatheredReplicationListsForConnection.GetLists(EActorRepListTypeFlags::Default);
for (const FActorRepListConstView& List : GatheredLists)
{
// Add actors from gathered list
NumGatheredActorsOnConnection += List.Num();
for (AActor* Actor : List)
{
RG_QUICK_SCOPE_CYCLE_COUNTER(Prioritize_InnerLoop);
// -----------------------------------------------------------------------------------------------------------------
// Prioritize Actor for Connection: this is the main block of code for calculating a final score for this actor
// -This is still pretty rough. It would be nice if this was customizable per project without suffering virtual calls.
// -----------------------------------------------------------------------------------------------------------------
if (RepGraphConditionalActorBreakpoint(Actor, NetConnection))
{
UE_LOG(LogReplicationGraph, Display, TEXT("UReplicationGraph PrioritizeActor: %s"), *Actor->GetName());
}
FConnectionReplicationActorInfo& ConnectionData = ConnectionActorInfoMap.FindOrAdd(Actor);
RG_QUICK_SCOPE_CYCLE_COUNTER(Prioritize_InnerLoop_ConnGlobalLookUp);
// Skip if dormant on this connection. We want this to always be the first/quickest check.
if (ConnectionData.bDormantOnConnection)
{
DO_REPGRAPH_DETAILS(PrioritizedReplicationList.GetNextSkippedDebugDetails(Actor)->bWasDormant = true);
if (bDoCulledOnConnectionCount)
{
DormancyClassAccumulator.Increment(Actor->GetClass());
}
continue;
}
FGlobalActorReplicationInfo& GlobalData = GlobalActorReplicationInfoMap.Get(Actor);
RG_QUICK_SCOPE_CYCLE_COUNTER(Prioritize_InnerLoop_PostGlobalLookUp);
// Skip if its not time to replicate on this connection yet. We have to look at ForceNetUpdateFrame here. It would be possible to clear
// NextReplicationFrameNum on all connections when ForceNetUpdate is called. This probably means more work overall per frame though. Something to consider.
if (!ReadyForNextReplication(ConnectionData, GlobalData, FrameNum))
{
DO_REPGRAPH_DETAILS(PrioritizedReplicationList.GetNextSkippedDebugDetails(Actor)->FramesTillNextReplication = (FrameNum - ConnectionData.LastRepFrameNum));
continue;
}
RG_QUICK_SCOPE_CYCLE_COUNTER(Prioritize_InnerLoop_PostReady);
// Output record for full debugging. This is not used in the actual sorting/prioritization of the list, just for logging/debugging purposes
FPrioritizedActorFullDebugDetails* DebugDetails = nullptr;
if (DO_REPGRAPH_DETAILS(UNLIKELY(bEnableFullActorPrioritizationDetails)))
{
DO_REPGRAPH_DETAILS(DebugDetails = PrioritizedReplicationList.GetNextFullDebugDetails(Actor));
}
float AccumulatedPriority = GlobalData.Settings.AccumulatedNetPriorityBias;
// -------------------
// Distance Scaling
// -------------------
if (GlobalData.Settings.DistancePriorityScale > 0.f)
{
float SmallestDistanceSq = TNumericLimits<float>::Max();
int32 ViewersThatSkipActor = 0;
for (const FNetViewer& CurViewer : Viewers)
{
const float DistSq = (GlobalData.WorldLocation - CurViewer.ViewLocation).SizeSquared();
SmallestDistanceSq = FMath::Min<float>(DistSq, SmallestDistanceSq);
// Figure out if we should be skipping this actor
if (bDoDistanceCull && ConnectionData.GetCullDistanceSquared() > 0.f && DistSq > ConnectionData.GetCullDistanceSquared())
{
++ViewersThatSkipActor;
continue;
}
}
// If no one is near this actor, skip it.
if (ViewersThatSkipActor >= Viewers.Num())
{
DO_REPGRAPH_DETAILS(PrioritizedReplicationList.GetNextSkippedDebugDetails(Actor)->DistanceCulled = FMath::Sqrt(SmallestDistanceSq));
// Skipped actors should not have any
if (bDoCulledOnConnectionCount)
{
DistanceClassAccumulator.Increment(Actor->GetClass());
}
continue;
}
const float DistanceFactor = FMath::Clamp<float>((SmallestDistanceSq) / MaxDistanceScaling, 0.f, 1.f) * GlobalData.Settings.DistancePriorityScale;
if (DO_REPGRAPH_DETAILS(UNLIKELY(DebugDetails)))
{
DebugDetails->DistanceSq = SmallestDistanceSq;
DebugDetails->DistanceFactor = DistanceFactor;
}
AccumulatedPriority += DistanceFactor;
}
RG_QUICK_SCOPE_CYCLE_COUNTER(Prioritize_InnerLoop_PostCull);
// Update the timeout frame number here. (Since this was returned by the graph, regardless if we end up replicating or not, we bump up the timeout frame num. This has to be done here because Distance Scaling can cull the actor
UpdateActorChannelCloseFrameNum(Actor, ConnectionData, GlobalData, FrameNum, NetConnection);
//UE_CLOG(DebugConnection, LogReplicationGraph, Display, TEXT("0x%X0x%X ConnectionData.ActorChannelCloseFrameNum=%d on %d"), Actor, NetConnection, ConnectionData.ActorChannelCloseFrameNum, FrameNum);
// -------------------
// Starvation Scaling
// -------------------
if (GlobalData.Settings.StarvationPriorityScale > 0.f)
{
// StarvationPriorityScale = scale "Frames since last rep". E.g, 2.0 means treat every missed frame as if it were 2, etc.
const float FramesSinceLastRep = ((float)(FrameNum - ConnectionData.LastRepFrameNum)) * GlobalData.Settings.StarvationPriorityScale;
const float StarvationFactor = 1.f - FMath::Clamp<float>(FramesSinceLastRep / (float)MaxFramesSinceLastRep, 0.f, 1.f);
AccumulatedPriority += StarvationFactor;
if (DO_REPGRAPH_DETAILS(UNLIKELY(DebugDetails)))
{
DebugDetails->FramesSinceLastRap = FramesSinceLastRep;
DebugDetails->StarvationFactor = StarvationFactor;
}
}
// ------------------------
// Pending dormancy scaling
// ------------------------
// Make sure pending dormant actors that have replicated at least once are prioritized,
// so we actually mark them dormant quickly, skip future work, and close their channels.
// Otherwise, newly spawned or never-replicated actors may starve out existing actors trying to go dormant.
if (GlobalData.bWantsToBeDormant && ConnectionData.LastRepFrameNum > 0)
{
AccumulatedPriority -= 1.5f;
}
// -------------------
// Game code priority
// -------------------
if (GlobalData.ForceNetUpdateFrame > ConnectionData.LastRepFrameNum)
{
// Note that in legacy ForceNetUpdate did not actually bump priority. This gives us a hard coded bump if we haven't replicated since the last ForceNetUpdate frame.
AccumulatedPriority -= 1.f;
if (DO_REPGRAPH_DETAILS(UNLIKELY(DebugDetails)))
{
DebugDetails->GameCodeScaling = -1.f;
}
}
// -------------------
// Always prioritize the connection's owner and view target, since these are the most important actors for the client.
// -------------------
for (const FNetViewer& CurViewer : Viewers)
{
// We need to find if this is anyone's viewer or viewtarget, not just the parent connection.
if (Actor == CurViewer.ViewTarget || Actor == CurViewer.InViewer)
{
if (CVar_ForceConnectionViewerPriority.GetValueOnAnyThread() > 0)
{
AccumulatedPriority = -MAX_FLT;
}
else
{
AccumulatedPriority -= 10.0f;
}
break;
}
}
SortingArray->Emplace(FPrioritizedRepList::FItem(AccumulatedPriority, Actor, &GlobalData, &ConnectionData));
}
}
{
// Sort the merged priority list. We could potentially move this into the replicate loop below, this could potentially save use from sorting arrays that don't fit into the budget
RG_QUICK_SCOPE_CYCLE_COUNTER(NET_ReplicateActors_PrioritizeForConnection_Sort);
NumPrioritizedActorsOnConnection += SortingArray->Num();
SortingArray->Sort();
}
}
{
QUICK_SCOPE_CYCLE_COUNTER(NET_ReplicateActors_ReplicateActorsForConnection);
ReplicateActorsForConnection(NetConnection, ConnectionActorInfoMap, ConnectionManager, FrameNum);
}
// Broadcast the list we just handled. This is intended to be for debugging/logging features.
ConnectionManager->OnPostReplicatePrioritizeLists.Broadcast(ConnectionManager, &PrioritizedReplicationList);
if (bDoCulledOnConnectionCount)
{
UE_LOG(LogReplicationGraph, Display, TEXT("Dormant Culled classes: %s"), *DormancyClassAccumulator.BuildString());
UE_LOG(LogReplicationGraph, Display, TEXT("Dist Culled classes: %s"), *DistanceClassAccumulator.BuildString());
UE_LOG(LogReplicationGraph, Display, TEXT("Saturated Connections: %d"), GNumSaturatedConnections);
UE_LOG(LogReplicationGraph, Display, TEXT(""));
UE_LOG(LogReplicationGraph, Display, TEXT("Gathered Lists: %d Gathered Actors: %d PrioritizedActors: %d"), NumGatheredListsOnConnection, NumGatheredActorsOnConnection, NumPrioritizedActorsOnConnection);
UE_LOG(LogReplicationGraph, Display, TEXT("Connection Loaded Streaming Levels: %d"), NetConnection->ClientVisibleLevelNames.Num());
}
#endif // WITH_SERVER_CODE
}
void UReplicationGraph::ReplicateActorsForConnection(UNetConnection* NetConnection, FPerConnectionActorInfoMap& ConnectionActorInfoMap, UNetReplicationGraphConnection* ConnectionManager, const uint32 FrameNum)
{
#if WITH_SERVER_CODE
QUICK_SCOPE_CYCLE_COUNTER(NET_ReplicateActors_ReplicateActorsForConnection);
for (int32 ActorIdx = 0; ActorIdx < PrioritizedReplicationList.Items.Num(); ++ActorIdx)
{
const FPrioritizedRepList::FItem& RepItem = PrioritizedReplicationList.Items[ActorIdx];
AActor* Actor = RepItem.Actor;
FConnectionReplicationActorInfo& ActorInfo = *RepItem.ConnectionData;
// Always skip if we've already replicated this frame. This happens if an actor is in more than one replication list
if (ActorInfo.LastRepFrameNum == FrameNum)
{
INC_DWORD_STAT_BY(STAT_NetRepActorListDupes, 1);
continue;
}
FGlobalActorReplicationInfo& GlobalActorInfo = *RepItem.GlobalData;
int64 BitsWritten = ReplicateSingleActor(Actor, ActorInfo, GlobalActorInfo, ConnectionActorInfoMap, *ConnectionManager, FrameNum);
// --------------------------------------------------
// Update Packet Budget Tracking
// --------------------------------------------------
if (IsConnectionReady(NetConnection) == false)
{
// We've exceeded the budget for this category of replication list.
RG_QUICK_SCOPE_CYCLE_COUNTER(NET_ReplicateActors_PartialStarvedActorList);
HandleStarvedActorList(PrioritizedReplicationList, ActorIdx + 1, ConnectionActorInfoMap, FrameNum);
NotifyConnectionSaturated(*ConnectionManager);
break;
}
}
#endif // WITH_SERVER_CODE
}
struct FScopedQueuedBits
{
FScopedQueuedBits(int32& InQueuedBits, int32& InTotalBits) : QueuedBits(InQueuedBits), TotalBits(InTotalBits) { }
~FScopedQueuedBits() { QueuedBits -= TotalBits; }
int32& QueuedBits;
int32& TotalBits;
};
// Tracks total bits/cpu and pushes to the CSV profiler
struct FScopedFastPathTracker
{
FScopedFastPathTracker(UClass* InActorClass, FReplicationGraphCSVTracker& InTracker, int32& InBitsWritten)
#if CSV_PROFILER
: ActorClass(InActorClass), Tracker(InTracker), BitsWritten(InBitsWritten)
#endif
{
#if CSV_PROFILER
#if STATS
bEnabled = true;
#else
bEnabled = FCsvProfiler::Get()->IsCapturing();
#endif
if (bEnabled)
{
StartTime = FPlatformTime::Seconds();
}
#endif
}
#if CSV_PROFILER
~FScopedFastPathTracker()
{
if (bEnabled)
{
const double FinalTime = FPlatformTime::Seconds() - StartTime;
Tracker.PostFastPathReplication(ActorClass, FinalTime, BitsWritten);
}
}
UClass* ActorClass;
FReplicationGraphCSVTracker& Tracker;
double StartTime;
int32& BitsWritten;
bool bEnabled;
#endif
};
void UReplicationGraph::ReplicateActorListsForConnections_FastShared(UNetReplicationGraphConnection* ConnectionManager, FGatheredReplicationActorLists& GatheredReplicationListsForConnection, FNetViewerArray& Viewers)
{
#if WITH_SERVER_CODE
if (CVar_RepGraph_EnableFastSharedPath == false)
{
return;
}
if (GatheredReplicationListsForConnection.ContainsLists(EActorRepListTypeFlags::FastShared) == false)
{
return;
}
FPerConnectionActorInfoMap& ConnectionActorInfoMap = ConnectionManager->ActorInfoMap;
UNetConnection* const NetConnection = ConnectionManager->NetConnection;
const uint32 FrameNum = ReplicationGraphFrame;
const float FastSharedDistanceRequirementPct = FastSharedPathConstants.DistanceRequirementPct;
const int64 MaxBits = FastSharedPathConstants.MaxBitsPerFrame;
const int32 StartIdx = FrameNum * FastSharedPathConstants.ListSkipPerFrame;
int32 TotalBitsWritten = 0;
// Fast shared path "doesn't count" towards our normal net send rate. This will subtract the bits we send in this function out of the queued bits on net connection.
// This really isn't ideal. We want to have better ways of tracking and limiting network traffic. This feels pretty hacky in implementation but conceptually is good.
FScopedQueuedBits ScopedQueuedBits(NetConnection->QueuedBits, TotalBitsWritten);
const TArray<FActorRepListConstView>& GatheredLists = GatheredReplicationListsForConnection.GetLists(EActorRepListTypeFlags::FastShared);
for (int32 ListIdx = 0; ListIdx < GatheredLists.Num(); ++ListIdx)
{
const FActorRepListConstView& List = GatheredLists[(ListIdx + FrameNum) % GatheredLists.Num()];
for (int32 i = 0; i < List.Num(); ++i)
{
// Round robin through the list over multiple frames. We want to avoid sorting this list based on 'time since last rep'. This is a good balance
AActor* Actor = List[(i + StartIdx) % List.Num()];
int32 BitsWritten = 0;
if (RepGraphConditionalActorBreakpoint(Actor, NetConnection))
{
UE_LOG(LogReplicationGraph, Display, TEXT("UReplicationGraph FastShared Path Replication: %s"), *Actor->GetName());
}
FConnectionReplicationActorInfo& ConnectionData = ConnectionActorInfoMap.FindOrAdd(Actor);
// Don't fast path rep if we already repped in the default path this frame
if (UNLIKELY(ConnectionData.LastRepFrameNum == FrameNum))
{
continue;
}
if (UNLIKELY(ConnectionData.bTearOff))
{
continue;
}
// Actor channel must already be established to rep fast path
UActorChannel* ActorChannel = ConnectionData.Channel;
if (ActorChannel == nullptr || ActorChannel->Closing)
{
continue;
}
FGlobalActorReplicationInfo& GlobalActorInfo = GlobalActorReplicationInfoMap.Get(Actor);
if (GlobalActorInfo.Settings.FastSharedReplicationFunc == nullptr)
{
// This actor does not support fastshared replication
// FIXME: we should avoid this by keeping these actors on separate lists
continue;
}
// Determine if this actor has any view relevancy to any connection this client has
bool bNoViewRelevency = true;
for (const FNetViewer& CurView : Viewers)
{
const FVector& ConnectionViewLocation = CurView.ViewLocation;
const FVector& ConnectionViewDir = CurView.ViewDir;
// Simple dot product rejection: only fast rep actors in front of this connection
const FVector DirToActor = GlobalActorInfo.WorldLocation - ConnectionViewLocation;
if (!(FVector::DotProduct(DirToActor, ConnectionViewDir) < 0.f))
{
bNoViewRelevency = false;
break;
}
// Simple distance cull
const float DistSq = DirToActor.SizeSquared();
if (!(DistSq > (ConnectionData.GetCullDistanceSquared() * FastSharedDistanceRequirementPct)))
{
bNoViewRelevency = false;
break;
}
}
// Skip out if they have none.
if (bNoViewRelevency)
{
continue;
}
BitsWritten = (int32)ReplicateSingleActor_FastShared(Actor, ConnectionData, GlobalActorInfo, *ConnectionManager, FrameNum);
TotalBitsWritten += BitsWritten;
#if !(UE_BUILD_SHIPPING || UE_BUILD_TEST)
static bool SkipCheck = false;
if (SkipCheck)
{
continue;
}
#endif
if (TotalBitsWritten > MaxBits)
{
NotifyConnectionSaturated(*ConnectionManager);
return;
}
}
}
#endif // WITH_SERVER_CODE
}
REPGRAPH_DEVCVAR_SHIPCONST(int32, "Net.RepGraph.FastShared.ForceFull", CVar_RepGraph_FastShared_ForceFull, 0, "Redirects calls to ReplicateSingleActor_FastShared to ReplicateSingleActor");
int64 UReplicationGraph::ReplicateSingleActor_FastShared(AActor* Actor, FConnectionReplicationActorInfo& ConnectionData, FGlobalActorReplicationInfo& GlobalActorInfo, UNetReplicationGraphConnection& ConnectionManager, const uint32 FrameNum)
{
#if WITH_SERVER_CODE
UNetConnection* NetConnection = ConnectionManager.NetConnection;
// No matter what we consider this FastShared rep to happen. Even if the actor doesn't produce a bunch or its empty or stale, etc. We still consider this replication to have happened
// for high level frequency purposes (E.g, UReplicationGraphNode_DynamicSpatialFrequency). But we want to do the update at the end of this function, not at the top since it can early out
// if the actor doesn't produce a new bunch and this connection already got the last bunch produced.
ON_SCOPE_EXIT
{
ConnectionData.FastPath_LastRepFrameNum = FrameNum;
ConnectionData.FastPath_NextReplicationFrameNum = FrameNum + ConnectionData.FastPath_ReplicationPeriodFrame;
};
TOptional<FScopedActorRoleSwap> SwapGuard;
if (GlobalActorInfo.bSwapRolesOnReplicate)
{
SwapGuard = FScopedActorRoleSwap(Actor);
}
// always replicate full pawns to the replay
if (NetConnection->IsReplay() || CVar_RepGraph_FastShared_ForceFull > 0)
{
return ReplicateSingleActor(Actor, ConnectionData, GlobalActorInfo, ConnectionManager.ActorInfoMap, ConnectionManager, FrameNum);
}
int32 BitsWritten = 0;
FScopedFastPathTracker ScopedTracker(Actor->GetClass(), CSVTracker, BitsWritten); // Track time and bandwidth for this class
UActorChannel* ActorChannel = ConnectionData.Channel;
// Actor channel must already be established to rep fast path
if (ActorChannel == nullptr || ActorChannel->Closing)
{
return 0;
}
FrameReplicationStats.NumReplicatedFastPathActors++;
// Allocate the shared bunch if it hasn't been already
if (GlobalActorInfo.FastSharedReplicationInfo.IsValid() == false)
{
GlobalActorInfo.FastSharedReplicationInfo = MakeUnique<FFastSharedReplicationInfo>();
}
FOutBunch& OutBunch = GlobalActorInfo.FastSharedReplicationInfo->Bunch;
// Update the shared bunch if its out of date
if (GlobalActorInfo.FastSharedReplicationInfo->LastAttemptBuildFrameNum < FrameNum)
{
GlobalActorInfo.FastSharedReplicationInfo->LastAttemptBuildFrameNum = FrameNum;
if (GlobalActorInfo.Settings.FastSharedReplicationFunc == nullptr)
{
#if !(UE_BUILD_SHIPPING)
static TSet<FObjectKey> WarnedClasses;
if (WarnedClasses.Contains(FObjectKey(Actor->GetClass())) == false)
{
WarnedClasses.Add(FObjectKey(Actor->GetClass()));
UE_LOG(LogReplicationGraph, Warning, TEXT("::ReplicateSingleActor_FastShared called on %s (%s) when it doesn't have a FastSharedReplicationFunc defined, skipping actor. This is ineffecient."), *GetPathNameSafe(Actor), *Actor->GetClass()->GetName());
}
#endif
return 0;
}
// Make shared thing
FastSharedReplicationBunch = &OutBunch;
FastSharedReplicationChannel = ActorChannel;
FastSharedReplicationFuncName = GlobalActorInfo.Settings.FastSharedReplicationFuncName;
// Calling this function *should* result in an RPC call that we trap and fill out FastSharedReplicationBunch. See UReplicationGraph::ProcessRemoteFunction
if (GlobalActorInfo.Settings.FastSharedReplicationFunc(Actor) == false)
{
// Something failed and we don't want to fast replicate. We wont check again this frame
FastSharedReplicationBunch = nullptr;
FastSharedReplicationChannel = nullptr;
FastSharedReplicationFuncName = NAME_None;
return 0;
}
if (FastSharedReplicationBunch == nullptr)
{
// A new bunch was produced this frame. (FastSharedReplicationBunch is cleared in ::ProcessRemoteFunction)
GlobalActorInfo.FastSharedReplicationInfo->LastBunchBuildFrameNum = FrameNum;
}
else
{
// A new bunch was not produced this frame, but there is still valid data (If FastSharedReplicationFunc returns false, there is no valid data)
FastSharedReplicationBunch = nullptr;
FastSharedReplicationChannel = nullptr;
FastSharedReplicationFuncName = NAME_None;
}
}
if (ConnectionData.FastPath_LastRepFrameNum >= GlobalActorInfo.FastSharedReplicationInfo->LastBunchBuildFrameNum)
{
// We already repped this bunch to this connection. So just return
return 0;
}
if (OutBunch.GetNumBits() <= 0)
{
// Empty bunch - no need to send. This means we aren't fast repping this guy this frame
return 0;
}
// Setup the connection specifics on the bunch before calling SendBunch
OutBunch.ChName = ActorChannel->ChName;
OutBunch.ChIndex = ActorChannel->ChIndex;
OutBunch.Channel = ActorChannel;
OutBunch.Next = nullptr;
// SendIt
{
TGuardValue<bool> Guard(ActorChannel->bHoldQueuedExportBunchesAndGUIDs, true); // Don't export queued GUIDs in fast path
#if !(UE_BUILD_SHIPPING || UE_BUILD_TEST) && (UE_NET_TRACE_ENABLED)
// If we want to trace the actual contents of the shared path, we need to create a temporary collector associated with the shared bunch, collect the shared data and report it every time it is reused
// For now we just set the debug name of the the bunch to be able to give some context on what this bunch contains
if (OutBunch.DebugString.IsEmpty())
{
OutBunch.DebugString = FString(TEXT("ReplicateSingleActor_FastShared"));
}
#endif
ActorChannel->SendBunch(&OutBunch, false);
}
ensureAlwaysMsgf(OutBunch.bHasMustBeMappedGUIDs == 0, TEXT("FastShared bHasMustBeMappedGUIDs! %s"), *Actor->GetPathName());
return OutBunch.GetNumBits();
#else
return 0;
#endif // WITH_SERVER_CODE
}
int64 UReplicationGraph::ReplicateSingleActor(AActor* Actor, FConnectionReplicationActorInfo& ActorInfo, FGlobalActorReplicationInfo& GlobalActorInfo, FPerConnectionActorInfoMap& ConnectionActorInfoMap, UNetReplicationGraphConnection& ConnectionManager, const 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
{
#if WITH_SERVER_CODE
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
RG_QUICK_SCOPE_CYCLE_COUNTER(NET_ReplicateActors_ReplicateSingleActor);
// These checks will happen anyway in UActorChannel::ReplicateActor, but we need to be able to detect them to prevent crashes.
// We could consider removing the actor from RepGraph if we hit these cases, but we don't have a good way to notify
// game code or the Net Driver.
if (!ensureMsgf(Actor, TEXT("Null Actor! Channel = %s"), *DescribeSafe(ActorInfo.Channel)))
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
{
return 0;
}
UNetConnection* NetConnection = ConnectionManager.NetConnection;
if (RepGraphConditionalActorBreakpoint(Actor, NetConnection))
{
UE_LOG(LogReplicationGraph, Display, TEXT("UReplicationGraph::ReplicateSingleActor: %s. NetConnection: %s"), *Actor->GetName(), *NetConnection->Describe());
}
if (!ensureMsgf(IsActorValidForReplication(Actor), TEXT("Actor not valid for replication (BeingDestroyed:%d) (IsValid:%d) (Unreachable:%d) (TearOff:%d)! Actor = %s, Channel = %s"),
Actor->IsActorBeingDestroyed(), IsValid(Actor), Actor->IsUnreachable(), Actor->GetTearOff(),
*Actor->GetFullName(), *DescribeSafe(ActorInfo.Channel)))
{
return 0;
}
if (LIKELY(ActorInfo.Channel))
{
if (UNLIKELY(ActorInfo.Channel->Closing))
{
// We are waiting for the client to ack this actor channel's close bunch.
return 0;
}
else if (!ensureMsgf(ActorInfo.Channel->Actor == Actor, TEXT("Mismatched channel actors! Channel = %s, Replicating Actor = %s"), *ActorInfo.Channel->Describe(), *Actor->GetFullName()))
{
return 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
FrameReplicationStats.NumReplicatedActors++;
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
ActorInfo.LastRepFrameNum = FrameNum;
ActorInfo.NextReplicationFrameNum = FrameNum + ActorInfo.ReplicationPeriodFrame;
UClass* const ActorClass = Actor->GetClass();
/** Call PreReplication if necessary. */
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 (GlobalActorInfo.LastPreReplicationFrame != FrameNum)
{
RG_QUICK_SCOPE_CYCLE_COUNTER(NET_ReplicateActors_CallPreReplication);
GlobalActorInfo.LastPreReplicationFrame = FrameNum;
Actor->CallPreReplication(NetDriver);
}
TOptional<FScopedActorRoleSwap> SwapGuard;
if (GlobalActorInfo.bSwapRolesOnReplicate)
{
SwapGuard = FScopedActorRoleSwap(Actor);
}
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 bool bWantsToGoDormant = GlobalActorInfo.bWantsToBeDormant;
bool bOpenActorChannel = (ActorInfo.Channel == nullptr);
if (bOpenActorChannel)
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
{
// Create a new channel for this actor.
INC_DWORD_STAT_BY( STAT_NetActorChannelsOpened, 1 );
ActorInfo.Channel = (UActorChannel*)NetConnection->CreateChannelByName( NAME_Actor, EChannelCreateFlags::OpenedLocally );
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 ( !ActorInfo.Channel )
{
return 0;
}
CSVTracker.PostActorChannelCreated(ActorClass);
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
//UE_LOG(LogReplicationGraph, Display, TEXT("Created Actor Channel:0x%x 0x%X0x%X, %d"), ActorInfo.Channel, Actor, NetConnection, FrameNum);
// This will unfortunately cause a callback to this UNetReplicationGraphConnection and will relook up the ActorInfoMap and set the channel that we already have set.
// This is currently unavoidable because channels are created from different code paths (some outside of this loop)
ActorInfo.Channel->SetChannelActor(Actor, ESetChannelActorFlags::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
}
if (UNLIKELY(bWantsToGoDormant))
{
ActorInfo.Channel->StartBecomingDormant();
}
int64 BitsWritten = 0;
const double StartingReplicateActorTimeSeconds = GReplicateActorTimeSeconds;
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 (UNLIKELY(ActorInfo.bTearOff))
{
// Replicate and immediately close in tear off case
BitsWritten = ActorInfo.Channel->ReplicateActor();
BitsWritten += ActorInfo.Channel->Close(EChannelCloseReason::TearOff);
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
}
else
{
// Just replicate normally
BitsWritten = ActorInfo.Channel->ReplicateActor();
}
const double DeltaReplicateActorTimeSeconds = GReplicateActorTimeSeconds - StartingReplicateActorTimeSeconds;
const bool bWasDataSent = BitsWritten > 0;
#if !(UE_BUILD_SHIPPING || UE_BUILD_TEST)
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 (bTrackClassReplication)
{
if (bWasDataSent)
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
{
ChangeClassAccumulator.Increment(ActorClass);
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
}
else
{
NoChangeClassAccumulator.Increment(ActorClass);
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
}
}
#endif
if (bWasDataSent == false)
{
FrameReplicationStats.NumReplicatedCleanActors++;
}
const bool bIsTrafficActorDiscovery = ActorDiscoveryMaxBitsPerFrame > 0 && (ActorInfo.Channel && ActorInfo.Channel->SpawnAcked == false);
const bool bIsActorDiscoveryBudgetFull = bIsTrafficActorDiscovery && (ConnectionManager.QueuedBitsForActorDiscovery >= ActorDiscoveryMaxBitsPerFrame);
CSVTracker.PostReplicateActor(ActorClass, DeltaReplicateActorTimeSeconds, BitsWritten, bIsTrafficActorDiscovery && !bIsActorDiscoveryBudgetFull);
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
// ----------------------------
// Dependent actors
// ----------------------------
const FGlobalActorReplicationInfo::FDependantListType& DependentActorList = GlobalActorInfo.GetDependentActorList();
if (DependentActorList.Num() > 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
{
RG_QUICK_SCOPE_CYCLE_COUNTER(NET_ReplicateActors_DependentActors);
const int32 CloseFrameNum = ActorInfo.ActorChannelCloseFrameNum;
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
for (AActor* DependentActor : DependentActorList)
{
repCheck(DependentActor);
FConnectionReplicationActorInfo& DependentActorConnectionInfo = ConnectionActorInfoMap.FindOrAdd(DependentActor);
FGlobalActorReplicationInfo& DependentActorGlobalData = GlobalActorReplicationInfoMap.Get(DependentActor);
UpdateActorChannelCloseFrameNum(DependentActor, DependentActorConnectionInfo, DependentActorGlobalData, FrameNum, 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
// Dependent actor channel will stay open as long as the owning actor channel is open
DependentActorConnectionInfo.ActorChannelCloseFrameNum = FMath::Max<uint32>(CloseFrameNum, DependentActorConnectionInfo.ActorChannelCloseFrameNum);
if (!ReadyForNextReplication(DependentActorConnectionInfo, DependentActorGlobalData, FrameNum))
{
continue;
}
if (!ensureMsgf(IsActorValidForReplication(DependentActor), TEXT("DependentActor %s (Owner: %s) not valid for replication (BeingDestroyed:%d) (IsValid:%d) (Unreachable:%d) (TearOff:%d)! Channel = %s"),
*DependentActor->GetFullName(), *Actor->GetFullName(),
DependentActor->IsActorBeingDestroyed(), IsValid(DependentActor), DependentActor->IsUnreachable(), DependentActor->GetTearOff(),
*DescribeSafe(DependentActorConnectionInfo.Channel)))
{
continue;
}
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
//UE_LOG(LogReplicationGraph, Display, TEXT("DependentActor %s %s. NextReplicationFrameNum: %d. FrameNum: %d. ForceNetUpdateFrame: %d. LastRepFrameNum: %d."), *DependentActor->GetPathName(), *NetConnection->GetName(), DependentActorConnectionInfo.NextReplicationFrameNum, FrameNum, DependentActorGlobalData.ForceNetUpdateFrame, DependentActorConnectionInfo.LastRepFrameNum);
BitsWritten += ReplicateSingleActor(DependentActor, DependentActorConnectionInfo, DependentActorGlobalData, ConnectionActorInfoMap, ConnectionManager, 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
}
}
// Optional budget for actor discovery traffic
if (bIsTrafficActorDiscovery && !bIsActorDiscoveryBudgetFull)
{
ConnectionManager.QueuedBitsForActorDiscovery += BitsWritten;
// Remove the discovery traffic from the regular traffic
NetConnection->QueuedBits -= BitsWritten;
BitsWritten = 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
return BitsWritten;
#else
return 0;
#endif //WITH_SERVER_CODE
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 UReplicationGraph::HandleStarvedActorList(const FPrioritizedRepList& List, int32 StartIdx, FPerConnectionActorInfoMap& ConnectionActorInfoMap, uint32 FrameNum)
{
for (int32 ActorIdx=StartIdx; ActorIdx < List.Items.Num(); ++ActorIdx)
{
const FPrioritizedRepList::FItem& RepItem = List.Items[ActorIdx];
FConnectionReplicationActorInfo& ActorInfo = *RepItem.ConnectionData;
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
// Update dependent actor's timeout frame
FGlobalActorReplicationInfo& GlobalActorInfo = GlobalActorReplicationInfoMap.Get(RepItem.Actor);
const FGlobalActorReplicationInfo::FDependantListType& DependentActorList = GlobalActorInfo.GetDependentActorList();
if (DependentActorList.Num() > 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
{
const uint32 CloseFrameNum = ActorInfo.ActorChannelCloseFrameNum;
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
for (AActor* DependentActor : DependentActorList)
{
FConnectionReplicationActorInfo& DependentActorConnectionInfo = ConnectionActorInfoMap.FindOrAdd(DependentActor);
DependentActorConnectionInfo.ActorChannelCloseFrameNum = FMath::Max<uint32>(CloseFrameNum, DependentActorConnectionInfo.ActorChannelCloseFrameNum);
}
}
}
}
void UReplicationGraph::UpdateActorChannelCloseFrameNum(AActor* Actor, FConnectionReplicationActorInfo& ConnectionData, const FGlobalActorReplicationInfo& GlobalData, const uint32 FrameNum, UNetConnection* NetConnection) 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
{
if (RepGraphConditionalActorBreakpoint(Actor, NetConnection))
{
UE_LOG(LogReplicationGraph, Display, TEXT("UReplicationGraph::UpdateActorChannelCloseFrameNum: %s. Channel: %s FrameNum: %d ActorChannelFrameTimeout: %d."), *Actor->GetName(), *(ConnectionData.Channel ? ConnectionData.Channel->Describe() : FString(TEXT("None"))), FrameNum, GlobalData.Settings.ActorChannelFrameTimeout);
}
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
// Only update if the actor has a timeout set
if (GlobalData.Settings.ActorChannelFrameTimeout > 0)
{
const uint32 NewCloseFrameNum = FrameNum + ConnectionData.ReplicationPeriodFrame + GlobalData.Settings.ActorChannelFrameTimeout + GlobalActorChannelFrameNumTimeout;
ConnectionData.ActorChannelCloseFrameNum = FMath::Max<uint32>(ConnectionData.ActorChannelCloseFrameNum, NewCloseFrameNum); // Never go backwards, something else could have bumped it up further intentionally
}
}
bool UReplicationGraph::ProcessRemoteFunction(class AActor* Actor, UFunction* Function, void* Parameters, FOutParmRec* OutParms, FFrame* Stack, class UObject* SubObject )
{
#if WITH_SERVER_CODE
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
// ----------------------------------
// Setup
// ----------------------------------
if (RepGraphConditionalActorBreakpoint(Actor, nullptr))
{
UE_LOG(LogReplicationGraph, Display, TEXT("UReplicationGraph::ProcessRemoteFunction: %s. Function: %s."), *GetNameSafe(Actor), *GetNameSafe(Function));
}
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 (IsActorValidForReplication(Actor) == false || Actor->IsActorBeingDestroyed())
{
UE_LOG(LogReplicationGraph, Display, TEXT("UReplicationGraph::ProcessRemoteFunction: Actor %s destroyed or not ready! Function: %s."), *GetNameSafe(Actor), *GetNameSafe(Function));
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
return true;
}
// get the top most function
while( Function->GetSuperFunction() )
{
Function = Function->GetSuperFunction();
}
// If we have a subobject, thats who we are actually calling this on. If no subobject, we are calling on the actor.
UObject* TargetObj = SubObject ? SubObject : Actor;
// Make sure this function exists for both parties.
const FClassNetCache* ClassCache = NetDriver->NetCache->GetClassNetCache( TargetObj->GetClass() );
if (!ClassCache)
{
UE_LOG(LogReplicationGraph, Warning, TEXT("ClassNetCache empty, not calling %s::%s"), *Actor->GetName(), *Function->GetName());
return true;
}
const FFieldNetCache* FieldCache = ClassCache->GetFromField( Function );
if ( !FieldCache )
{
UE_LOG(LogReplicationGraph, Warning, TEXT("FieldCache empty, not calling %s::%s"), *Actor->GetName(), *Function->GetName());
return true;
}
// --------------------------------------------------------------------------------------------------------------------------------------------------------------------------
// FastShared Replication. This is ugly but the idea here is to just fill out the bunch parameters and return so that this bunch can be reused by other connections
// --------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if (FastSharedReplicationBunch && (FastSharedReplicationFuncName == Function->GetFName()))
{
// We also cache off a channel so we can call some of the serialization functions on it. This isn't really necessary though and we could break those parts off
// into a static function.
if (ensureMsgf(FastSharedReplicationChannel, TEXT("FastSharedReplicationPath set but FastSharedReplicationChannel is not! %s"), *Actor->GetPathName()))
{
// Reset the bunch here. It will be reused and we should only reset it right before we actually write to it.
FastSharedReplicationBunch->Reset();
// It sucks we have to a temp writer like this, but we don't know how big the payload will be until we serialize it
FNetBitWriter TempWriter(nullptr, 0);
TSharedPtr<FRepLayout> RepLayout = NetDriver->GetFunctionRepLayout( Function );
RepLayout->SendPropertiesForRPC(Function, FastSharedReplicationChannel, TempWriter, Parameters);
FNetBitWriter TempBlockWriter(nullptr, 0);
FastSharedReplicationChannel->WriteFieldHeaderAndPayload( TempBlockWriter, ClassCache, FieldCache, nullptr, TempWriter, true );
FastSharedReplicationChannel->WriteContentBlockPayload( TargetObj, *FastSharedReplicationBunch, false, TempBlockWriter );
FastSharedReplicationBunch = nullptr;
FastSharedReplicationChannel = nullptr;
FastSharedReplicationFuncName = NAME_None;
}
return true;
}
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
// ----------------------------------
// Multicast
// ----------------------------------
if ((Function->FunctionFlags & FUNC_NetMulticast))
{
TSharedPtr<FRepLayout> RepLayout = NetDriver->GetFunctionRepLayout( Function );
TOptional<FVector> ActorLocation;
UNetDriver::ERemoteFunctionSendPolicy SendPolicy = UNetDriver::Default;
if (CVar_RepGraph_EnableRPCSendPolicy > 0)
{
if (FRPCSendPolicyInfo* FuncSendPolicy = RPCSendPolicyMap.Find(FObjectKey(Function)))
{
if (FuncSendPolicy->bSendImmediately)
{
SendPolicy = UNetDriver::ForceSend;
}
}
}
RepLayout->BuildSharedSerializationForRPC(Parameters);
FGlobalActorReplicationInfo& GlobalInfo = GlobalActorReplicationInfoMap.Get(Actor);
bool ForceFlushNetDormancy = false;
// Cache streaming level name off
FNewReplicatedActorInfo NewActorInfo(Actor);
const FName ActorStreamingLevelName = NewActorInfo.StreamingLevelName;
EProcessRemoteFunctionFlags RemoteFunctionFlags = EProcessRemoteFunctionFlags::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
for (UNetReplicationGraphConnection* Manager : Connections)
{
FConnectionReplicationActorInfo& ConnectionActorInfo = Manager->ActorInfoMap.FindOrAdd(Actor);
UNetConnection* NetConnection = Manager->NetConnection;
// This connection isn't ready yet
if (NetConnection->ViewTarget == nullptr)
{
continue;
}
// Streaming level actor that the client doesn't have loaded. Do not send.
if (ActorStreamingLevelName != NAME_None && NetConnection->ClientVisibleLevelNames.Contains(ActorStreamingLevelName) == false)
{
continue;
}
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
//UE_CLOG(ConnectionActorInfo.Channel == nullptr, LogReplicationGraph, Display, TEXT("Null channel on %s for %s"), *GetPathNameSafe(Actor), *GetNameSafe(Function));
if (ConnectionActorInfo.Channel == nullptr && (RPC_Multicast_OpenChannelForClass.GetChecked(Actor->GetClass()) == true))
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
{
// There is no actor channel here. Ideally we would just ignore this but in the case of net dormancy, this may be an actor that will replicate on the next frame.
// If the actor is dormant and is a distance culled actor, we can probably safely assume this connection will open a channel for the actor on the next rep frame.
// This isn't perfect and we may want a per-function or per-actor policy that allows to dictate what happens in this situation.
// Actors being destroyed (Building hit with rocket) will wake up before this gets hit. So dormancy really cant be relied on here.
// if (Actor->NetDormancy > DORM_Awake)
{
bool bShouldOpenChannel = true;
if (ConnectionActorInfo.GetCullDistanceSquared() > 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
{
bShouldOpenChannel = 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
if (ActorLocation.IsSet() == false)
{
ActorLocation = Actor->GetActorLocation();
}
FNetViewerArray ViewsToConsider;
ViewsToConsider.Emplace(NetConnection, 0.f);
for (int32 ChildIdx = 0; ChildIdx < NetConnection->Children.Num(); ++ChildIdx)
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 (NetConnection->Children[ChildIdx]->ViewTarget != nullptr)
{
ViewsToConsider.Emplace(NetConnection->Children[ChildIdx], 0.f);
}
}
// Loop through and see if we should keep this channel open, as when we do distance, we will
// default to the channel being closed.
for (const FNetViewer& Viewer : ViewsToConsider)
{
const float DistSq = (ActorLocation.GetValue() - Viewer.ViewLocation).SizeSquared();
if (DistSq <= ConnectionActorInfo.GetCullDistanceSquared())
{
bShouldOpenChannel = true;
break;
}
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 (bShouldOpenChannel)
{
#if !UE_BUILD_SHIPPING
if (Actor->bOnlyRelevantToOwner && (!Actor->GetNetOwner() || (Actor->GetNetOwner() != NetConnection->PlayerController)))
{
UE_LOG(LogReplicationGraph, Warning, TEXT("Multicast RPC opening channel for bOnlyRelevantToOwner actor, check RPC_Multicast_OpenChannelForClass: Actor: %s Target: %s Function: %s"), *GetNameSafe(Actor), *GetNameSafe(TargetObj), *GetNameSafe(Function));
ensureMsgf(Cast<APlayerController>(Actor) == nullptr, TEXT("MulticastRPC %s will open a channel for %s to a non-owner. This will break the PlayerController replication."), *Function->GetName(), *GetNameSafe(Actor));
}
#endif
// We are within range, we will open a channel now for this actor and call the RPC on it
ConnectionActorInfo.Channel = (UActorChannel*)NetConnection->CreateChannelByName(NAME_Actor, EChannelCreateFlags::OpenedLocally);
if (ConnectionActorInfo.Channel)
{
ConnectionActorInfo.Channel->SetChannelActor(Actor, ESetChannelActorFlags::None);
// Update timeout frame name. We would run into problems if we open the channel, queue a bunch, and then it timeouts before RepGraph replicates properties.
UpdateActorChannelCloseFrameNum(Actor, ConnectionActorInfo, GlobalInfo, ReplicationGraphFrame+1 /** Plus one to error on safe side. RepFrame num will be incremented in the next tick */, NetConnection );
// If this actor is dormant on the connection, we will force a flushnetdormancy call.
ForceFlushNetDormancy |= ConnectionActorInfo.bDormantOnConnection;
}
}
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 (ConnectionActorInfo.Channel)
{
NetDriver->ProcessRemoteFunctionForChannel(ConnectionActorInfo.Channel, ClassCache, FieldCache, TargetObj, NetConnection, Function, Parameters, OutParms, Stack, true, SendPolicy, RemoteFunctionFlags);
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 (SendPolicy == UNetDriver::ForceSend)
{
// Queue the send in an array that we consume in PostTickDispatch to avoid force flushing multiple times a frame on the same connection
ConnectionsNeedingsPostTickDispatchFlush.AddUnique(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
}
}
}
RepLayout->ClearSharedSerializationForRPC();
if (ForceFlushNetDormancy)
{
Actor->FlushNetDormancy();
}
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
return true;
}
// ----------------------------------
// Single Connection
// ----------------------------------
UNetConnection* Connection = Actor->GetNetConnection();
if (Connection)
{
const bool bIsReliable = EnumHasAnyFlags(Function->FunctionFlags, FUNC_NetReliable);
// If we're saturated and it's not a reliable multicast, drop it.
if (!(bIsReliable || IsConnectionReady(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
{
return true;
}
// Route RPC calls to actual connection
if (Connection->GetUChildConnection())
{
Connection = ((UChildConnection*)Connection)->Parent;
}
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 (Connection->GetConnectionState() == USOCK_Closed)
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
{
return true;
}
UActorChannel* Ch = Connection->FindActorChannelRef(Actor);
if (Ch == nullptr)
{
if (Actor->IsPendingKillPending() || !NetDriver->IsLevelInitializedForActor(Actor, 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
{
// We can't open a channel for this actor here
return true;
}
Ch = (UActorChannel *)Connection->CreateChannelByName( NAME_Actor, EChannelCreateFlags::OpenedLocally );
Ch->SetChannelActor(Actor, ESetChannelActorFlags::None);
if (UNetReplicationGraphConnection* ConnectionManager = Cast<UNetReplicationGraphConnection>(Connection->GetReplicationConnectionDriver()))
{
FConnectionReplicationActorInfo& ConnectionActorInfo = ConnectionManager->ActorInfoMap.FindOrAdd(Actor);
FGlobalActorReplicationInfo& GlobalInfo = GlobalActorReplicationInfoMap.Get(Actor);
UpdateActorChannelCloseFrameNum(Actor, ConnectionActorInfo, GlobalInfo, ReplicationGraphFrame+1 /** Plus one to error on safe side. RepFrame num will be incremented in the next tick */, 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
}
NetDriver->ProcessRemoteFunctionForChannel(Ch, ClassCache, FieldCache, TargetObj, Connection, Function, Parameters, OutParms, Stack, true);
}
else
{
UE_LOG(LogNet, Warning, TEXT("UReplicationGraph::ProcessRemoteFunction: No owning connection for actor %s. Function %s will not be processed."), *Actor->GetName(), *Function->GetName());
}
#endif // WITH_SERVER_CODE
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
// return true because we don't want the net driver to do anything else
return true;
}
void UReplicationGraph::PostTickDispatch()
{
QUICK_SCOPE_CYCLE_COUNTER(UReplicationGraph_PostTickDispatch);
for (UNetConnection* NetConnection : ConnectionsNeedingsPostTickDispatchFlush)
{
if (NetConnection->GetDriver() != nullptr)
{
NetConnection->FlushNet();
}
}
ConnectionsNeedingsPostTickDispatchFlush.Reset();
}
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 UReplicationGraph::IsConnectionReady(UNetConnection* Connection)
{
if (CVar_RepGraph_DisableBandwithLimit)
{
return true;
}
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
return Connection->QueuedBits + Connection->SendBuffer.GetNumBits() <= 0;
}
void UReplicationGraph::SetActorDiscoveryBudget(int32 ActorDiscoveryBudgetInKBytesPerSec)
{
// Disable the seperate actor discovery budget when 0
if (ActorDiscoveryBudgetInKBytesPerSec <= 0)
{
ActorDiscoveryMaxBitsPerFrame = 0;
UE_LOG(LogReplicationGraph, Display, TEXT("SetActorDiscoveryBudget disabled the ActorDiscovery budget."));
return;
}
if (NetDriver == nullptr)
{
UE_LOG(LogReplicationGraph, Warning, TEXT("SetActorDiscoveryBudget ignored since NetDriver was not initialized."));
return;
}
int32 MaxNetworkFPS = NetDriver->NetServerMaxTickRate;
ActorDiscoveryMaxBitsPerFrame = (ActorDiscoveryBudgetInKBytesPerSec * 1000 * 8) / MaxNetworkFPS;
UE_LOG(LogReplicationGraph, Display, TEXT("SetActorDiscoveryBudget set to %d kBps (%d bits per network tick)."), ActorDiscoveryBudgetInKBytesPerSec, ActorDiscoveryMaxBitsPerFrame);
}
void UReplicationGraph::SetAllCullDistanceSettingsForActor(const FActorRepListType& Actor, float CullDistanceSquared)
{
FGlobalActorReplicationInfo& GlobalInfo = GlobalActorReplicationInfoMap.Get(Actor);
GlobalInfo.Settings.SetCullDistanceSquared(CullDistanceSquared);
for (UNetReplicationGraphConnection* RepGraphConnection : Connections)
{
if (FConnectionReplicationActorInfo* ConnectionActorInfo = RepGraphConnection->ActorInfoMap.Find(Actor))
{
ConnectionActorInfo->SetCullDistanceSquared(CullDistanceSquared);
}
}
}
void UReplicationGraph::NotifyConnectionSaturated(UNetReplicationGraphConnection& Connection)
{
bWasConnectionSaturated = true;
++GNumSaturatedConnections;
}
void UReplicationGraph::SetActorDestructionInfoToIgnoreDistanceCulling(AActor* DestroyedActor)
{
if (!DestroyedActor)
{
return;
}
check(NetDriver);
FNetworkGUID NetGUID = NetDriver->GuidCache->GetNetGUID(DestroyedActor);
if (NetGUID.IsDefault())
{
UE_CLOG(CVar_RepGraph_LogNetDormancyDetails > 0, LogReplicationGraph, Warning, TEXT("SetActorDestructionInfoToIgnoreDistanceCulling ignored for %s. No NetGUID assigned to the actor"), *GetNameSafe(DestroyedActor));
return;
}
// See if a destruction info exists for this actor
if (const TUniquePtr<FActorDestructionInfo>* DestructionInfoPtr = NetDriver->DestroyedStartupOrDormantActors.Find(NetGUID))
{
(*DestructionInfoPtr)->bIgnoreDistanceCulling = true;
}
}
void UReplicationGraph::PostServerReplicateStats(const FFrameReplicationStats& Stats)
{
#if CSV_PROFILER
if (FCsvProfiler* Profiler = FCsvProfiler::Get())
{
if (Profiler->IsCapturing())
{
Profiler->RecordCustomStat("ReplicatedActors", CSV_CATEGORY_INDEX(ReplicationGraph), Stats.NumReplicatedActors, ECsvCustomStatOp::Set);
Profiler->RecordCustomStat("CleanActors", CSV_CATEGORY_INDEX(ReplicationGraph), Stats.NumReplicatedCleanActors, ECsvCustomStatOp::Set);
Profiler->RecordCustomStat("FastPathActors", CSV_CATEGORY_INDEX(ReplicationGraph), Stats.NumReplicatedFastPathActors, ECsvCustomStatOp::Set);
}
}
#endif
}
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::UNetReplicationGraphConnection()
{
}
void UNetReplicationGraphConnection::Serialize(FArchive& Ar)
{
Super::Serialize(Ar);
if (Ar.IsCountingMemory())
{
GRANULAR_NETWORK_MEMORY_TRACKING_INIT(Ar, "UNetReplicationGraphConnection::Serialize");
GRANULAR_NETWORK_MEMORY_TRACKING_TRACK("ActorInfoMap", ActorInfoMap.CountBytes(Ar));
GRANULAR_NETWORK_MEMORY_TRACKING_TRACK("OnClientVisibleLevelNameAddMap", OnClientVisibleLevelNameAddMap.CountBytes(Ar));
GRANULAR_NETWORK_MEMORY_TRACKING_TRACK("PendingDestructionInfoList",
PendingDestructInfoList.CountBytes(Ar);
for (const FCachedDestructInfo& Info : PendingDestructInfoList)
{
Info.CountBytes(Ar);
}
);
GRANULAR_NETWORK_MEMORY_TRACKING_TRACK("TrackedDestructionInfoPtrs", TrackedDestructionInfoPtrs.CountBytes(Ar));
GRANULAR_NETWORK_MEMORY_TRACKING_TRACK("PendingDormantDestructList", PendingDormantDestructList.CountBytes(Ar));
GRANULAR_NETWORK_MEMORY_TRACKING_TRACK("TrackedDormantDestructionInfos", TrackedDormantDestructionInfos.CountBytes(Ar));
}
}
void UNetReplicationGraphConnection::TearDown()
{
#if DO_ENABLE_REPGRAPH_DEBUG_ACTOR
if (DebugActor)
{
DebugActor->Destroy();
}
DebugActor = nullptr;
#endif
Super::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
}
void UNetReplicationGraphConnection::NotifyActorChannelAdded(AActor* Actor, class UActorChannel* Channel)
{
#if WITH_SERVER_CODE
UpdateActorConnectionCounter(Actor, Channel->Connection, ActorChannelCreateCounter);
if (RepGraphConditionalActorBreakpoint(Actor, Channel->Connection))
{
UE_LOG(LogReplicationGraph, Display, TEXT("::NotifyActorChannelAdded. %s. Channel: %s. Connection: %s"), *GetPathNameSafe(Actor), *Channel->Describe(), *Channel->Connection->Describe());
}
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
FConnectionReplicationActorInfo& ActorInfo = ActorInfoMap.FindOrAdd(Actor);
// The ActorInfoMap may have a channel already.
// This may happen in cases like dormancy where new Actor Channels can be created and then
// closed multiple times for the same Actor, potentially before receiving CleanUp calls.
if (ActorInfo.Channel && Channel != ActorInfo.Channel)
{
UE_LOG(LogReplicationGraph, Log, TEXT("::NotifyActorChannelAdded. Fixing up stale channel reference Old: %s New: %s"), *ActorInfo.Channel->Describe(), *Channel->Describe());
ensureMsgf(ActorInfo.Channel->Closing, TEXT("Attempted to add an Actor Channel when a valid channel already exists for the actor. Actor=%s, OldChannel=%s, NewChannel=%s"),
*GetPathNameSafe(Actor), *ActorInfo.Channel->Describe(), *Channel->Describe());
ActorInfoMap.RemoveChannel(ActorInfo.Channel);
}
ActorInfo.Channel = Channel;
ActorInfoMap.AddChannel(Actor, Channel);
#endif // WITH_SERVER_CODE
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 UNetReplicationGraphConnection::NotifyActorChannelRemoved(AActor* Actor)
{
// No need to do anything here. This is called when an actor channel is closed, but
// we're still waiting for the close bunch to be acked. Until then, we can't safely replicate
// the actor from this channel. See NotifyActorChannelCleanedUp.
}
void UNetReplicationGraphConnection::NotifyActorChannelCleanedUp(UActorChannel* Channel)
{
if (Channel)
{
QUICK_SCOPE_CYCLE_COUNTER(UNetReplicationGraphConnection_NotifyActorChannelCleanedUp);
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
// No existing way to quickly index from actor channel -> ActorInfo. May want a way to speed this up.
// The Actor pointer on the channel would have been set to null previously when the channel was closed,
// so we can't use that to look up the actor info by key.
// Also, the actor may be destroyed and garbage collected before this point.
FConnectionReplicationActorInfo* ActorInfo = ActorInfoMap.FindByChannel(Channel);
if (ActorInfo)
{
// Note we can't directly remove the entry from ActorInfoMap.ActorMap since we don't have the AActor* to key into that map
// But we don't actually have to remove the entry since we no longer iterate through ActorInfoMap.ActorMap in non debug functions.
// So all we need to do is clear the runtime/transient data for this actorinfo map. (We want to preserve the dormancy flag and the
// settings we pulled from the FGlobalActorReplicationInfo, but clear the frame counters, etc).
if (Channel == ActorInfo->Channel)
{
// Only reset our state if we're still the associated channel.
ActorInfo->ResetFrameCounters();
}
else
{
UE_LOG(LogReplicationGraph, Log, TEXT("::NotifyActorChannelCleanedUp. CleanUp for stale channel reference Old: %s New: %s"), *Channel->Describe(), *DescribeSafe(ActorInfo->Channel));
}
// Remove reference from channel map
// We call this last, as it could be the last thing holding onto the underlying
// shared pointer and we don't want to try and access potentially garbage memory.
// This isn't a big deal for now since FConnectionReplicationActorInfo is just a POD
// type, but if that changes it could be a problem.
ActorInfoMap.RemoveChannel(Channel);
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 UNetReplicationGraphConnection::InitForGraph(UReplicationGraph* Graph)
{
// The per-connection data needs to know about the global data map so that it can pull defaults from it when we initialize a new actor
TSharedPtr<FReplicationGraphGlobalData> Globals = Graph ? Graph->GetGraphGlobals() : nullptr;
if (Globals.IsValid())
{
ActorInfoMap.SetGlobalMap(Globals->GlobalActorReplicationInfoMap);
}
}
void UNetReplicationGraphConnection::InitForConnection(UNetConnection* InConnection)
{
NetConnection = InConnection;
InConnection->SetReplicationConnectionDriver(this);
#if DO_ENABLE_REPGRAPH_DEBUG_ACTOR
UReplicationGraph* Graph = Cast<UReplicationGraph>(GetOuter());
DebugActor = Graph->CreateDebugActor();
if (DebugActor)
{
DebugActor->ConnectionManager = this;
DebugActor->ReplicationGraph = Graph;
}
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
#endif
#if 0
// This does not work because the control channel hasn't been opened yet. Could be moved further down the init path or in ServerReplicateActors.
FString TestStr(TEXT("Replication Graph is Enabled!"));
FNetControlMessage<NMT_DebugText>::Send(InConnection,TestStr);
InConnection->FlushNet();
#endif
}
void UNetReplicationGraphConnection::AddConnectionGraphNode(UReplicationGraphNode* Node)
{
ConnectionGraphNodes.Add(Node);
}
void UNetReplicationGraphConnection::RemoveConnectionGraphNode(UReplicationGraphNode* Node)
{
ConnectionGraphNodes.RemoveSingleSwap(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
}
bool UNetReplicationGraphConnection::PrepareForReplication()
{
NetConnection->ViewTarget = NetConnection->PlayerController ? NetConnection->PlayerController->GetViewTarget() : ToRawPtr(NetConnection->OwningActor);
UWorld* CurrentWorld = GetWorld();
UPackage* CurrentWorldPackage = CurrentWorld ? CurrentWorld->GetPackage() : nullptr;
bool bConnectionHasCorrectWorld = CurrentWorldPackage ? NetConnection->GetClientWorldPackageName() == CurrentWorldPackage->GetFName() : true;
// Set any children viewtargets
for (int32 i = 0; i < NetConnection->Children.Num(); ++i)
{
UNetConnection* CurChild = NetConnection->Children[i];
CurChild->ViewTarget = CurChild->PlayerController ? CurChild->PlayerController->GetViewTarget() : ToRawPtr(CurChild->OwningActor);
}
return (NetConnection->GetConnectionState() != USOCK_Closed) && (NetConnection->ViewTarget != nullptr) && bConnectionHasCorrectWorld;
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 UNetReplicationGraphConnection::NotifyAddDestructionInfo(FActorDestructionInfo* DestructInfo)
{
#if WITH_SERVER_CODE
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 (DestructInfo->StreamingLevelName != NAME_None)
{
if (NetConnection->ClientVisibleLevelNames.Contains(DestructInfo->StreamingLevelName) == false)
{
// This client does not have this streaming level loaded. We should get notified again via UNetConnection::UpdateLevelVisibility
// (This should be enough. Legacy system would add the info and then do the level check in ::ServerReplicateActors, but this should be unnecessary)
return;
}
}
bool bWasAlreadyTracked = false;
TrackedDestructionInfoPtrs.Add(DestructInfo, &bWasAlreadyTracked);
if (bWasAlreadyTracked)
{
return;
}
#if !(UE_BUILD_SHIPPING || UE_BUILD_TEST)
// Should not be happening but lets check in non shipping builds.
int32 ExistingIdx = PendingDestructInfoList.IndexOfByKey(DestructInfo);
if (!ensureMsgf(ExistingIdx == INDEX_NONE, TEXT("::NotifyAddDestructionInfo already contains DestructInfo: 0x%X (%s)"), (int64)DestructInfo, *DestructInfo->PathName))
{
return;
}
#endif
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
PendingDestructInfoList.Emplace( FCachedDestructInfo(DestructInfo) );
//UE_LOG(LogReplicationGraph, Display, TEXT("::NotifyAddDestructionInfo. Connection: %s. DestructInfo: %s. NewTotal: %d"), *NetConnection->Describe(), *DestructInfo->PathName, PendingDestructInfoList.Num());
#endif // WITH_SERVER_CODE
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 UNetReplicationGraphConnection::NotifyAddDormantDestructionInfo(AActor* Actor)
{
#if WITH_SERVER_CODE
if (Actor && NetConnection && NetConnection->Driver && NetConnection->Driver->GuidCache)
{
ULevel* Level = Actor->GetLevel();
FName StreamingLevelName = NAME_None;
if (Level && Level->IsPersistentLevel())
{
StreamingLevelName = Level->GetOutermost()->GetFName();
if (NetConnection->ClientVisibleLevelNames.Contains(StreamingLevelName) == false)
{
UE_LOG(LogReplicationGraph, Verbose, TEXT("NotifyAddDormantDestructionInfo skipping actor [%s] because streaming level is no longer visible."), *GetNameSafe(Actor));
return;
}
}
FNetworkGUID NetGUID = NetConnection->Driver->GuidCache->GetNetGUID(Actor);
if (NetGUID.IsValid() && !NetGUID.IsDefault())
{
bool bWasAlreadyTracked = false;
TrackedDormantDestructionInfos.Add(NetGUID, &bWasAlreadyTracked);
if (bWasAlreadyTracked)
{
return;
}
FCachedDormantDestructInfo& Info = PendingDormantDestructList.AddDefaulted_GetRef();
Info.NetGUID = NetGUID;
Info.Level = Level;
Info.ObjOuter = Actor->GetOuter();
Info.PathName = Actor->GetName();
}
}
#endif // WITH_SERVER_CODE
}
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 UNetReplicationGraphConnection::NotifyRemoveDestructionInfo(FActorDestructionInfo* DestructInfo)
{
const FCachedDestructInfo CachedDestructInfo(DestructInfo);
bool bRemoved = PendingDestructInfoList.RemoveSingleSwap(DestructInfo, false) > 0;
// Check if the actor is in the out of range list
if( !bRemoved )
{
OutOfRangeDestroyedActors.RemoveSingleSwap(DestructInfo, false);
}
TrackedDestructionInfoPtrs.Remove(DestructInfo);
#if !(UE_BUILD_SHIPPING || UE_BUILD_TEST)
// Check that its totally gone. Should not be happening!
int32 DuplicateIdx = INDEX_NONE;
while(true)
{
DuplicateIdx = PendingDestructInfoList.IndexOfByKey(DestructInfo);
if (!ensureMsgf(DuplicateIdx == INDEX_NONE, TEXT("::NotifyRemoveDestructionInfo list STILL contains DestructInfo: 0x%X (%s)"), (int64)DestructInfo, *DestructInfo->PathName))
{
PendingDestructInfoList.RemoveAtSwap(DuplicateIdx, 1, false);
continue;
}
break;
}
#endif
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 UNetReplicationGraphConnection::NotifyResetDestructionInfo()
{
TrackedDestructionInfoPtrs.Reset();
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
PendingDestructInfoList.Reset();
OutOfRangeDestroyedActors.Reset();
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 UNetReplicationGraphConnection::NotifyResetAllNetworkActors()
{
for (UReplicationGraphNode* Node : ConnectionGraphNodes)
{
Node->NotifyResetAllNetworkActors();
}
// Intentionally not resetting the actor info map, since it may contain references to open channels
// Open channels associated with actors that are not added back into the graph will be cleaned up normally using the close frame number
}
FActorRepListRefView& UNetReplicationGraphConnection::GetPrevDormantActorListForNode(const UReplicationGraphNode* GridNode)
{
return PrevDormantActorListPerNode.FindOrAdd(GridNode);
}
void UNetReplicationGraphConnection::RemoveActorFromAllPrevDormantActorLists(AActor* InActor)
{
for (TPair<TObjectKey<UReplicationGraphNode>, FActorRepListRefView>& PrevDormantActorListPerGridPair : PrevDormantActorListPerNode)
{
PrevDormantActorListPerGridPair.Value.RemoveFast(InActor);
}
}
void UNetReplicationGraphConnection::GetClientVisibleLevelNames(TSet<FName>& OutLevelNames) const
{
if (NetConnection == nullptr)
{
return;
}
OutLevelNames.Append(NetConnection->ClientVisibleLevelNames);
for (const UNetConnection* Child : NetConnection->Children)
{
if (Child != nullptr)
{
// For sets, we don't have to worry about uniqueness due to the nature of the data structure.
OutLevelNames.Append(Child->ClientVisibleLevelNames);
}
}
}
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 UNetReplicationGraphConnection::NotifyClientVisibleLevelNamesAdd(FName LevelName, UWorld* StreamingWorld)
{
RG_QUICK_SCOPE_CYCLE_COUNTER(UNetReplicationGraphConnection_NotifyClientVisibleLevelNamesAdd);
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
// Undormant every actor in this world for this connection.
if (StreamingWorld && StreamingWorld->PersistentLevel)
{
TArray<AActor*>& Actors = StreamingWorld->PersistentLevel->Actors;
for (AActor* Actor : Actors)
{
if (Actor && (Actor->NetDormancy == DORM_DormantAll || (Actor->NetDormancy == DORM_Initial && Actor->IsNetStartupActor() == 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
{
SetActorNotDormantOnConnection(Actor);
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
}
}
}
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
OnClientVisibleLevelNameAdd.Broadcast(LevelName, StreamingWorld);
if (FOnClientVisibleLevelNamesAdd* MapDelegate = OnClientVisibleLevelNameAddMap.Find(LevelName))
{
MapDelegate->Broadcast(LevelName, StreamingWorld);
}
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
}
int64 UNetReplicationGraphConnection::ReplicateDestructionInfos(const FNetViewerArray& Viewers, const float DestructInfoMaxDistanceSquared)
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
{
QUICK_SCOPE_CYCLE_COUNTER(ReplicateDestructionInfos);
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
int64 NumBits = 0;
#if WITH_SERVER_CODE
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
for (int32 idx=PendingDestructInfoList.Num()-1; idx >=0; --idx)
{
FCachedDestructInfo& Info = PendingDestructInfoList[idx];
FActorDestructionInfo* DestructInfo = Info.DestructionInfo;
bool bSendDestructionInfo = 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
if (!DestructInfo->bIgnoreDistanceCulling)
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
{
// Only send destruction info if the viewers are close enough to the destroyed actor
for (const FNetViewer& CurViewer : Viewers)
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 float DistSquared = FVector::DistSquared2D(Info.CachedPosition, CurViewer.ViewLocation);
if (DistSquared < DestructInfoMaxDistanceSquared)
{
bSendDestructionInfo = true;
break;
}
}
}
if (bSendDestructionInfo || DestructInfo->bIgnoreDistanceCulling)
{
if (NetConnection && NetConnection->Driver)
{
NumBits += NetConnection->Driver->SendDestructionInfo(NetConnection, DestructInfo);
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
PendingDestructInfoList.RemoveAtSwap(idx, 1, false);
TrackedDestructionInfoPtrs.Remove(DestructInfo);
}
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
}
else
{
// Add the far actor to the out of range list so we don't evaluate it every frame
OutOfRangeDestroyedActors.Emplace(MoveTemp(Info));
PendingDestructInfoList.RemoveAtSwap(idx, 1, 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
}
#endif // #if WITH_SERVER_CODE
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
return NumBits;
}
int64 UNetReplicationGraphConnection::ReplicateDormantDestructionInfos()
{
CSV_SCOPED_TIMING_STAT_EXCLUSIVE(ReplicateDormantDestructionInfos);
QUICK_SCOPE_CYCLE_COUNTER(ReplicateDormantDestructionInfos);
int64 NumBits = 0;
#if WITH_SERVER_CODE
if (NetConnection && NetConnection->Driver)
{
for (const FCachedDormantDestructInfo& Info : PendingDormantDestructList)
{
FActorDestructionInfo DestructInfo;
DestructInfo.DestroyedPosition = FVector::ZeroVector;
DestructInfo.NetGUID = Info.NetGUID;
DestructInfo.Level = Info.Level;
DestructInfo.ObjOuter = Info.ObjOuter;
DestructInfo.PathName = Info.PathName;
DestructInfo.StreamingLevelName = NAME_None; // currently unused by SetChannelActorForDestroy
DestructInfo.Reason = EChannelCloseReason::Relevancy;
NumBits += NetConnection->Driver->SendDestructionInfo(NetConnection, &DestructInfo);
}
PendingDormantDestructList.Reset();
TrackedDormantDestructionInfos.Reset();
}
#endif // WITH_SERVER_CODE
return NumBits;
}
void UNetReplicationGraphConnection::UpdateGatherLocationsForConnection(const FNetViewerArray& ConnectionViewers, const FReplicationGraphDestructionSettings& DestructionSettings)
{
for (const FNetViewer& CurViewer : ConnectionViewers)
{
if (CurViewer.Connection != nullptr)
{
FLastLocationGatherInfo* LastInfoForViewer = LastGatherLocations.FindByKey<UNetConnection*>(CurViewer.Connection);
if (LastInfoForViewer != nullptr)
{
OnUpdateViewerLocation(LastInfoForViewer, CurViewer, DestructionSettings);
}
else
{
// We need to add this viewer to the last gather locations
LastGatherLocations.Emplace(CurViewer.Connection, CurViewer.ViewLocation);
}
}
}
// Clean up any dead entries in the last gather array
LastGatherLocations.RemoveAll([&](FLastLocationGatherInfo& CurGatherInfo) {
return CurGatherInfo.Connection == nullptr;
});
}
void UNetReplicationGraphConnection::OnUpdateViewerLocation(FLastLocationGatherInfo* LocationInfo, const FNetViewer& Viewer, const FReplicationGraphDestructionSettings& DestructionSettings )
{
const bool bIgnoreDistanceCheck = DestructionSettings.OutOfRangeDistanceCheckThresholdSquared == 0.0f;
const float OutOfRangeDistanceSquared = FVector::DistSquared2D(Viewer.ViewLocation, LocationInfo->LastOutOfRangeLocationCheck);
// Test all accumulated out of range actors only once the viewer has gone far enough from the last check
if( bIgnoreDistanceCheck || (OutOfRangeDistanceSquared > DestructionSettings.OutOfRangeDistanceCheckThresholdSquared) )
{
CSV_SCOPED_TIMING_STAT_EXCLUSIVE(OnUpdateViewerLocation_TestDestroyedActors);
LocationInfo->LastOutOfRangeLocationCheck = Viewer.ViewLocation;
for (int32 Index=OutOfRangeDestroyedActors.Num()-1; Index >=0; --Index)
{
FCachedDestructInfo& CachedInfo = OutOfRangeDestroyedActors[Index];
const float ActorDistSquared = FVector::DistSquared2D(CachedInfo.CachedPosition, Viewer.ViewLocation);
if (ActorDistSquared < DestructionSettings.DestructInfoMaxDistanceSquared)
{
// Swap the info into the Pending List to get it replicated
PendingDestructInfoList.Emplace(MoveTemp(CachedInfo));
OutOfRangeDestroyedActors.RemoveAtSwap(Index, 1, false);
}
}
}
LocationInfo->LastLocation = Viewer.ViewLocation;
}
void UNetReplicationGraphConnection::SetActorNotDormantOnConnection(AActor* InActor)
{
if (FConnectionReplicationActorInfo* Info = ActorInfoMap.Find(InActor))
{
Info->bDormantOnConnection = false;
Info->bGridSpatilization_AlreadyDormant = false;
RemoveActorFromAllPrevDormantActorLists(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
// --------------------------------------------------------------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------------------------------
UReplicationGraphNode::UReplicationGraphNode()
{
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 UReplicationGraphNode::Serialize(FArchive& Ar)
{
Super::Serialize(Ar);
if (Ar.IsCountingMemory())
{
GRANULAR_NETWORK_MEMORY_TRACKING_INIT(Ar, "UReplicationGraphNode::Serialize");
GRANULAR_NETWORK_MEMORY_TRACKING_TRACK("AllChildNodes", AllChildNodes.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
void UReplicationGraphNode::NotifyResetAllNetworkActors()
{
for (UReplicationGraphNode* ChildNode : AllChildNodes)
{
ChildNode->NotifyResetAllNetworkActors();
}
}
bool UReplicationGraphNode::RemoveChildNode(UReplicationGraphNode* ChildNode, UReplicationGraphNode::NodeOrdering NodeOrder)
{
ensure(ChildNode != nullptr);
int32 Removed(0);
if (NodeOrder == NodeOrdering::IgnoreOrdering)
{
Removed = AllChildNodes.RemoveSingleSwap(ChildNode, false);
}
else
{
Removed = AllChildNodes.RemoveSingle(ChildNode);
}
if (Removed > 0)
{
ChildNode->TearDown();
}
return Removed > 0;
}
void UReplicationGraphNode::CleanChildNodes(UReplicationGraphNode::NodeOrdering NodeOrder)
{
auto RemoveFunc = [](UReplicationGraphNode* GridChildNode)
{
return !IsValid(GridChildNode);
};
if (NodeOrder == NodeOrdering::IgnoreOrdering)
{
AllChildNodes.RemoveAllSwap(RemoveFunc, false);
}
else
{
AllChildNodes.RemoveAll(RemoveFunc);
}
}
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 UReplicationGraphNode::TearDown()
{
for (UReplicationGraphNode* Node : AllChildNodes)
{
Node->TearDown();
}
AllChildNodes.Reset();
MarkAsGarbage();
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 UReplicationGraphNode::DoCollectActorRepListStats(FActorRepListStatCollector& StatsCollector) const
{
// Visit lists owned by this node
OnCollectActorRepListStats(StatsCollector);
// Flag the node as visited so we don't collect it twice
StatsCollector.FlagNodeVisited(this);
// Collect stats on all child nodes too
for (const UReplicationGraphNode* Node : AllChildNodes)
{
Node->DoCollectActorRepListStats(StatsCollector);
}
}
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 FStreamingLevelActorListCollection::AddActor(const FNewReplicatedActorInfo& ActorInfo)
{
FStreamingLevelActors* Item = StreamingLevelLists.FindByKey(ActorInfo.StreamingLevelName);
if (!Item)
{
Item = &StreamingLevelLists.Emplace_GetRef(ActorInfo.StreamingLevelName);
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 (CVar_RepGraph_Verify)
{
ensureMsgf(Item->ReplicationActorList.Contains(ActorInfo.Actor) == false, TEXT("%s being added to %s twice! Streaming level: %s"), *GetActorRepListTypeDebugString(ActorInfo.Actor), *ActorInfo.StreamingLevelName.ToString() );
}
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
Item->ReplicationActorList.Add(ActorInfo.Actor);
}
bool FStreamingLevelActorListCollection::RemoveActor(const FNewReplicatedActorInfo& ActorInfo, bool bWarnIfNotFound, 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
{
bool bRemovedSomething = 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
for (FStreamingLevelActors& StreamingList : StreamingLevelLists)
{
if (StreamingList.StreamingLevelName == ActorInfo.StreamingLevelName)
{
bRemovedSomething = StreamingList.ReplicationActorList.RemoveSlow(ActorInfo.Actor);
if (!bRemovedSomething && bWarnIfNotFound)
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
{
UE_LOG(LogReplicationGraph, Warning, TEXT("Attempted to remove %s from list %s but it was not found. (StreamingLevelName == %s)"), *GetActorRepListTypeDebugString(ActorInfo.Actor), *GetPathNameSafe(Outer), *ActorInfo.StreamingLevelName.ToString() );
}
if (CVar_RepGraph_Verify)
{
ensureMsgf(StreamingList.ReplicationActorList.Contains(ActorInfo.Actor) == false, TEXT("Actor %s is still in %s after removal. Streaming Level: %s"), *GetActorRepListTypeDebugString(ActorInfo.Actor), *GetPathNameSafe(Outer));
}
break;
}
}
return bRemovedSomething;
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 FStreamingLevelActorListCollection::RemoveActorFast(const FNewReplicatedActorInfo& ActorInfo, UReplicationGraphNode* Outer)
{
bool bRemovedSomething = false;
for (FStreamingLevelActors& StreamingList : StreamingLevelLists)
{
if (StreamingList.StreamingLevelName == ActorInfo.StreamingLevelName)
{
bRemovedSomething = StreamingList.ReplicationActorList.RemoveFast(ActorInfo.Actor);
break;
}
}
return bRemovedSomething;
}
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 FStreamingLevelActorListCollection::Reset()
{
for (FStreamingLevelActors& StreamingList : StreamingLevelLists)
{
StreamingList.ReplicationActorList.Reset();
}
}
void FStreamingLevelActorListCollection::Gather(const FConnectionGatherActorListParameters& Params)
{
for (const FStreamingLevelActors& StreamingList : StreamingLevelLists)
{
if (Params.CheckClientVisibilityForLevel(StreamingList.StreamingLevelName))
{
Params.OutGatheredReplicationLists.AddReplicationActorList(StreamingList.ReplicationActorList);
}
else
{
UE_LOG(LogReplicationGraph, Verbose, TEXT("Level Not Loaded %s. (Client has %d levels loaded)"), *StreamingList.StreamingLevelName.ToString(), Params.ClientVisibleLevelNamesRef.Num());
}
}
}
void FStreamingLevelActorListCollection::DeepCopyFrom(const FStreamingLevelActorListCollection& Source)
{
StreamingLevelLists.Reset();
for (const FStreamingLevelActors& StreamingLevel : Source.StreamingLevelLists)
{
if (StreamingLevel.ReplicationActorList.Num() > 0)
{
FStreamingLevelActors& NewStreamingLevel = StreamingLevelLists.Emplace_GetRef(StreamingLevel.StreamingLevelName);
NewStreamingLevel.ReplicationActorList.CopyContentsFrom(StreamingLevel.ReplicationActorList);
ensure(NewStreamingLevel.ReplicationActorList.Num() == StreamingLevel.ReplicationActorList.Num());
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 FStreamingLevelActorListCollection::GetAll_Debug(TArray<FActorRepListType>& OutArray) const
{
for (const FStreamingLevelActors& StreamingLevel : StreamingLevelLists)
{
StreamingLevel.ReplicationActorList.AppendToTArray(OutArray);
}
}
void FStreamingLevelActorListCollection::Log(FReplicationGraphDebugInfo& DebugInfo) const
{
for (const FStreamingLevelActors& StreamingLevelList : StreamingLevelLists)
{
LogActorRepList(DebugInfo, StreamingLevelList.StreamingLevelName.ToString(), StreamingLevelList.ReplicationActorList);
}
}
void FStreamingLevelActorListCollection::TearDown()
{
for (FStreamingLevelActors& StreamingLevelList : StreamingLevelLists)
{
StreamingLevelList.ReplicationActorList.TearDown();
}
StreamingLevelLists.Empty();
}
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 UReplicationGraphNode_ActorList::Serialize(FArchive& Ar)
{
Super::Serialize(Ar);
if (Ar.IsCountingMemory())
{
GRANULAR_NETWORK_MEMORY_TRACKING_INIT(Ar, "UReplicationGraphNode_ActorList::Serialize");
GRANULAR_NETWORK_MEMORY_TRACKING_TRACK("ReplicationActorList", ReplicationActorList.CountBytes(Ar));
GRANULAR_NETWORK_MEMORY_TRACKING_TRACK("StreamingLevelCollection", StreamingLevelCollection.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
void UReplicationGraphNode_ActorList::NotifyAddNetworkActor(const FNewReplicatedActorInfo& ActorInfo)
{
UE_CLOG(CVar_RepGraph_LogActorAdd>0, LogReplicationGraph, Display, TEXT("UReplicationGraphNode_ActorList::NotifyAddNetworkActor %s on %s."), *ActorInfo.Actor->GetFullName(), *GetPathName());
if (ActorInfo.StreamingLevelName == NAME_None)
{
if (CVar_RepGraph_Verify)
{
ensureMsgf(ReplicationActorList.Contains(ActorInfo.Actor) == false, TEXT("%s being added to %s twice!"), *GetActorRepListTypeDebugString(ActorInfo.Actor) );
}
ReplicationActorList.Add(ActorInfo.Actor);
}
else
{
StreamingLevelCollection.AddActor(ActorInfo);
}
}
bool UReplicationGraphNode_ActorList::NotifyRemoveNetworkActor(const FNewReplicatedActorInfo& ActorInfo, bool bWarnIfNotFound)
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
{
UE_CLOG(CVar_RepGraph_LogActorRemove>0, LogReplicationGraph, Display, TEXT("UReplicationGraphNode_ActorList::NotifyRemoveNetworkActor %s on %s."), *ActorInfo.Actor->GetFullName(), *GetPathName());
bool bRemovedSomething = 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
if (ActorInfo.StreamingLevelName == NAME_None)
{
bRemovedSomething = ReplicationActorList.RemoveSlow(ActorInfo.Actor);
UE_CLOG(!bRemovedSomething && bWarnIfNotFound, LogReplicationGraph, Warning, TEXT("Attempted to remove %s from list %s but it was not found. (StreamingLevelName == NAME_None)"), *GetActorRepListTypeDebugString(ActorInfo.Actor), *GetFullName());
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 (CVar_RepGraph_Verify)
{
ensureMsgf(ReplicationActorList.Contains(ActorInfo.Actor) == false, TEXT("Actor %s is still in %s after removal"), *GetActorRepListTypeDebugString(ActorInfo.Actor), *GetPathName());
}
}
else
{
bRemovedSomething = StreamingLevelCollection.RemoveActor(ActorInfo, bWarnIfNotFound, this);
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
}
return bRemovedSomething;
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 the actor very quickly but breaks the list order */
bool UReplicationGraphNode_ActorList::RemoveNetworkActorFast(const FNewReplicatedActorInfo& ActorInfo)
{
if (ActorInfo.StreamingLevelName == NAME_None)
{
return ReplicationActorList.RemoveFast(ActorInfo.Actor);
}
else
{
return StreamingLevelCollection.RemoveActorFast(ActorInfo, this);
}
}
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 UReplicationGraphNode_ActorList::NotifyResetAllNetworkActors()
{
ReplicationActorList.Reset();
StreamingLevelCollection.Reset();
for (UReplicationGraphNode* ChildNode : AllChildNodes)
{
ChildNode->NotifyResetAllNetworkActors();
}
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 UReplicationGraphNode_ActorList::GatherActorListsForConnection(const FConnectionGatherActorListParameters& Params)
{
Params.OutGatheredReplicationLists.AddReplicationActorList(ReplicationActorList);
StreamingLevelCollection.Gather(Params);
for (UReplicationGraphNode* ChildNode : AllChildNodes)
{
ChildNode->GatherActorListsForConnection(Params);
}
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 UReplicationGraphNode_ActorList::DeepCopyActorListsFrom(const UReplicationGraphNode_ActorList* Source)
{
if (Source->ReplicationActorList.Num() > 0)
{
ReplicationActorList.CopyContentsFrom(Source->ReplicationActorList);
}
StreamingLevelCollection.DeepCopyFrom(Source->StreamingLevelCollection);
}
void UReplicationGraphNode_ActorList::GetAllActorsInNode_Debugging(TArray<FActorRepListType>& OutArray) const
{
ReplicationActorList.AppendToTArray(OutArray);
StreamingLevelCollection.GetAll_Debug(OutArray);
for (UReplicationGraphNode* ChildNode : AllChildNodes)
{
ChildNode->GetAllActorsInNode_Debugging(OutArray);
}
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 UReplicationGraphNode_ActorList::TearDown()
{
Super::TearDown();
ReplicationActorList.TearDown();
StreamingLevelCollection.TearDown();
}
void UReplicationGraphNode_ActorList::OnCollectActorRepListStats(FActorRepListStatCollector& StatsCollector) const
{
StatsCollector.VisitRepList(this, ReplicationActorList);
StatsCollector.VisitStreamingLevelCollection(this, StreamingLevelCollection);
Super::OnCollectActorRepListStats(StatsCollector);
}
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 UReplicationGraphNode_ActorList::LogNode(FReplicationGraphDebugInfo& DebugInfo, const FString& NodeName) const
{
DebugInfo.Log(NodeName);
DebugInfo.PushIndent();
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
LogActorList(DebugInfo);
for (UReplicationGraphNode* ChildNode : AllChildNodes)
{
DebugInfo.PushIndent();
ChildNode->LogNode(DebugInfo, FString::Printf(TEXT("Child: %s"), *ChildNode->GetName()));
DebugInfo.PopIndent();
}
DebugInfo.PopIndent();
}
void UReplicationGraphNode_ActorList::LogActorList(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
LogActorRepList(DebugInfo, TEXT("World"), ReplicationActorList);
StreamingLevelCollection.Log(DebugInfo);
}
// --------------------------------------------------------------------------------------------------------------------------------------------
UReplicationGraphNode_ActorListFrequencyBuckets::FSettings UReplicationGraphNode_ActorListFrequencyBuckets::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
void UReplicationGraphNode_ActorListFrequencyBuckets::Serialize(FArchive& Ar)
{
Super::Serialize(Ar);
if (Ar.IsCountingMemory())
{
GRANULAR_NETWORK_MEMORY_TRACKING_INIT(Ar, "UReplicationGraphNode_ActorListFrequencyBuckets::Serialize");
if (Settings.IsValid())
{
GRANULAR_NETWORK_MEMORY_TRACKING_TRACK("Settings", Settings->CountBytes(Ar));
}
GRANULAR_NETWORK_MEMORY_TRACKING_TRACK("NonStreamingCollection",
NonStreamingCollection.CountBytes(Ar);
for (const FActorRepListRefView& RepList : NonStreamingCollection)
{
RepList.CountBytes(Ar);
}
);
GRANULAR_NETWORK_MEMORY_TRACKING_TRACK("StreamingLevelCollection", StreamingLevelCollection.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
void UReplicationGraphNode_ActorListFrequencyBuckets::NotifyAddNetworkActor(const FNewReplicatedActorInfo& ActorInfo)
{
UE_CLOG(CVar_RepGraph_LogActorAdd>0, LogReplicationGraph, Display, TEXT("UReplicationGraphNode_ActorListFrequencyBuckets::NotifyAddNetworkActor %s on %s."), *ActorInfo.Actor->GetFullName(), *GetPathName());
if (ActorInfo.StreamingLevelName == NAME_None)
{
// Add to smallest bucket
FActorRepListRefView* BestList = nullptr;
int32 LeastNum = INT_MAX;
for (FActorRepListRefView& List : NonStreamingCollection)
{
if (List.Num() < LeastNum)
{
BestList = &List;
LeastNum = List.Num();
}
if (CVar_RepGraph_Verify)
{
ensureMsgf(List.Contains(ActorInfo.Actor) == false, TEXT("%s being added to %s twice!"), *GetActorRepListTypeDebugString(ActorInfo.Actor) );
}
}
repCheck(BestList != nullptr);
BestList->Add(ActorInfo.Actor);
TotalNumNonStreamingActors++;
CheckRebalance();
}
else
{
StreamingLevelCollection.AddActor(ActorInfo);
}
}
bool UReplicationGraphNode_ActorListFrequencyBuckets::NotifyRemoveNetworkActor(const FNewReplicatedActorInfo& ActorInfo, bool bWarnIfNotFound)
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
{
UE_CLOG(CVar_RepGraph_LogActorRemove>0, LogReplicationGraph, Display, TEXT("UReplicationGraphNode_ActorListFrequencyBuckets::NotifyRemoveNetworkActor %s on %s."), *ActorInfo.Actor->GetFullName(), *GetPathName());
bool bRemovedSomething = 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
if (ActorInfo.StreamingLevelName == NAME_None)
{
bool bFound = false;
for (FActorRepListRefView& List : NonStreamingCollection)
{
if (List.RemoveSlow(ActorInfo.Actor))
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
{
bRemovedSomething = true;
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
TotalNumNonStreamingActors--;
CheckRebalance();
if (!CVar_RepGraph_Verify)
{
// Eary out if we dont have to verify
return bRemovedSomething;
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 (bFound)
{
// We already removed this actor so this is a dupe!
repCheck(CVar_RepGraph_Verify);
ensureMsgf(false, TEXT("Actor %s is still in %s after removal"), *GetActorRepListTypeDebugString(ActorInfo.Actor), *GetPathName());
}
bFound = true;
}
}
if (!bFound && bWarnIfNotFound)
{
UE_LOG(LogReplicationGraph, Warning, TEXT("Attempted to remove %s from list %s but it was not found. (StreamingLevelName == NAME_None)"), *GetActorRepListTypeDebugString(ActorInfo.Actor), *GetFullName());
}
}
else
{
bRemovedSomething = StreamingLevelCollection.RemoveActor(ActorInfo, bWarnIfNotFound, this);
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
}
return bRemovedSomething;
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 UReplicationGraphNode_ActorListFrequencyBuckets::NotifyResetAllNetworkActors()
{
for (FActorRepListRefView& List : NonStreamingCollection)
{
List.Reset();
}
StreamingLevelCollection.Reset();
TotalNumNonStreamingActors = 0;
}
void UReplicationGraphNode_ActorListFrequencyBuckets::GatherActorListsForConnection(const FConnectionGatherActorListParameters& Params)
{
#if WITH_SERVER_CODE
const FSettings& MySettings = GetSettings();
const uint32 ReplicationFrameNum = Params.ReplicationFrameNum;
if (MySettings.EnableFastPath)
{
// Return one list as Default and the rest as FastShared
const int32 DefaultReplicationIdx = (ReplicationFrameNum % NonStreamingCollection.Num());
for (int32 idx = 0; idx < NonStreamingCollection.Num(); ++idx)
{
if (DefaultReplicationIdx == idx)
{
// Default Rep Path
Params.OutGatheredReplicationLists.AddReplicationActorList(NonStreamingCollection[idx], EActorRepListTypeFlags::Default);
}
else
{
// Only do FastShared if modulo passes
if (ReplicationFrameNum % MySettings.FastPathFrameModulo == 0)
{
Params.OutGatheredReplicationLists.AddReplicationActorList(NonStreamingCollection[idx], EActorRepListTypeFlags::FastShared);
}
}
}
}
else
{
// Default path only: don't return lists in "off" frames.
const int32 idx = Params.ReplicationFrameNum % NonStreamingCollection.Num();
Params.OutGatheredReplicationLists.AddReplicationActorList(NonStreamingCollection[idx]);
}
StreamingLevelCollection.Gather(Params);
#endif // WITH_SERVER_CODE
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 UReplicationGraphNode_ActorListFrequencyBuckets::SetNonStreamingCollectionSize(const int32 NewSize)
{
// Save everything off
static TArray<FActorRepListType> FullList;
FullList.Reset();
for (FActorRepListRefView& List : NonStreamingCollection)
{
List.AppendToTArray(FullList);
}
// Reset
NonStreamingCollection.SetNum(NewSize);
for (FActorRepListRefView& List : NonStreamingCollection)
{
List.Reset(GetSettings().ListSize);
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
}
// Readd/Rebalance
for (int32 idx=0; idx < FullList.Num(); ++idx)
{
NonStreamingCollection[idx % NewSize].Add( FullList[idx] );
}
}
void UReplicationGraphNode_ActorListFrequencyBuckets::CheckRebalance()
{
const int32 CurrentNumBuckets = NonStreamingCollection.Num();
int32 DesiredNumBuckets = CurrentNumBuckets;
for (const FSettings::FBucketThresholds& Threshold : GetSettings().BucketThresholds)
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 (TotalNumNonStreamingActors <= Threshold.MaxActors)
{
DesiredNumBuckets = Threshold.NumBuckets;
break;
}
}
if (DesiredNumBuckets != CurrentNumBuckets)
{
//UE_LOG(LogReplicationGraph, Display, TEXT("Rebalancing %s for %d buckets (%d total actors)"), *GetPathName(), DesiredNumBuckets, TotalNumNonStreamingActors);
SetNonStreamingCollectionSize(DesiredNumBuckets);
}
}
void UReplicationGraphNode_ActorListFrequencyBuckets::GetAllActorsInNode_Debugging(TArray<FActorRepListType>& OutArray) const
{
for (const FActorRepListRefView& List : NonStreamingCollection)
{
List.AppendToTArray(OutArray);
}
StreamingLevelCollection.GetAll_Debug(OutArray);
for (UReplicationGraphNode* ChildNode : AllChildNodes)
{
ChildNode->GetAllActorsInNode_Debugging(OutArray);
}
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 UReplicationGraphNode_ActorListFrequencyBuckets::OnCollectActorRepListStats(FActorRepListStatCollector& StatsCollector) const
{
for (const FActorRepListRefView& List : NonStreamingCollection)
{
StatsCollector.VisitRepList(this, List);
}
StatsCollector.VisitStreamingLevelCollection(this, StreamingLevelCollection);
Super::OnCollectActorRepListStats(StatsCollector);
}
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 UReplicationGraphNode_ActorListFrequencyBuckets::LogNode(FReplicationGraphDebugInfo& DebugInfo, const FString& NodeName) const
{
DebugInfo.Log(NodeName);
DebugInfo.PushIndent();
int32 i=0;
for (const FActorRepListRefView& List : NonStreamingCollection)
{
LogActorRepList(DebugInfo, FString::Printf(TEXT("World Bucket %d"), ++i), List);
}
StreamingLevelCollection.Log(DebugInfo);
DebugInfo.PopIndent();
}
void UReplicationGraphNode_ActorListFrequencyBuckets::TearDown()
{
Super::TearDown();
for (FActorRepListRefView& List : NonStreamingCollection)
{
List.TearDown();
}
StreamingLevelCollection.TearDown();
}
// --------------------------------------------------------------------------------------------------------------------------------------------
// Dynamic Spatial Frequency
// --------------------------------------------------------------------------------------------------------------------------------------------
/*
* Notes on Default Zone Values
* -Below values assume 30hz tick rate (the default UNetDriver::NetServerMaxTickRate value).
* -If you have a different tick rate, you should reinitialize this data structure yourself. See ReInitDynamicSpatializationSettingsCmd as an example of how to do this from a game project.
* -(Alternatively, you can make your own subclass of UReplicationGraphNode_DynamicSpatialFrequency or set UReplicationGraphNode_DynamicSpatialFrequency::Settings*.
*
* Overview of algorithm:
* 1. Determine which zone you are in based on DOT product
* 2. Calculate % of distance/NetCullDistance
* 3. Map+clamp calculated % to MinPCT/MaxPCT.
* 4. Take calculated % (between 0-1) and map to MinDistHz - MaxDistHz.
*
*/
namespace RepGraphDynamicSpatialFrequency
{
const float AssumedTickRate = 30.f; // UNetDriver::NetServerMaxTickRate
const float TargetKBytesSec = 10.f; // 10K/sec
const int64 BitsPerFrame = TargetKBytesSec * 1024.f * 8.f / AssumedTickRate;
};
static TArray<UReplicationGraphNode_DynamicSpatialFrequency::FSpatializationZone>& DefaultSpatializationZones()
{
static TArray<UReplicationGraphNode_DynamicSpatialFrequency::FSpatializationZone> Zones;
Zones.Reset();
// [Default] [FastShared]
// DOT MinPCT MaxPCT MinDistHz MaxDistHz MinDistHz MaxDistHz
Zones.Emplace( 0.00f, 0.05f, 0.10f, 1.f, 1.f, 0.f, 0.f, RepGraphDynamicSpatialFrequency::AssumedTickRate); // Behind viewer
Zones.Emplace( 0.71f, 0.05f, 0.10f, 1.f, 1.f, 0.f, 0.f, RepGraphDynamicSpatialFrequency::AssumedTickRate); // In front but not quite in FOV
Zones.Emplace( 1.00f, 0.10f, 0.50f, 5.f, 1.f, 20.f, 10.f, RepGraphDynamicSpatialFrequency::AssumedTickRate); // Directly in viewer's FOV
return Zones;
}
static TArray<UReplicationGraphNode_DynamicSpatialFrequency::FSpatializationZone>& DefaultSpatializationZones_NoFastShared()
{
static TArray<UReplicationGraphNode_DynamicSpatialFrequency::FSpatializationZone> Zones;
Zones.Reset();
// [Default] [FastShared (Disabled]
// DOT MinPCT MaxPCT MinDistHz MaxDistHz MinDistHz MaxDistHz
Zones.Emplace( 0.00f, 0.05f, 0.10f, 5.f, 1.f, 0.f, 0.f, RepGraphDynamicSpatialFrequency::AssumedTickRate); // Behind viewer
Zones.Emplace( 0.71f, 0.05f, 0.10f, 10.f, 5.f, 0.f, 0.f, RepGraphDynamicSpatialFrequency::AssumedTickRate); // In front but not quite in FOV
Zones.Emplace( 1.00f, 0.10f, 0.50f, 20.f, 5.f, 0.f, 0.f, RepGraphDynamicSpatialFrequency::AssumedTickRate); // Directly in viewer's FOV
return Zones;
}
UReplicationGraphNode_DynamicSpatialFrequency::FSettings UReplicationGraphNode_DynamicSpatialFrequency::DefaultSettings(DefaultSpatializationZones(), DefaultSpatializationZones_NoFastShared(), RepGraphDynamicSpatialFrequency::BitsPerFrame );
FAutoConsoleCommand ReInitDynamicSpatializationSettingsCmd(TEXT("Net.RepGraph.DyanmicSpatialization.Reinit"), TEXT(""), FConsoleCommandDelegate::CreateLambda([]()
{
new (&UReplicationGraphNode_DynamicSpatialFrequency::DefaultSettings) UReplicationGraphNode_DynamicSpatialFrequency::FSettings(DefaultSpatializationZones(), DefaultSpatializationZones_NoFastShared(), RepGraphDynamicSpatialFrequency::BitsPerFrame );
}));
UReplicationGraphNode_DynamicSpatialFrequency::UReplicationGraphNode_DynamicSpatialFrequency()
{
CSVStatName = "DynamicSpatialFrequencyGatherPrioritize";
}
REPGRAPH_DEVCVAR_SHIPCONST(int32, "Net.RepGraph.DynamicSpatialFrequency.UncapBandwidth", CVar_RepGraph_DynamicSpatialFrequency_UncapBandwidth, 0, "Testing CVar that uncaps bandwidth on UReplicationGraphNode_DynamicSpatialFrequency nodes.");
REPGRAPH_DEVCVAR_SHIPCONST(int32, "Net.RepGraph.DynamicSpatialFrequency.OpportunisticLoadBalance", CVar_RepGraph_DynamicSpatialFrequency_OpportunisticLoadBalance, 1, "Defers replication 1 frame in cases where many actors replicate on this frame but few on next frame.");
FORCEINLINE bool ReplicatesEveryFrame(const FConnectionReplicationActorInfo& ConnectionInfo, const bool CheckFastPath)
{
return !(ConnectionInfo.ReplicationPeriodFrame > 1 && (!CheckFastPath || ConnectionInfo.FastPath_ReplicationPeriodFrame > 1));
}
void UReplicationGraphNode_DynamicSpatialFrequency::GatherActorListsForConnection(const FConnectionGatherActorListParameters& Params)
{
#if WITH_SERVER_CODE
repCheck(GraphGlobals.IsValid());
UReplicationGraph* RepGraph = GraphGlobals->ReplicationGraph;
repCheck(RepGraph);
repCheck(GraphGlobals->GlobalActorReplicationInfoMap);
FGlobalActorReplicationInfoMap& GlobalMap = *GraphGlobals->GlobalActorReplicationInfoMap;
UNetConnection* NetConnection = Params.ConnectionManager.NetConnection;
FPerConnectionActorInfoMap& ConnectionActorInfoMap = Params.ConnectionManager.ActorInfoMap;
const int32 FrameNum = Params.ReplicationFrameNum;
int32 TotalNumActorsExpectedNextFrame = 0;
int32& QueuedBits = NetConnection->QueuedBits;
FSettings& MySettings = GetSettings();
const int32 MaxNearestActors = MySettings.MaxNearestActors;
// --------------------------------------------------------
SortedReplicationList.Reset();
NumExpectedReplicationsThisFrame = 0;
NumExpectedReplicationsNextFrame = 0;
bool DoFullGather = true;
{
#if CSV_PROFILER
FScopedCsvStatExclusive ScopedStat(CSVStatName);
#endif
// --------------------------------------------------------------------------------------------------------
// Two passes: filter list down to MaxNearestActors actors based on distance. Then calc freq and resort
// --------------------------------------------------------------------------------------------------------
if (MaxNearestActors >= 0 && !NetConnection->IsReplay())
{
int32 PossibleNumActors = ReplicationActorList.Num();;
// Are we even over the limit?
for (const FStreamingLevelActorListCollection::FStreamingLevelActors& StreamingList : StreamingLevelCollection.StreamingLevelLists)
{
if (Params.CheckClientVisibilityForLevel(StreamingList.StreamingLevelName))
{
PossibleNumActors += StreamingList.ReplicationActorList.Num();
}
}
if (PossibleNumActors > MaxNearestActors)
{
// We need to do an initial filtering pass over these actors based purely on distance (not time since last replicated, etc).
// We will only replicate MaxNearestActors actors.
QUICK_SCOPE_CYCLE_COUNTER(REPGRAPH_DynamicSpatialFrequency_Gather_WithCap);
DoFullGather = false; // Don't do the full gather below. Just looking at SortedReplicationList is not enough because its possible no actors are due to replicate this frame.
// Go through all lists, calc distance and cache FGlobalActorInfo*
GatherActors_DistanceOnly(ReplicationActorList, GlobalMap, ConnectionActorInfoMap, Params);
for (const FStreamingLevelActorListCollection::FStreamingLevelActors& StreamingList : StreamingLevelCollection.StreamingLevelLists)
{
if (Params.CheckClientVisibilityForLevel(StreamingList.StreamingLevelName))
{
GatherActors_DistanceOnly(StreamingList.ReplicationActorList, GlobalMap, ConnectionActorInfoMap, Params);
}
}
ensure(PossibleNumActors == SortedReplicationList.Num());
// Sort list by distance, remove Num - MaxNearestActors from end
SortedReplicationList.Sort();
SortedReplicationList.SetNum(MaxNearestActors, false);
// Do rest of normal spatial calculations and resort
for (int32 idx = SortedReplicationList.Num()-1; idx >= 0; --idx)
{
FDynamicSpatialFrequency_SortedItem& Item = SortedReplicationList[idx];
AActor* Actor = Item.Actor;
FGlobalActorReplicationInfo& GlobalInfo = *Item.GlobalInfo;
CalcFrequencyForActor(Actor, RepGraph, NetConnection, GlobalInfo, ConnectionActorInfoMap, MySettings, Params.Viewers, FrameNum, idx);
}
SortedReplicationList.Sort();
}
}
// --------------------------------------------------------------------------------------------------------
// Single pass: RepList -> Sorted frequency list. No cap on max number of actors to replicate
// --------------------------------------------------------------------------------------------------------
if (DoFullGather)
{
// No cap on numbers of actors, just pull them directly
QUICK_SCOPE_CYCLE_COUNTER(REPGRAPH_DynamicSpatialFrequency_Gather);
GatherActors(ReplicationActorList, GlobalMap, ConnectionActorInfoMap, Params, NetConnection);
for (const FStreamingLevelActorListCollection::FStreamingLevelActors& StreamingList : StreamingLevelCollection.StreamingLevelLists)
{
if (Params.CheckClientVisibilityForLevel(StreamingList.StreamingLevelName))
{
GatherActors(StreamingList.ReplicationActorList, GlobalMap, ConnectionActorInfoMap, Params, NetConnection);
}
}
SortedReplicationList.Sort();
}
}
// --------------------------------------------------------
{
QUICK_SCOPE_CYCLE_COUNTER(REPGRAPH_DynamicSpatialFrequency_Replicate);
const int64 MaxBits = MySettings.MaxBitsPerFrame;
int64 BitsWritten = 0;
// This is how many "not every frame" actors we should replicate this frame. When assigning dynamic frequencies we also track who is due to rep this frame and next frame.
// If this frame has more than the next frame expects, we will deffer half of those reps this frame. This will naturally tend to spread things out. It is not perfect, but low cost.
// Note that when an actor is starved (missed a replication frame) they will not be counted for any of this.
int32 OpportunisticLoadBalanceQuota = (NumExpectedReplicationsThisFrame - NumExpectedReplicationsNextFrame) >> 1;
for (const FDynamicSpatialFrequency_SortedItem& Item : SortedReplicationList)
{
AActor* Actor = Item.Actor;
FGlobalActorReplicationInfo& GlobalInfo = *Item.GlobalInfo;
FConnectionReplicationActorInfo& ConnectionInfo = *Item.ConnectionInfo;
if (!Actor || IsActorValidForReplication(Actor) == false)
{
continue;
}
if (RepGraphConditionalActorBreakpoint(Actor, NetConnection))
{
UE_LOG(LogReplicationGraph, Display, TEXT("UReplicationGraphNode_DynamicSpatialFrequency_Connection Replication: %s"), *Actor->GetName());
}
if (UNLIKELY(ConnectionInfo.bTearOff))
{
continue;
}
if (CVar_RepGraph_DynamicSpatialFrequency_OpportunisticLoadBalance && OpportunisticLoadBalanceQuota > 0 && Item.FramesTillReplicate == 0 && !ReplicatesEveryFrame(ConnectionInfo, Item.EnableFastPath))
{
//UE_LOG(LogReplicationGraph, Display, TEXT("[%d] Opportunistic Skip. %s. OpportunisticLoadBalanceQuota: %d (%d, %d)"), FrameNum, *Actor->GetName(), OpportunisticLoadBalanceQuota, NumExpectedReplicationsThisFrame, NumExpectedReplicationsNextFrame);
OpportunisticLoadBalanceQuota--;
continue;
}
// ------------------------------------------------------
// Default Replication
// ------------------------------------------------------
if (ReadyForNextReplication(ConnectionInfo, GlobalInfo, FrameNum))
{
BitsWritten += RepGraph->ReplicateSingleActor(Actor, ConnectionInfo, GlobalInfo, ConnectionActorInfoMap, Params.ConnectionManager, FrameNum);
ConnectionInfo.FastPath_LastRepFrameNum = FrameNum; // Manually update this here, so that we don't fast rep next frame. When they line up, use default replication.
}
// ------------------------------------------------------
// Fast Path
// ------------------------------------------------------
else if (Item.EnableFastPath && ReadyForNextReplication_FastPath(ConnectionInfo, GlobalInfo, FrameNum))
{
const int64 FastSharedBits = RepGraph->ReplicateSingleActor_FastShared(Actor, ConnectionInfo, GlobalInfo, Params.ConnectionManager, FrameNum);
QueuedBits -= FastSharedBits; // We are doing our own bandwidth limiting here, so offset the netconnection's tracking.
BitsWritten += FastSharedBits;
}
// Bandwidth Cap
if (BitsWritten > MaxBits && CVar_RepGraph_DynamicSpatialFrequency_UncapBandwidth == 0)
{
RepGraph->NotifyConnectionSaturated(Params.ConnectionManager);
break;
}
}
if (CVar_RepGraph_DynamicSpatialFrequency_UncapBandwidth > 0)
{
UE_LOG(LogReplicationGraph, Display, TEXT("Uncapped bandwidth usage of UReplicationGraphNode_DynamicSpatialFrequency = %d bits -> %d bytes -> %.2f KBytes/sec"), BitsWritten, (BitsWritten+7) >> 3, ((float)((BitsWritten+7)>>3)/1024.f) * GraphGlobals->ReplicationGraph->NetDriver->NetServerMaxTickRate);
}
}
#endif // WITH_SERVER_CODE
}
REPGRAPH_DEVCVAR_SHIPCONST(int32, "Net.RepGraph.DynamicSpatialFrequency.Draw", CVar_RepGraph_DynamicSpatialFrequency_Draw, 0, "");
int32 CVar_RepGraph_DynamicSpatialFrequency_ForceMaxFreq = 0;
static FAutoConsoleVariableRef CVarRepGraphDynamicSpatialFrequencyForceMaxFreq(TEXT("Net.RepGraph.DynamicSpatialFrequency.ForceMaxFreq"), CVar_RepGraph_DynamicSpatialFrequency_ForceMaxFreq, TEXT("Forces DSF to set max frame replication periods on all actors (1 frame rep periods). 1 = default replication. 2 = fast path. 3 = Both (effectively, default)"), ECVF_Default);
FORCEINLINE uint32 CalcDynamicReplicationPeriod(const float FinalPCT, const uint32 MinRepPeriod, const uint32 MaxRepPeriod, uint16& OutReplicationPeriodFrame, uint32& OutNextReplicationFrame, const uint32 LastRepFrameNum, const uint32 FrameNum, bool ForFastPath)
{
const float PeriodRange = (float)(MaxRepPeriod - MinRepPeriod);
const uint32 ExtraPeriod = (uint32)FMath::CeilToInt(PeriodRange * FinalPCT);
const uint32 FinalPeriod = MinRepPeriod + ExtraPeriod;
OutReplicationPeriodFrame = (uint16)FMath::Clamp<uint32>(FinalPeriod, 1, MAX_uint16);
const uint32 NextRepFrameNum = LastRepFrameNum + OutReplicationPeriodFrame;
OutNextReplicationFrame = NextRepFrameNum;
#if !(UE_BUILD_SHIPPING)
ensureMsgf(OutReplicationPeriodFrame == FinalPeriod, TEXT("Overflow error when FinalPeriod(%u) was assigned to OutReplicationPeriodFrame(%u). RepPeriod values are probably too big"), FinalPeriod, OutReplicationPeriodFrame);
if (CVar_RepGraph_DynamicSpatialFrequency_ForceMaxFreq > 0)
{
if ((CVar_RepGraph_DynamicSpatialFrequency_ForceMaxFreq == 1 && ForFastPath == 0) ||
(CVar_RepGraph_DynamicSpatialFrequency_ForceMaxFreq == 2 && ForFastPath == 1) ||
CVar_RepGraph_DynamicSpatialFrequency_ForceMaxFreq == 3
)
{
OutReplicationPeriodFrame = 1;
OutNextReplicationFrame = FrameNum;
}
}
#endif
return ExtraPeriod;
}
static TArray<FColor> DynamicSpatialFrequencyDebugColorArray = { FColor::Red, FColor::Green, FColor::Blue, FColor::Cyan, FColor::Orange, FColor::Purple };
void UReplicationGraphNode_DynamicSpatialFrequency::CalcFrequencyForActor(AActor* Actor, UReplicationGraph* RepGraph, UNetConnection* NetConnection, FGlobalActorReplicationInfo& GlobalInfo, FConnectionReplicationActorInfo& ConnectionInfo, FSettings& MySettings, const FNetViewerArray& Viewers, const uint32 FrameNum, int32 ExistingItemIndex)
{
for (UNetReplicationGraphConnection* ConnectionManager : RepGraph->Connections)
{
if (ConnectionManager->NetConnection == NetConnection)
{
CalcFrequencyForActor(Actor, RepGraph, NetConnection, GlobalInfo, ConnectionManager->ActorInfoMap, MySettings, Viewers, FrameNum, ExistingItemIndex);
return;
}
}
}
void UReplicationGraphNode_DynamicSpatialFrequency::CalcFrequencyForActor(AActor* Actor, UReplicationGraph* RepGraph, UNetConnection* NetConnection, FGlobalActorReplicationInfo& GlobalInfo, FPerConnectionActorInfoMap& ConnectionMap, FSettings& MySettings, const FNetViewerArray& Viewers, const uint32 FrameNum, int32 ExistingItemIndex)
{
#if WITH_SERVER_CODE
FConnectionReplicationActorInfo& ConnectionInfo = ConnectionMap.FindOrAdd(Actor);
// If we need to filter out the actor and he is already in the SortedReplicationList, we need to remove it (instead of just skipping/returning).
auto RemoveExistingItem = [&ExistingItemIndex, this]()
{
if (ExistingItemIndex != INDEX_NONE)
{
SortedReplicationList.RemoveAtSwap(ExistingItemIndex, 1, false);
}
};
// When adding we either create a new item or reconstruct an item at the existing index
auto AddOrUpdateItem = [&ExistingItemIndex, &RepGraph, &FrameNum, &NetConnection, this](AActor* InActor, int32 InFramesTillReplicate, bool InEnableFastPath, FGlobalActorReplicationInfo* InGlobal, FConnectionReplicationActorInfo* InConnection)
{
// Update actor close frame number here in case the actor gets skipped in the replication loop
RepGraph->UpdateActorChannelCloseFrameNum(InActor, *InConnection, *InGlobal, FrameNum, NetConnection);
FDynamicSpatialFrequency_SortedItem* Item = ExistingItemIndex == INDEX_NONE ? &SortedReplicationList[SortedReplicationList.AddUninitialized()] : &SortedReplicationList[ExistingItemIndex];
new (Item) FDynamicSpatialFrequency_SortedItem(InActor, InFramesTillReplicate, InEnableFastPath, InGlobal, InConnection);
};
// ------------------------------------------------------------------------------------------
if (RepGraphConditionalActorBreakpoint(Actor, NetConnection))
{
UE_LOG(LogReplicationGraph, Display, TEXT("UReplicationGraphNode_DynamicSpatialFrequency::CalcFrequencyForActor: %s"), *Actor->GetName());
}
if (ConnectionInfo.bDormantOnConnection)
{
RemoveExistingItem();
return;
}
float SmallestDistanceToActorSq = TNumericLimits<float>::Max();
const FNetViewer* LowestDistanceViewer = nullptr;
// Find the closest viewer to this item or the first viewer if there are no viewers closer.
for (const FNetViewer& CurViewer : Viewers)
{
float CurDistance = (GlobalInfo.WorldLocation - CurViewer.ViewLocation).SizeSquared();
if (LowestDistanceViewer == nullptr || CurDistance < SmallestDistanceToActorSq)
{
LowestDistanceViewer = &CurViewer;
SmallestDistanceToActorSq = CurDistance;
}
}
check(LowestDistanceViewer != nullptr);
UE_LOG(LogReplicationGraph, VeryVerbose, TEXT("UReplicationGraphNode_DynamicSpatialFrequency::CalcFrequencyForActor: Using viewer %s for spatical determination for actor %s"), ((LowestDistanceViewer->Connection != nullptr) ? *LowestDistanceViewer->Connection->GetName() : TEXT("INVALID")), *Actor->GetName());
// Skip if past cull distance
if (!IgnoreCullDistance && ConnectionInfo.GetCullDistanceSquared() > 0.f && SmallestDistanceToActorSq > ConnectionInfo.GetCullDistanceSquared())
{
RemoveExistingItem();
return;
}
// --------------------------------------------------------------------------------------------------------
// Find Zone
// --------------------------------------------------------------------------------------------------------
const FVector& ConnectionViewDir = LowestDistanceViewer->ViewDir;
const FVector DirToActor = (GlobalInfo.WorldLocation - LowestDistanceViewer->ViewLocation);
const float DistanceToActor = FMath::Sqrt(SmallestDistanceToActorSq);
const FVector NormDirToActor = DistanceToActor > SMALL_NUMBER ? (DirToActor / DistanceToActor) : DirToActor;
const float DotP = FMath::Clamp(FVector::DotProduct(NormDirToActor, ConnectionViewDir), -1.0f, 1.0f);
const bool ActorSupportsFastShared = (GlobalInfo.Settings.FastSharedReplicationFunc != nullptr);
TArrayView<FSpatializationZone>& ZoneList = ActorSupportsFastShared ? MySettings.ZoneSettings : MySettings.ZoneSettings_NonFastSharedActors;
for (int32 ZoneIdx=0; ZoneIdx < ZoneList.Num(); ++ZoneIdx)
{
FSpatializationZone& ZoneInfo = ZoneList[ZoneIdx];
if (DotP <= ZoneInfo.MinDotProduct)
{
int32 FramesTillReplicate;
bool EnableFastPath = false;
// --------------------------------------------------------------------------------------------------------
// Calc FrameTillReplicate
// --------------------------------------------------------------------------------------------------------
{
// Calc Percentage of distance relative to cull distance, scaled to ZoneInfo Min/Max pct
const float CullDistSq = ConnectionInfo.GetCullDistanceSquared() > 0.f ? ConnectionInfo.GetCullDistanceSquared() : GlobalInfo.Settings.GetCullDistanceSquared(); // Use global settings if the connection specific setting is zero'd out
if (CullDistSq <= 0.f)
{
// This actor really should not be in this node
UE_LOG(LogReplicationGraph, Warning, TEXT("UReplicationGraphNode_DynamicSpatialFrequency::GatherActors: %s has cull distance of 0 (connection %f | global %f). Removing from node"),
*GetPathNameSafe(Actor), ConnectionInfo.GetCullDistanceSquared(), GlobalInfo.Settings.GetCullDistanceSquared());
RemoveExistingItem();
return;
}
const float CullDist = ConnectionInfo.GetCullDistance();
const float DistPct = DistanceToActor / CullDist;
const float BiasDistPct = DistPct - ZoneInfo.MinDistPct;
const float FinalPCT = FMath::Clamp<float>( BiasDistPct / (ZoneInfo.MaxDistPct - ZoneInfo.MinDistPct), 0.f, 1.f);
// Calc Replication period for Normal replication
CalcDynamicReplicationPeriod(FinalPCT, ZoneInfo.MinRepPeriod, ZoneInfo.MaxRepPeriod, ConnectionInfo.ReplicationPeriodFrame, ConnectionInfo.NextReplicationFrameNum, ConnectionInfo.LastRepFrameNum, FrameNum, false);
FramesTillReplicate = (int32)ConnectionInfo.NextReplicationFrameNum - (int32)FrameNum;
// Update actor timeout frame here in case we get starved and can't actually replicate before then
ConnectionInfo.ActorChannelCloseFrameNum = FMath::Max<uint32>(ConnectionInfo.ActorChannelCloseFrameNum, ConnectionInfo.NextReplicationFrameNum + 1);
const FGlobalActorReplicationInfo::FDependantListType& DependentActorList = GlobalInfo.GetDependentActorList();
for (AActor* DependentActor : DependentActorList)
{
FConnectionReplicationActorInfo& DependentActorConnectionInfo = ConnectionMap.FindOrAdd(DependentActor);
DependentActorConnectionInfo.ActorChannelCloseFrameNum = FMath::Max<uint32>(ConnectionInfo.ActorChannelCloseFrameNum, ConnectionInfo.NextReplicationFrameNum + 1);
}
// Calc Replication Period for FastShared replication
if (ActorSupportsFastShared && ZoneInfo.FastPath_MinRepPeriod > 0)
{
CalcDynamicReplicationPeriod(FinalPCT, ZoneInfo.FastPath_MinRepPeriod, ZoneInfo.FastPath_MaxRepPeriod, ConnectionInfo.FastPath_ReplicationPeriodFrame, ConnectionInfo.FastPath_NextReplicationFrameNum, ConnectionInfo.FastPath_LastRepFrameNum, FrameNum, true);
FramesTillReplicate = FMath::Min<int32>(FramesTillReplicate, (int32)ConnectionInfo.FastPath_NextReplicationFrameNum - (int32)FrameNum);
EnableFastPath = true;
}
#if ENABLE_DRAW_DEBUG
if (CVar_RepGraph_DynamicSpatialFrequency_Draw > 0 )
{
//CVar_RepGraph_DynamicSpatialFrequency_Draw = 0;
static float DebugTextDuration = -1.f;
ForEachClientPIEWorld([&](UWorld *ClientWorld)
{
FlushPersistentDebugLines(ClientWorld);
FlushDebugStrings(ClientWorld);
//FString DebugStringFull = FString::Printf(TEXT("DistanceToActor: %.2f. DistPct: %.2f. FinalPCT: %.2f. ExtraPeriod: %d. FramesTillNextReplicate: %d"), DistanceToActor, DistPct, FinalPCT, ExtraPeriod, FramesTillNextReplicate);
FString DebugString = FString::Printf(TEXT("%.2f %.2f %d %d"), DistPct, FinalPCT, ConnectionInfo.ReplicationPeriodFrame, ConnectionInfo.FastPath_ReplicationPeriodFrame);
DrawDebugString(ClientWorld, GlobalInfo.WorldLocation + FVector(0.f, 0.f, 50.f), DebugString, nullptr, DynamicSpatialFrequencyDebugColorArray[ZoneIdx % DynamicSpatialFrequencyDebugColorArray.Num()], DebugTextDuration, true);
});
}
#endif
}
// --------------------------------------------------------------------------------------------------------
// We now know when this actor should replicate next. We either need to add or remove the item from the sorted list.
// We also may need to do some tracking for replicate this frame vs next (for Opportunistic LoadBalance)
// --------------------------------------------------------------------------------------------------------
if (FramesTillReplicate < 0)
{
// This actor is ready to go (or overdue). Add him to the replication list that we will sort
AddOrUpdateItem(Actor, FramesTillReplicate, EnableFastPath, &GlobalInfo, &ConnectionInfo);
}
else if (FramesTillReplicate == 0)
{
// This actor is also ready to go but we may need to count him as a 'replicates this frame and not every frame' actor
if (ReplicatesEveryFrame(ConnectionInfo, EnableFastPath) == false)
{
//UE_LOG(LogReplicationGraph, Display, TEXT(" THIS[%d]: %s. Def: %d (%d) Fast: %d (%d)"), FrameNum, *Actor->GetName(), ConnectionInfo.NextReplicationFrameNum, ConnectionInfo.ReplicationPeriodFrame, ConnectionInfo.FastPath_NextReplicationFrameNum, ConnectionInfo.FastPath_ReplicationPeriodFrame);
NumExpectedReplicationsThisFrame++; // Replicating this frame but not an 'every frame' actor
}
AddOrUpdateItem(Actor, FramesTillReplicate, EnableFastPath, &GlobalInfo, &ConnectionInfo);
}
else if (FramesTillReplicate == 1)
{
// This actors is not ready to replicate, but wants to replicate next frame.
if (ReplicatesEveryFrame(ConnectionInfo, EnableFastPath) == false)
{
NumExpectedReplicationsNextFrame++; // "Not every frame" actor that expects to replicate next frame
//UE_LOG(LogReplicationGraph, Display, TEXT(" NEXT[%d]: %s. Def: %d (%d) Fast: %d (%d)"), FrameNum, *Actor->GetName(), ConnectionInfo.NextReplicationFrameNum, ConnectionInfo.ReplicationPeriodFrame, ConnectionInfo.FastPath_NextReplicationFrameNum, ConnectionInfo.FastPath_ReplicationPeriodFrame);
}
RemoveExistingItem();
}
else
{
// More than 1 frame away from replicating. Just remove it.
RemoveExistingItem();
}
// This actor has been fully processed
return;
}
}
// No zone was found. This is bad
UE_LOG(LogReplicationGraph, Warning, TEXT("UReplicationGraphNode_DynamicSpatialFrequency::CalcFrequencyForActor: %s was not placed in any valid zone. Viewer: %s DotP: %.2f "), *Actor->GetName(), ((LowestDistanceViewer->Connection != nullptr) ? *LowestDistanceViewer->Connection->GetName() : TEXT("INVALID")), DotP);
RemoveExistingItem();
#endif // WITH_SERVER_CODE
}
void UReplicationGraphNode_DynamicSpatialFrequency::GatherActors(const FActorRepListRefView& RepList, FGlobalActorReplicationInfoMap& GlobalMap, FPerConnectionActorInfoMap& ConnectionMap, const FConnectionGatherActorListParameters& Params, UNetConnection* NetConnection)
{
UReplicationGraph* RepGraph = GraphGlobals->ReplicationGraph;
FSettings& MySettings = GetSettings();
const uint32 FrameNum = Params.ReplicationFrameNum;
const bool bReplay = NetConnection->IsReplay();
for (AActor* Actor : RepList)
{
if (!bReplay)
{
bool bShouldSkipActor = false;
// Don't replicate the connection view target like this. It will be done through a connection specific node
for (const FNetViewer& CurViewer : Params.Viewers)
{
if (UNLIKELY(Actor == CurViewer.ViewTarget))
{
bShouldSkipActor = true;
break;
}
}
if (bShouldSkipActor)
{
continue;
}
}
FGlobalActorReplicationInfo& GlobalInfo = GlobalMap.Get(Actor);
CalcFrequencyForActor(Actor, RepGraph, NetConnection, GlobalInfo, ConnectionMap, MySettings, Params.Viewers, FrameNum, INDEX_NONE);
}
}
void UReplicationGraphNode_DynamicSpatialFrequency::GatherActors_DistanceOnly(const FActorRepListRefView& RepList, FGlobalActorReplicationInfoMap& GlobalMap, FPerConnectionActorInfoMap& ConnectionMap, const FConnectionGatherActorListParameters& Params)
{
FGlobalActorReplicationInfoMap* GlobalActorReplicationInfoMap = GraphGlobals->GlobalActorReplicationInfoMap;
for (AActor* Actor : RepList)
{
FGlobalActorReplicationInfo& GlobalInfo = GlobalMap.Get(Actor);
float ShortestDistanceToActorSq = TNumericLimits<float>::Max();
bool bShouldSkipActor = false;
// Don't replicate the connection view target like this. It will be done through a connection specific node
for (const FNetViewer& CurViewer : Params.Viewers)
{
if (UNLIKELY(Actor == CurViewer.ViewTarget))
{
bShouldSkipActor = true;
break;
}
ShortestDistanceToActorSq = FMath::Min<float>((GlobalInfo.WorldLocation - CurViewer.ViewLocation).SizeSquared(), ShortestDistanceToActorSq);
}
if (bShouldSkipActor)
{
continue;
}
SortedReplicationList.Emplace(Actor, (int32)ShortestDistanceToActorSq, &GlobalInfo);
}
}
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
// --------------------------------------------------------------------------------------------------------------------------------------------
// Default value is to disable the frame-based obsolete condition
uint32 UReplicationGraphNode_ConnectionDormancyNode::NumFramesUntilObsolete = 0;
void UReplicationGraphNode_ConnectionDormancyNode::SetNumFramesUntilObsolete(uint32 InNumFrames)
{
UE_LOG(LogReplicationGraph, Log, TEXT("SetNumFramesUntilObsolete setting is now %u"), InNumFrames);
NumFramesUntilObsolete = InNumFrames;
}
void UReplicationGraphNode_ConnectionDormancyNode::TearDown()
{
Super::TearDown();
RemovedStreamingLevelActorListCollection.TearDown();
}
void UReplicationGraphNode_ConnectionDormancyNode::GatherActorListsForConnection(const FConnectionGatherActorListParameters& Params)
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 WITH_SERVER_CODE
RG_QUICK_SCOPE_CYCLE_COUNTER(RepGraphNode_ConnectionDormancy_Gather);
LastGatheredFrame = Params.ReplicationFrameNum;
ConditionalGatherDormantActorsForConnection(ReplicationActorList, Params, 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
for (int32 idx=StreamingLevelCollection.StreamingLevelLists.Num()-1; idx>=0; --idx)
{
FStreamingLevelActorListCollection::FStreamingLevelActors& StreamingList = StreamingLevelCollection.StreamingLevelLists[idx];
if (StreamingList.ReplicationActorList.Num() <= 0)
{
StreamingLevelCollection.StreamingLevelLists.RemoveAtSwap(idx, 1, false);
continue;
}
if (Params.CheckClientVisibilityForLevel(StreamingList.StreamingLevelName))
{
FStreamingLevelActorListCollection::FStreamingLevelActors* RemoveList = RemovedStreamingLevelActorListCollection.StreamingLevelLists.FindByKey(StreamingList.StreamingLevelName);
if (!RemoveList)
{
RemoveList = &RemovedStreamingLevelActorListCollection.StreamingLevelLists.Emplace_GetRef(StreamingList.StreamingLevelName);
Params.ConnectionManager.OnClientVisibleLevelNameAddMap.FindOrAdd(StreamingList.StreamingLevelName).AddUObject(this, &UReplicationGraphNode_ConnectionDormancyNode::OnClientVisibleLevelNameAdd);
}
ConditionalGatherDormantActorsForConnection(StreamingList.ReplicationActorList, Params, &RemoveList->ReplicationActorList);
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
}
else
{
UE_LOG(LogReplicationGraph, Verbose, TEXT("Level Not Loaded %s. (Client has %d levels loaded)"), *StreamingList.StreamingLevelName.ToString(), Params.ClientVisibleLevelNamesRef.Num());
}
}
#endif // WITH_SERVER_CODE
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 UReplicationGraphNode_ConnectionDormancyNode::ConditionalGatherDormantActorsForConnection(FActorRepListRefView& ConnectionList, 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
{
#if WITH_SERVER_CODE
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
FPerConnectionActorInfoMap& ConnectionActorInfoMap = Params.ConnectionManager.ActorInfoMap;
FGlobalActorReplicationInfoMap* GlobalActorReplicationInfoMap = GraphGlobals->GlobalActorReplicationInfoMap;
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
// We can trickle if the TrickelStartCounter is 0. (Just trying to give it a few frames to settle)
bool bShouldTrickle = TrickleStartCounter == 0;
for (int32 idx = ConnectionList.Num()-1; idx >= 0; --idx)
{
FActorRepListType Actor = ConnectionList[idx];
FConnectionReplicationActorInfo& ConnectionActorInfo = ConnectionActorInfoMap.FindOrAdd(Actor);
if (ConnectionActorInfo.bDormantOnConnection)
{
// If we trickled this actor, restore CullDistance to the default
if (ConnectionActorInfo.GetCullDistanceSquared() <= 0.f)
{
FGlobalActorReplicationInfo& GlobalInfo = GlobalActorReplicationInfoMap->Get(Actor);
ConnectionActorInfo.SetCullDistanceSquared(GlobalInfo.Settings.GetCullDistanceSquared());
}
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
// He can be removed
ConnectionList.RemoveAtSwap(idx);
if (RemovedList)
{
RemovedList->Add(Actor);
}
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
UE_CLOG(CVar_RepGraph_LogNetDormancyDetails > 0, LogReplicationGraph, Display, TEXT("GRAPH_DORMANCY: Actor %s is Dormant on %s. Removing from list. (%d elements left)"), *Actor->GetPathName(), *GetName(), ConnectionList.Num());
bShouldTrickle = false; // Dont trickle this frame because we are still encountering dormant actors
}
else if (CVar_RepGraph_TrickleDistCullOnDormancyNodes > 0 && bShouldTrickle)
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
{
ConnectionActorInfo.SetCullDistanceSquared(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
bShouldTrickle = false; // trickle one actor per frame
}
}
if (ConnectionList.Num() > 0)
{
Params.OutGatheredReplicationLists.AddReplicationActorList(ConnectionList);
if (TrickleStartCounter > 0)
{
TrickleStartCounter--;
}
}
#endif // WITH_SERVER_CODE
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 ContainsReverse(const FActorRepListRefView& List, FActorRepListType Actor)
{
for (int32 idx=List.Num()-1; idx >= 0; --idx)
{
if (List[idx] == Actor)
{
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
return true;
}
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
}
return false;
}
void UReplicationGraphNode_ConnectionDormancyNode::NotifyActorDormancyFlush(FActorRepListType Actor)
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
{
QUICK_SCOPE_CYCLE_COUNTER(ConnectionDormancyNode_NotifyActorDormancyFlush);
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
FNewReplicatedActorInfo ActorInfo(Actor);
// Dormancy is flushed so we need to make sure this actor is on this connection specific node.
// Guard against dupes in the list. Sometimes actors flush multiple times in a row or back to back frames.
//
// It may be better to track last flush frame on GlobalActorRepInfo?
if (ActorInfo.StreamingLevelName == NAME_None)
{
if (!ContainsReverse(ReplicationActorList, Actor))
{
ReplicationActorList.Add(ActorInfo.Actor);
}
}
else
{
FStreamingLevelActorListCollection::FStreamingLevelActors* Item = StreamingLevelCollection.StreamingLevelLists.FindByKey(ActorInfo.StreamingLevelName);
if (!Item)
{
Item = &StreamingLevelCollection.StreamingLevelLists.Emplace_GetRef(ActorInfo.StreamingLevelName);
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
Item->ReplicationActorList.Add(ActorInfo.Actor);
}
else if(!ContainsReverse(Item->ReplicationActorList, Actor))
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
{
Item->ReplicationActorList.Add(ActorInfo.Actor);
}
// Remove from RemoveList
FStreamingLevelActorListCollection::FStreamingLevelActors* RemoveList = RemovedStreamingLevelActorListCollection.StreamingLevelLists.FindByKey(ActorInfo.StreamingLevelName);
if (RemoveList)
{
RemoveList->ReplicationActorList.RemoveFast(Actor);
}
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 UReplicationGraphNode_ConnectionDormancyNode::OnClientVisibleLevelNameAdd(FName LevelName, UWorld* World)
{
FStreamingLevelActorListCollection::FStreamingLevelActors* RemoveList = RemovedStreamingLevelActorListCollection.StreamingLevelLists.FindByKey(LevelName);
if (!RemoveList)
{
UE_LOG(LogReplicationGraph, Warning, TEXT(":OnClientVisibleLevelNameAdd called on %s but there is no RemoveList. How did this get bound in the first place?. Level: %s"), *GetPathName(), *LevelName.ToString());
return;
}
FStreamingLevelActorListCollection::FStreamingLevelActors* AddList = StreamingLevelCollection.StreamingLevelLists.FindByKey(LevelName);
if (!AddList)
{
AddList = &StreamingLevelCollection.StreamingLevelLists.Emplace_GetRef(LevelName);
}
UE_CLOG(CVar_RepGraph_LogNetDormancyDetails, LogReplicationGraph, Display, TEXT("::OnClientVisibleLevelNameadd %s. LevelName: %s."), *GetPathName(), *LevelName.ToString());
UE_CLOG(CVar_RepGraph_LogNetDormancyDetails, LogReplicationGraph, Display, TEXT(" CurrentAddList: %s"), *AddList->ReplicationActorList.BuildDebugString());
UE_CLOG(CVar_RepGraph_LogNetDormancyDetails, LogReplicationGraph, Display, TEXT(" RemoveList: %s"), *RemoveList->ReplicationActorList.BuildDebugString());
AddList->ReplicationActorList.AppendContentsFrom(RemoveList->ReplicationActorList);
RemoveList->ReplicationActorList.Reset();
}
bool UReplicationGraphNode_ConnectionDormancyNode::NotifyRemoveNetworkActor(const FNewReplicatedActorInfo& ActorInfo, bool WarnIfNotFound)
{
QUICK_SCOPE_CYCLE_COUNTER(ConnectionDormancyNode_NotifyRemoveNetworkActor);
// Remove from active list by calling super
if (Super::RemoveNetworkActorFast(ActorInfo))
{
return true;
}
// Not found in active list. We must check out RemovedActorList
return RemovedStreamingLevelActorListCollection.RemoveActorFast(ActorInfo, this);
}
void UReplicationGraphNode_ConnectionDormancyNode::NotifyResetAllNetworkActors()
{
Super::NotifyResetAllNetworkActors();
RemovedStreamingLevelActorListCollection.Reset();
}
bool UReplicationGraphNode_ConnectionDormancyNode::IsNodeObsolete(uint32 CurrentFrame) const
{
// Test if the connection tied to this node has been destroyed
const bool bIsConnectionDestroyed = ConnectionOwner.ResolveObjectPtr() == nullptr;
// Test if the connection has gathered the node recently.
// After some time we can consider the client to be far enough from the node location for the node to be obsolete.
const bool bHasBeenGatheredRecently = (NumFramesUntilObsolete == 0) || (CurrentFrame - LastGatheredFrame) <= NumFramesUntilObsolete;
return bIsConnectionDestroyed || !bHasBeenGatheredRecently;
}
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 UReplicationGraphNode_DormancyNode::MaxZForConnection = WORLD_MAX;
void UReplicationGraphNode_DormancyNode::CallFunctionOnValidConnectionNodes(FConnectionDormancyNodeFunction Function)
{
enum class ObsoleteNodeBehavior
{
AlwaysValid = 0, // Keep calling functions on obsolete nodes (default behavior)
Destroy = 1, // Destroy the nodes immediately (one time cpu hit)
};
const ObsoleteNodeBehavior CurrentObsoleteNodeBehavior = (ObsoleteNodeBehavior)CVar_RepGraph_DormancyNode_ObsoleteBehavior;
const uint32 CurrentFrame = GraphGlobals->ReplicationGraph->GetReplicationGraphFrame();
RG_QUICK_SCOPE_CYCLE_COUNTER(UReplicationGraphNode_DormancyNode_ConnectionLoop);
for (FConnectionDormancyNodeMap::TIterator It = ConnectionNodes.CreateIterator(); It; ++It)
{
UReplicationGraphNode_ConnectionDormancyNode* ConnectionNode = It.Value();
const bool bIsNodeObsolete = (CurrentObsoleteNodeBehavior != ObsoleteNodeBehavior::AlwaysValid) && ConnectionNode->IsNodeObsolete(CurrentFrame);
if (!bIsNodeObsolete)
{
Function(ConnectionNode);
}
else if (bIsNodeObsolete && CurrentObsoleteNodeBehavior == ObsoleteNodeBehavior::Destroy)
{
RG_QUICK_SCOPE_CYCLE_COUNTER(RepGraphNode_Dormancy_DestroyObsoleteConnectionNode);
bool bWasRemoved = RemoveChildNode(ConnectionNode, UReplicationGraphNode::NodeOrdering::IgnoreOrdering);
ensureMsgf(bWasRemoved, TEXT("DormancyNode did not find %s in it's child node."), *ConnectionNode->GetName());
It.RemoveCurrent();
}
}
}
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 UReplicationGraphNode_DormancyNode::NotifyResetAllNetworkActors()
{
if (GraphGlobals.IsValid())
{
// Unregister dormancy callbacks first
for (FActorRepListType& Actor : ReplicationActorList)
{
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
FGlobalActorReplicationInfo& GlobalInfo = GraphGlobals->GlobalActorReplicationInfoMap->Get(Actor);
GlobalInfo.Events.DormancyFlush.RemoveAll(this);
}
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
}
// Dump our global actor list
Super::NotifyResetAllNetworkActors();
auto ResetAllActorsFunction = [](UReplicationGraphNode_ConnectionDormancyNode* ConnectionNode)
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
{
ConnectionNode->NotifyResetAllNetworkActors();
};
CallFunctionOnValidConnectionNodes(ResetAllActorsFunction);
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 UReplicationGraphNode_DormancyNode::AddDormantActor(const FNewReplicatedActorInfo& ActorInfo, FGlobalActorReplicationInfo& GlobalInfo)
{
QUICK_SCOPE_CYCLE_COUNTER(DormancyNode_AddDormantActor);
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
Super::NotifyAddNetworkActor(ActorInfo);
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
UE_CLOG(CVar_RepGraph_LogNetDormancyDetails > 0 && ConnectionNodes.Num() > 0, LogReplicationGraph, Display, TEXT("GRAPH_DORMANCY: AddDormantActor %s on %s. Adding to %d connection nodes."), *ActorInfo.Actor->GetPathName(), *GetName(), ConnectionNodes.Num());
auto AddActorFunction = [ActorInfo](UReplicationGraphNode_ConnectionDormancyNode* ConnectionNode)
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
{
QUICK_SCOPE_CYCLE_COUNTER(ConnectionDormancyNode_NotifyAddNetworkActor);
ConnectionNode->NotifyAddNetworkActor(ActorInfo);
};
CallFunctionOnValidConnectionNodes(AddActorFunction);
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
// Tell us if this guy flushes net dormancy so we force him back on connection lists
if (!GlobalInfo.Events.DormancyFlush.IsBoundToObject(this))
{
GlobalInfo.Events.DormancyFlush.AddUObject(this, &UReplicationGraphNode_DormancyNode::OnActorDormancyFlush);
}
else
{
UE_LOG(LogReplicationGraph, Warning, TEXT("UReplicationGraphNode_DormancyNode already bound to dormancyflush for Actor %s"), *GetPathNameSafe(ActorInfo.GetActor()));
}
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 UReplicationGraphNode_DormancyNode::RemoveDormantActor(const FNewReplicatedActorInfo& ActorInfo, FGlobalActorReplicationInfo& ActorRepInfo)
{
QUICK_SCOPE_CYCLE_COUNTER(DormancyNode_RemoveDormantActor);
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
UE_CLOG(CVar_RepGraph_LogActorRemove>0, LogReplicationGraph, Display, TEXT("UReplicationGraphNode_DormancyNode::RemoveDormantActor %s on %s. (%d connection nodes). ChildNodes: %d"), *GetNameSafe(ActorInfo.Actor), *GetPathName(), ConnectionNodes.Num(), AllChildNodes.Num());
Super::RemoveNetworkActorFast(ActorInfo);
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
ActorRepInfo.Events.DormancyFlush.RemoveAll(this);
auto RemoveActorFunction = [ActorInfo](UReplicationGraphNode_ConnectionDormancyNode* ConnectionNode)
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
{
// Don't warn if not found, the node may have removed the actor itself. Not worth the extra bookkeeping to skip the call.
ConnectionNode->NotifyRemoveNetworkActor(ActorInfo, false);
};
CallFunctionOnValidConnectionNodes(RemoveActorFunction);
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 UReplicationGraphNode_DormancyNode::GatherActorListsForConnection(const FConnectionGatherActorListParameters& Params)
{
#if WITH_SERVER_CODE
int32 NumViewersAboveMaxZ = 0;
for (const FNetViewer& CurViewer : Params.Viewers)
{
if (CurViewer.ViewLocation.Z > MaxZForConnection)
{
++NumViewersAboveMaxZ;
}
}
// If we're above max on all viewers, don't gather actors.
if (Params.Viewers.Num() <= NumViewersAboveMaxZ)
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
{
return;
}
UReplicationGraphNode_ConnectionDormancyNode* ConnectionNode = GetExistingConnectionNode(Params);
if( ConnectionNode )
{
ConnectionNode->GatherActorListsForConnection(Params);
}
else
{
QUICK_SCOPE_CYCLE_COUNTER(RepGraphNode_ConnectionDormancy_NewNodeFirstGather);
ConnectionNode = CreateConnectionNode(Params);
ConnectionNode->GatherActorListsForConnection(Params);
}
#endif // WITH_SERVER_CODE
}
UReplicationGraphNode_ConnectionDormancyNode* UReplicationGraphNode_DormancyNode::GetExistingConnectionNode(const FConnectionGatherActorListParameters& Params)
{
UReplicationGraphNode_ConnectionDormancyNode** ConnectionNodeItem = ConnectionNodes.Find(FRepGraphConnectionKey(&Params.ConnectionManager));
return ConnectionNodeItem == nullptr ? nullptr : *ConnectionNodeItem;
}
UReplicationGraphNode_ConnectionDormancyNode* UReplicationGraphNode_DormancyNode::GetConnectionNode(const FConnectionGatherActorListParameters& Params)
{
UReplicationGraphNode_ConnectionDormancyNode* ConnectionNode = GetExistingConnectionNode(Params);
if (ConnectionNode == 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
{
ConnectionNode = CreateConnectionNode(Params);
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
}
return ConnectionNode;
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
}
UReplicationGraphNode_ConnectionDormancyNode* UReplicationGraphNode_DormancyNode::CreateConnectionNode(const FConnectionGatherActorListParameters& Params)
{
RG_QUICK_SCOPE_CYCLE_COUNTER(RepGraphNode_Dormancy_Create_ConnectionNode);
FRepGraphConnectionKey RepGraphConnection(&Params.ConnectionManager);
// We do not have a per-connection node for this connection, so create one and copy over contents
UReplicationGraphNode_ConnectionDormancyNode* ConnectionNode = CreateChildNode<UReplicationGraphNode_ConnectionDormancyNode>();
ConnectionNodes.Add(RepGraphConnection) = ConnectionNode;
// Copy our master lists to the connection node
ConnectionNode->DeepCopyActorListsFrom(this);
ConnectionNode->InitConnectionNode(RepGraphConnection, Params.ReplicationFrameNum);
UE_CLOG(CVar_RepGraph_LogNetDormancyDetails > 0, LogReplicationGraph, Display, TEXT("GRAPH_DORMANCY: First time seeing connection %s in node %s. Created ConnectionDormancyNode %s."), *Params.ConnectionManager.GetName(), *GetName(), *ConnectionNode->GetName());
return ConnectionNode;
}
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 UReplicationGraphNode_DormancyNode::OnActorDormancyFlush(FActorRepListType Actor, FGlobalActorReplicationInfo& GlobalInfo)
{
QUICK_SCOPE_CYCLE_COUNTER(DormancyNode_OnActorDormancyFlush);
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 (CVar_RepGraph_Verify)
{
FNewReplicatedActorInfo ActorInfo(Actor);
if (ActorInfo.StreamingLevelName == NAME_None)
{
ensureMsgf(ReplicationActorList.Contains(Actor), TEXT("UReplicationGraphNode_DormancyNode::OnActorDormancyFlush %s not present in %s actor lists!"), *Actor->GetPathName(), *GetPathName());
}
else
{
if (FStreamingLevelActorListCollection::FStreamingLevelActors* Item = StreamingLevelCollection.StreamingLevelLists.FindByKey(ActorInfo.StreamingLevelName))
{
ensureMsgf(Item->ReplicationActorList.Contains(Actor), TEXT("UReplicationGraphNode_DormancyNode::OnActorDormancyFlush %s not present in %s actor lists! Streaming Level: %s"), *GetActorRepListTypeDebugString(Actor), *GetPathName(), *ActorInfo.StreamingLevelName.ToString());
}
}
}
// -------------------
UE_CLOG(CVar_RepGraph_LogNetDormancyDetails > 0 && ConnectionNodes.Num() > 0, LogReplicationGraph, Display, TEXT("GRAPH_DORMANCY: Actor %s Flushed Dormancy. %s. Refreshing all %d connection nodes."), *Actor->GetPathName(), *GetName(), ConnectionNodes.Num());
auto DormancyFlushFunction = [Actor](UReplicationGraphNode_ConnectionDormancyNode* ConnectionNode)
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
{
ConnectionNode->NotifyActorDormancyFlush(Actor);
};
CallFunctionOnValidConnectionNodes(DormancyFlushFunction);
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 UReplicationGraphNode_DormancyNode::ConditionalGatherDormantDynamicActors(FActorRepListRefView& RepList, const FConnectionGatherActorListParameters& Params, FActorRepListRefView* RemovedList, bool bEnforceReplistUniqueness /* = false */, FActorRepListRefView* RemoveFromList /* = nullptr */)
{
auto GatherDormantDynamicActorsForList = [&](const FActorRepListRefView& InReplicationActorList)
{
for (const FActorRepListType& Actor : InReplicationActorList)
{
if (Actor && !Actor->IsNetStartupActor())
{
if (FConnectionReplicationActorInfo* Info = Params.ConnectionManager.ActorInfoMap.Find(Actor))
{
// Need to grab the actors with valid channels here as they will be going dormant soon, but might not be quite yet
if (Info->bDormantOnConnection || Info->Channel != nullptr)
{
if (RemovedList && RemovedList->Contains(Actor))
{
continue;
}
if (RemoveFromList && RemoveFromList->RemoveFast(Actor))
{
Info->bGridSpatilization_AlreadyDormant = false;
}
// Prevent adding actors if we already have added them, this saves on grow operations.
if (bEnforceReplistUniqueness)
{
if (Info->bGridSpatilization_AlreadyDormant)
{
continue;
}
else
{
Info->bGridSpatilization_AlreadyDormant = true;
}
}
RepList.ConditionalAdd(Actor);
}
}
}
}
};
GatherDormantDynamicActorsForList(ReplicationActorList);
for (const FStreamingLevelActorListCollection::FStreamingLevelActors& StreamingList : StreamingLevelCollection.StreamingLevelLists)
{
if (Params.CheckClientVisibilityForLevel(StreamingList.StreamingLevelName))
{
GatherDormantDynamicActorsForList(StreamingList.ReplicationActorList);
}
}
}
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 UReplicationGraphNode_GridCell::AddStaticActor(const FNewReplicatedActorInfo& ActorInfo, FGlobalActorReplicationInfo& ActorRepInfo, bool bParentNodeHandlesDormancyChange)
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 (ActorRepInfo.bWantsToBeDormant)
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
{
// Pass to dormancy node
GetDormancyNode()->AddDormantActor(ActorInfo, ActorRepInfo);
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
}
else
{
// Put him in our non dormancy list
Super::NotifyAddNetworkActor(ActorInfo);
}
// We need to be told if this actor changes dormancy so we can move him between nodes. Unless our parent is going to do it.
if (!bParentNodeHandlesDormancyChange)
{
ActorRepInfo.Events.DormancyChange.AddUObject(this, &UReplicationGraphNode_GridCell::OnStaticActorNetDormancyChange);
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 UReplicationGraphNode_GridCell::AddDynamicActor(const FNewReplicatedActorInfo& ActorInfo)
{
GetDynamicNode()->NotifyAddNetworkActor(ActorInfo);
}
void UReplicationGraphNode_GridCell::RemoveStaticActor(const FNewReplicatedActorInfo& ActorInfo, FGlobalActorReplicationInfo& ActorRepInfo, bool bWasAddedAsDormantActor)
{
UE_CLOG(CVar_RepGraph_LogActorRemove>0, LogReplicationGraph, Display, TEXT("UReplicationGraphNode_Simple2DSpatializationLeaf::RemoveStaticActor %s on %s"), *ActorInfo.Actor->GetPathName(), *GetPathName());
if (bWasAddedAsDormantActor)
{
GetDormancyNode()->RemoveDormantActor(ActorInfo, ActorRepInfo);
}
else
{
Super::NotifyRemoveNetworkActor(ActorInfo);
}
ActorRepInfo.Events.DormancyChange.RemoveAll(this);
}
void UReplicationGraphNode_GridCell::RemoveDynamicActor(const FNewReplicatedActorInfo& ActorInfo)
{
UE_CLOG(CVar_RepGraph_LogActorRemove>0, LogReplicationGraph, Display, TEXT("UReplicationGraphNode_Simple2DSpatializationLeaf::RemoveDynamicActor %s on %s"), *ActorInfo.Actor->GetPathName(), *GetPathName());
GetDynamicNode()->NotifyRemoveNetworkActor(ActorInfo);
}
void UReplicationGraphNode_GridCell::ConditionalCopyDormantActors(FActorRepListRefView& FromList, UReplicationGraphNode_DormancyNode* ToNode)
{
if (GraphGlobals.IsValid())
{
for (int32 idx = FromList.Num()-1; idx >= 0; --idx)
{
FActorRepListType Actor = FromList[idx];
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
FGlobalActorReplicationInfo& GlobalInfo = GraphGlobals->GlobalActorReplicationInfoMap->Get(Actor);
if (GlobalInfo.bWantsToBeDormant)
{
ToNode->NotifyAddNetworkActor(FNewReplicatedActorInfo(Actor));
FromList.RemoveAtSwap(idx);
}
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 UReplicationGraphNode_GridCell::OnStaticActorNetDormancyChange(FActorRepListType Actor, FGlobalActorReplicationInfo& GlobalInfo, ENetDormancy NewValue, 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
{
UE_CLOG(CVar_RepGraph_LogNetDormancyDetails>0, LogReplicationGraph, Display, TEXT("UReplicationGraphNode_GridCell::OnNetDormancyChange. %s on %s. Old: %d, New: %d"), *Actor->GetPathName(), *GetPathName(), NewValue, 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
const bool bCurrentDormant = NewValue > DORM_Awake;
const bool bPreviousDormant = OldValue > DORM_Awake;
if (!bCurrentDormant && bPreviousDormant)
{
// Actor is now awake, remove from dormancy node and add to non dormancy list
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
FNewReplicatedActorInfo ActorInfo(Actor);
GetDormancyNode()->RemoveDormantActor(ActorInfo, GlobalInfo);
Super::NotifyAddNetworkActor(ActorInfo);
}
else if (bCurrentDormant && !bPreviousDormant)
{
// Actor is now dormant, remove from non dormant list, add to dormant node
FNewReplicatedActorInfo ActorInfo(Actor);
Super::NotifyRemoveNetworkActor(ActorInfo);
GetDormancyNode()->AddDormantActor(ActorInfo, GlobalInfo);
}
}
UReplicationGraphNode* UReplicationGraphNode_GridCell::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
{
if (DynamicNode == nullptr)
{
if (CreateDynamicNodeOverride)
{
DynamicNode = CreateDynamicNodeOverride(this);
}
else
{
DynamicNode = CreateChildNode<UReplicationGraphNode_ActorListFrequencyBuckets>();
}
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
}
return DynamicNode;
}
UReplicationGraphNode_DormancyNode* UReplicationGraphNode_GridCell::GetDormancyNode()
{
if (DormancyNode == nullptr)
{
DormancyNode = CreateChildNode<UReplicationGraphNode_DormancyNode>();
}
return DormancyNode;
}
void UReplicationGraphNode_GridCell::GetAllActorsInNode_Debugging(TArray<FActorRepListType>& OutArray) const
{
Super::GetAllActorsInNode_Debugging(OutArray);
if (DynamicNode)
{
DynamicNode->GetAllActorsInNode_Debugging(OutArray);
}
if (DormancyNode)
{
DormancyNode->GetAllActorsInNode_Debugging(OutArray);
}
}
int32 CVar_RepGraph_DebugNextNewActor = 0;
static FAutoConsoleVariableRef CVarRepGraphDebugNextActor(TEXT("Net.RepGraph.Spatial.DebugNextNewActor"), CVar_RepGraph_DebugNextNewActor, TEXT(""), ECVF_Default );
// -------------------------------------------------------
UReplicationGraphNode_GridSpatialization2D::UReplicationGraphNode_GridSpatialization2D()
: CellSize(0.f)
, SpatialBias(ForceInitToZero)
, GridBounds(ForceInitToZero)
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
{
bRequiresPrepareForReplicationCall = true;
bDestroyDormantDynamicActors = CVar_RepGraph_GridSpatialization2D_DestroyDormantDynamicActorsDefault != 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
}
void UReplicationGraphNode_GridSpatialization2D::Serialize(FArchive& Ar)
{
Super::Serialize(Ar);
if (Ar.IsCountingMemory())
{
GRANULAR_NETWORK_MEMORY_TRACKING_INIT(Ar, "UReplicationGraphNode_GridSpatialization2D::Serialize");
GRANULAR_NETWORK_MEMORY_TRACKING_TRACK("ClassRebuildDenyList", ClassRebuildDenyList.CountBytes(Ar));
GRANULAR_NETWORK_MEMORY_TRACKING_TRACK("DynamicSpatializedActors", DynamicSpatializedActors.CountBytes(Ar));
GRANULAR_NETWORK_MEMORY_TRACKING_TRACK("StaticSpatializedActors", StaticSpatializedActors.CountBytes(Ar));
GRANULAR_NETWORK_MEMORY_TRACKING_TRACK("PendingStaticSpatializedActors", PendingStaticSpatializedActors.CountBytes(Ar));
GRANULAR_NETWORK_MEMORY_TRACKING_TRACK("Grid", Grid.CountBytes(Ar));
GRANULAR_NETWORK_MEMORY_TRACKING_TRACK("GatheredNodes", GatheredNodes.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
void UReplicationGraphNode_GridSpatialization2D::NotifyAddNetworkActor(const FNewReplicatedActorInfo& ActorInfo)
{
ensureAlwaysMsgf(false, TEXT("UReplicationGraphNode_GridSpatialization2D::NotifyAddNetworkActor should not be called directly"));
}
bool UReplicationGraphNode_GridSpatialization2D::NotifyRemoveNetworkActor(const FNewReplicatedActorInfo& ActorInfo, bool bWarnIfNotFound)
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
{
ensureAlwaysMsgf(false, TEXT("UReplicationGraphNode_GridSpatialization2D::NotifyRemoveNetworkActor should not be called directly"));
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
}
void UReplicationGraphNode_GridSpatialization2D::AddActor_Dormancy(const FNewReplicatedActorInfo& ActorInfo, FGlobalActorReplicationInfo& ActorRepInfo)
{
UE_CLOG(CVar_RepGraph_LogActorRemove>0, LogReplicationGraph, Display, TEXT("UReplicationGraphNode_GridSpatialization2D::AddActor_Dormancy %s on %s"), *ActorInfo.Actor->GetFullName(), *GetPathName());
if (ActorRepInfo.bWantsToBeDormant)
{
AddActorInternal_Static(ActorInfo, ActorRepInfo, true);
}
else
{
AddActorInternal_Dynamic(ActorInfo);
}
// Tell us if dormancy changes for this actor because then we need to move it. Note we don't care about Flushing.
ActorRepInfo.Events.DormancyChange.AddUObject(this, &UReplicationGraphNode_GridSpatialization2D::OnNetDormancyChange);
}
void UReplicationGraphNode_GridSpatialization2D::RemoveActor_Static(const FNewReplicatedActorInfo& ActorInfo)
{
UE_CLOG(CVar_RepGraph_LogActorRemove>0, LogReplicationGraph, Display, TEXT("UReplicationGraphNode_GridSpatialization2D::RemoveActor_Static %s on %s"), *ActorInfo.Actor->GetFullName(), *GetPathName());
if (GraphGlobals.IsValid())
{
FGlobalActorReplicationInfo& GlobalInfo = GraphGlobals->GlobalActorReplicationInfoMap->Get(ActorInfo.Actor);
RemoveActorInternal_Static(ActorInfo, GlobalInfo, GlobalInfo.bWantsToBeDormant);
}
}
void UReplicationGraphNode_GridSpatialization2D::RemoveActor_Dormancy(const FNewReplicatedActorInfo& ActorInfo)
{
UE_CLOG(CVar_RepGraph_LogActorRemove>0, LogReplicationGraph, Display, TEXT("UReplicationGraphNode_GridSpatialization2D::RemoveActor_Dormancy %s on %s"), *ActorInfo.Actor->GetFullName(), *GetPathName());
if (GraphGlobals.IsValid())
{
FGlobalActorReplicationInfo& ActorRepInfo = GraphGlobals->GlobalActorReplicationInfoMap->Get(ActorInfo.Actor);
if (ActorRepInfo.bWantsToBeDormant)
{
RemoveActorInternal_Static(ActorInfo, ActorRepInfo, true);
}
else
{
RemoveActorInternal_Dynamic(ActorInfo);
}
// AddActorInternal_Static and AddActorInternal_Dynamic will both override Actor information if they are called repeatedly.
// This means that even if AddActor_Dormancy is called multiple times with the same Actor, a single call to RemoveActor_Dormancy
// will completely remove the Actor from either the Static or Dynamic list appropriately.
// Therefore, it should be safe to call RemoveAll and not worry about trying to track individual delegate handles.
ActorRepInfo.Events.DormancyChange.RemoveAll(this);
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 UReplicationGraphNode_GridSpatialization2D::AddActorInternal_Dynamic(const FNewReplicatedActorInfo& ActorInfo)
{
#if !(UE_BUILD_SHIPPING || UE_BUILD_TEST)
if (ActorInfo.Actor->bAlwaysRelevant)
{
UE_LOG(LogReplicationGraph, Warning, TEXT("Always relevant actor being added to spatialized graph node. %s"), *GetNameSafe(ActorInfo.Actor));
return;
}
#endif
UE_CLOG(CVar_RepGraph_LogActorRemove>0, LogReplicationGraph, Display, TEXT("UReplicationGraph::AddActorInternal_Dynamic %s"), *ActorInfo.Actor->GetFullName());
DynamicSpatializedActors.Emplace(ActorInfo.Actor, ActorInfo);
}
void UReplicationGraphNode_GridSpatialization2D::AddActorInternal_Static(const FNewReplicatedActorInfo& ActorInfo, FGlobalActorReplicationInfo& ActorRepInfo, bool bDormancyDriven)
{
AActor* Actor = ActorInfo.Actor;
if (Actor->IsActorInitialized() == false)
{
// Make sure its not already in the list. This should really not happen but would be very bad if it did. This list should always be small so doing the safety check seems good.
for (int32 idx=PendingStaticSpatializedActors.Num()-1; idx >= 0; --idx)
{
if (PendingStaticSpatializedActors[idx].Actor == ActorInfo.Actor)
{
UE_LOG(LogReplicationGraph, Warning, TEXT("UReplicationGraphNode_GridSpatialization2D::AddActorInternal_Static was called on %s when it was already in the PendingStaticSpatializedActors list!"), *Actor->GetPathName());
return;
}
}
PendingStaticSpatializedActors.Emplace(ActorInfo.Actor, bDormancyDriven);
return;
}
if (CVar_RepGraph_Verify)
{
ensureMsgf(PendingStaticSpatializedActors.Contains(ActorInfo.Actor) == false, TEXT("UReplicationGraphNode_GridSpatialization2D::AddActorInternal_Static was called on %s when it was already in the PendingStaticSpatializedActors list!"), *Actor->GetPathName());
}
AddActorInternal_Static_Implementation(ActorInfo, ActorRepInfo, bDormancyDriven);
}
void UReplicationGraphNode_GridSpatialization2D::AddActorInternal_Static_Implementation(const FNewReplicatedActorInfo& ActorInfo, FGlobalActorReplicationInfo& ActorRepInfo, bool bDormancyDriven)
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
{
AActor* Actor = ActorInfo.Actor;
const FVector Location3D = Actor->GetActorLocation();
ActorRepInfo.WorldLocation = Location3D;
if (CVar_RepGraph_LogActorAdd)
{
UE_LOG(LogReplicationGraph, Display, TEXT("UReplicationGraphNode_GridSpatialization2D::AddActorInternal_Static placing %s into static grid at %s"), *Actor->GetPathName(), *ActorRepInfo.WorldLocation.ToString());
}
if (WillActorLocationGrowSpatialBounds(Location3D))
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
{
HandleActorOutOfSpatialBounds(Actor, Location3D, true);
}
StaticSpatializedActors.Emplace(Actor, FCachedStaticActorInfo(ActorInfo, bDormancyDriven));
// Only put in cell right now if we aren't needing to rebuild the whole grid
if (!bNeedsRebuild)
{
PutStaticActorIntoCell(ActorInfo, ActorRepInfo, bDormancyDriven);
}
}
void UReplicationGraphNode_GridSpatialization2D::RemoveActorInternal_Dynamic(const FNewReplicatedActorInfo& ActorInfo)
{
if (FCachedDynamicActorInfo* DynamicActorInfo = DynamicSpatializedActors.Find(ActorInfo.Actor))
{
if (DynamicActorInfo->CellInfo.IsValid())
{
GetGridNodesForActor(ActorInfo.Actor, DynamicActorInfo->CellInfo, GatheredNodes);
for (UReplicationGraphNode_GridCell* Node : GatheredNodes)
{
Node->RemoveDynamicActor(ActorInfo);
}
}
DynamicSpatializedActors.Remove(ActorInfo.Actor);
}
else
{
UE_LOG(LogReplicationGraph, Warning, TEXT("UReplicationGraphNode_Simple2DSpatialization::RemoveActorInternal_Dynamic attempted remove %s from streaming dynamic list but it was not there."), *GetActorRepListTypeDebugString(ActorInfo.Actor));
if (StaticSpatializedActors.Remove(ActorInfo.Actor) > 0)
{
UE_LOG(LogReplicationGraph, Warning, TEXT(" It was in StaticSpatializedActors!"));
}
}
}
void UReplicationGraphNode_GridSpatialization2D::RemoveActorInternal_Static(const FNewReplicatedActorInfo& ActorInfo, FGlobalActorReplicationInfo& ActorRepInfo, bool bWasAddedAsDormantActor)
{
if (StaticSpatializedActors.Remove(ActorInfo.Actor) <= 0)
{
// May have been a pending actor
for (int32 idx=PendingStaticSpatializedActors.Num()-1; idx >= 0; --idx)
{
if (PendingStaticSpatializedActors[idx].Actor == ActorInfo.Actor)
{
PendingStaticSpatializedActors.RemoveAtSwap(idx, 1, false);
return;
}
}
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
UE_LOG(LogReplicationGraph, Warning, TEXT("UReplicationGraphNode_Simple2DSpatialization::RemoveActorInternal_Static attempted remove %s from static list but it was not there."), *GetActorRepListTypeDebugString(ActorInfo.Actor));
if(DynamicSpatializedActors.Remove(ActorInfo.Actor) > 0)
{
UE_LOG(LogReplicationGraph, Warning, TEXT(" It was in DynamicStreamingSpatializedActors!"));
}
}
// Remove it from the actual node it should still be in. Note that even if the actor did move in between this and the last replication frame, the FGlobalActorReplicationInfo would not have been updated
GetGridNodesForActor(ActorInfo.Actor, ActorRepInfo, GatheredNodes);
for (UReplicationGraphNode_GridCell* Node : GatheredNodes)
{
Node->RemoveStaticActor(ActorInfo, ActorRepInfo, bWasAddedAsDormantActor);
}
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 (CVar_RepGraph_Verify)
{
// Verify this actor is in no nodes. This is pretty slow!
TArray<AActor*> AllActors;
for (auto& InnerArray : Grid)
{
for (UReplicationGraphNode_GridCell* N : InnerArray)
{
if (N)
{
AllActors.Reset();
N->GetAllActorsInNode_Debugging(AllActors);
ensureMsgf(AllActors.Contains(ActorInfo.Actor) == false, TEXT("Actor still in a node after removal!. %s. Removal Location: %s"), *N->GetPathName(), *ActorRepInfo.WorldLocation.ToString());
}
}
}
}
}
void UReplicationGraphNode_GridSpatialization2D::OnNetDormancyChange(FActorRepListType Actor, FGlobalActorReplicationInfo& GlobalInfo, ENetDormancy NewValue, ENetDormancy OldValue)
{
const bool bCurrentShouldBeStatic = NewValue > DORM_Awake;
const bool bPreviousShouldBeStatic = OldValue > DORM_Awake;
if (bCurrentShouldBeStatic && !bPreviousShouldBeStatic)
{
// Actor was dynamic and is now static. Remove from dynamic list and add to static.
FNewReplicatedActorInfo ActorInfo(Actor);
RemoveActorInternal_Dynamic(ActorInfo);
AddActorInternal_Static(ActorInfo, GlobalInfo, true);
}
else if (!bCurrentShouldBeStatic && bPreviousShouldBeStatic)
{
FNewReplicatedActorInfo ActorInfo(Actor);
RemoveActorInternal_Static(ActorInfo, GlobalInfo, true); // This is why we need the 3rd bool parameter: this actor was placed as dormant (and it no longer is at the moment of this callback)
AddActorInternal_Dynamic(ActorInfo);
}
}
void UReplicationGraphNode_GridSpatialization2D::NotifyResetAllNetworkActors()
{
StaticSpatializedActors.Reset();
DynamicSpatializedActors.Reset();
PendingStaticSpatializedActors.Reset();
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
Super::NotifyResetAllNetworkActors();
}
void UReplicationGraphNode_GridSpatialization2D::PutStaticActorIntoCell(const FNewReplicatedActorInfo& ActorInfo, FGlobalActorReplicationInfo& ActorRepInfo, bool bDormancyDriven)
{
GetGridNodesForActor(ActorInfo.Actor, ActorRepInfo, GatheredNodes);
for (UReplicationGraphNode_GridCell* Node : GatheredNodes)
{
Node->AddStaticActor(ActorInfo, ActorRepInfo, bDormancyDriven);
}
}
void UReplicationGraphNode_GridSpatialization2D::GetGridNodesForActor(FActorRepListType Actor, const FGlobalActorReplicationInfo& ActorRepInfo, TArray<UReplicationGraphNode_GridCell*>& OutNodes)
{
RG_QUICK_SCOPE_CYCLE_COUNTER(UReplicationGraphNode_GridSpatialization2D_GetGridNodesForActor);
GetGridNodesForActor(Actor, GetCellInfoForActor(Actor, ActorRepInfo.WorldLocation, ActorRepInfo.Settings.GetCullDistance()), OutNodes);
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 UReplicationGraphNode_GridSpatialization2D::SetBiasAndGridBounds(const FBox& GridBox)
{
const FVector2D BoxMin2D = FVector2D(GridBox.Min);
const FVector2D BoxMax2D = FVector2D(GridBox.Max);
SpatialBias = BoxMin2D;
GridBounds = FBox( FVector(BoxMin2D, -HALF_WORLD_MAX), FVector(BoxMax2D, HALF_WORLD_MAX) );
}
UReplicationGraphNode_GridSpatialization2D::FActorCellInfo UReplicationGraphNode_GridSpatialization2D::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
{
#if !(UE_BUILD_SHIPPING || UE_BUILD_TEST)
if (CullDistance <= 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
{
UE_LOG(LogReplicationGraph, Warning, TEXT("::GetGridNodesForActor called on %s when its CullDistance = %.2f. (Must be > 0)"), *GetActorRepListTypeDebugString(Actor), 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
}
#endif
FVector ClampedLocation = Location3D;
// Sanity check the actor's location. If it's garbage, we could end up with a gigantic allocation in GetGridNodesForActor as we adjust the grid.
if (Location3D.X < -HALF_WORLD_MAX || Location3D.X > HALF_WORLD_MAX ||
Location3D.Y < -HALF_WORLD_MAX || Location3D.Y > HALF_WORLD_MAX ||
Location3D.Z < -HALF_WORLD_MAX || Location3D.Z > HALF_WORLD_MAX)
{
UE_LOG(LogReplicationGraph, Warning, TEXT("GetCellInfoForActor: Actor %s is outside world bounds with a location of %s. Clamping grid location to world bounds."), *GetFullNameSafe(Actor), *Location3D.ToString());
ClampedLocation = Location3D.BoundToCube(HALF_WORLD_MAX);
}
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
FActorCellInfo CellInfo;
const auto LocationBiasX = (ClampedLocation.X - SpatialBias.X);
const auto LocationBiasY = (ClampedLocation.Y - SpatialBias.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
const auto Dist = CullDistance;
const auto MinX = LocationBiasX - Dist;
const auto MinY = LocationBiasY - Dist;
auto MaxX = LocationBiasX + Dist;
auto MaxY = LocationBiasY + Dist;
if (GridBounds.IsValid)
{
const FVector BoundSize = GridBounds.GetSize();
MaxX = FMath::Min(MaxX, BoundSize.X);
MaxY = FMath::Min(MaxY, BoundSize.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
CellInfo.StartX = FMath::Max<int32>(0, MinX / CellSize);
CellInfo.StartY = FMath::Max<int32>(0, MinY / CellSize);
CellInfo.EndX = FMath::Max<int32>(0, MaxX / CellSize);
CellInfo.EndY = FMath::Max<int32>(0, MaxY / CellSize);
return CellInfo;
}
void UReplicationGraphNode_GridSpatialization2D::GetGridNodesForActor(FActorRepListType Actor, const UReplicationGraphNode_GridSpatialization2D::FActorCellInfo& CellInfo, TArray<UReplicationGraphNode_GridCell*>& OutNodes)
{
if (!ensure(CellInfo.IsValid()))
{
return;
}
OutNodes.Reset();
const int32 StartX = CellInfo.StartX;
const int32 StartY = CellInfo.StartY;
const int32 EndX = CellInfo.EndX;
const int32 EndY = CellInfo.EndY;
if (Grid.Num() <= EndX)
{
Grid.SetNum(EndX+1);
}
for (int32 X = StartX; X <= EndX; X++)
{
TArray<UReplicationGraphNode_GridCell*>& GridY = Grid[X];
if (GridY.Num() <= EndY)
{
GridY.SetNum(EndY+1);
}
for (int32 Y = StartY; Y <= EndY; Y++)
{
UReplicationGraphNode_GridCell* NodePtr = GetCellNode(GridY[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
OutNodes.Add(NodePtr);
}
}
/*
#if !(UE_BUILD_SHIPPING || UE_BUILD_TEST)
if (DebugActorNames.Num() > 0)
{
if (DebugActorNames.ContainsByPredicate([&](const FString DebugName) { return Actor->GetName().Contains(DebugName); }))
{
UE_LOG(LogReplicationGraph, Display, TEXT("Adding Actor %s. WorldLocation (Cached): %s. WorldLocation (AActor): %s. Buckets: %d/%d. SpatialBias: %s"), *Actor->GetName(), *ActorRepInfo.WorldLocation.ToString(), *Actor->GetActorLocation().ToString(), BucketX, BucketY, *SpatialBias.ToString());
}
}
#endif
*/
}
bool UReplicationGraphNode_GridSpatialization2D::WillActorLocationGrowSpatialBounds(const FVector& Location) const
{
// When bounds are set, we don't grow the cells but instead clamp the actor to the bounds.
return GridBounds.IsValid ? false : (SpatialBias.X > Location.X || SpatialBias.Y > Location.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
void UReplicationGraphNode_GridSpatialization2D::HandleActorOutOfSpatialBounds(AActor* Actor, const FVector& Location3D, const bool bStaticActor)
{
// Don't rebuild spatialization for denied actors. They will just get clamped to the grid.
if (ClassRebuildDenyList.Get(Actor->GetClass()) != 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
{
return;
}
const bool bOldNeedRebuild = bNeedsRebuild;
if (SpatialBias.X > Location3D.X)
{
bNeedsRebuild = true;
SpatialBias.X = Location3D.X - (CellSize / 2.f);
}
if (SpatialBias.Y > Location3D.Y)
{
bNeedsRebuild = true;
SpatialBias.Y = Location3D.Y - (CellSize / 2.f);
}
if (bNeedsRebuild && !bOldNeedRebuild)
{
UE_LOG(LogReplicationGraph, Warning, TEXT("Spatialization Rebuild caused by: %s at %s. New Bias: %s. IsStatic: %d"), *Actor->GetPathName(), *Location3D.ToString(), *SpatialBias.ToString(), (int32)bStaticActor);
}
}
int32 CVar_RepGraph_Spatial_PauseDynamic = 0;
static FAutoConsoleVariableRef CVarRepSpatialPauseDynamic(TEXT("Net.RepGraph.Spatial.PauseDynamic"), CVar_RepGraph_Spatial_PauseDynamic, TEXT("Pauses updating dynamic actor positions in the spatialization nodes."), ECVF_Default );
int32 CVar_RepGraph_Spatial_DebugDynamic = 0;
static FAutoConsoleVariableRef CVarRepGraphSpatialDebugDynamic(TEXT("Net.RepGraph.Spatial.DebugDynamic"), CVar_RepGraph_Spatial_DebugDynamic, TEXT("Prints debug info whenever dynamic actors changes spatial cells"), ECVF_Default );
int32 CVar_RepGraph_Spatial_BiasCreep = 0.f;
static FAutoConsoleVariableRef CVarRepGraphSpatialBiasCreep(TEXT("Net.RepGraph.Spatial.BiasCreep"), CVar_RepGraph_Spatial_BiasCreep, TEXT("Changes bias each frame by this much and force rebuld. For stress test debugging"), ECVF_Default );
void UReplicationGraphNode_GridSpatialization2D::PrepareForReplication()
{
#if WITH_SERVER_CODE
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
RG_QUICK_SCOPE_CYCLE_COUNTER(UReplicationGraphNode_GridSpatialization2D_PrepareForReplication);
FGlobalActorReplicationInfoMap* GlobalRepMap = GraphGlobals.IsValid() ? GraphGlobals->GlobalActorReplicationInfoMap : nullptr;
#if !(UE_BUILD_SHIPPING || UE_BUILD_TEST)
if (CVar_RepGraph_Spatial_BiasCreep != 0.f)
{
SpatialBias.X += CVar_RepGraph_Spatial_BiasCreep;
SpatialBias.Y += CVar_RepGraph_Spatial_BiasCreep;
bNeedsRebuild = true;
}
// -------------------------------------------
// Update dynamic actors
// -------------------------------------------
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 (CVar_RepGraph_Spatial_PauseDynamic == 0)
#endif
{
RG_QUICK_SCOPE_CYCLE_COUNTER(UReplicationGraphNode_GridSpatialization2D_BuildDynamic);
for (auto& MapIt : DynamicSpatializedActors)
{
FActorRepListType& DynamicActor = MapIt.Key;
FCachedDynamicActorInfo& DynamicActorInfo = MapIt.Value;
FActorCellInfo& PreviousCellInfo = DynamicActorInfo.CellInfo;
FNewReplicatedActorInfo& ActorInfo = DynamicActorInfo.ActorInfo;
#if !(UE_BUILD_SHIPPING || UE_BUILD_TEST)
if (!IsActorValidForReplicationGather(DynamicActor))
{
UE_LOG(LogReplicationGraph, Warning, TEXT("UReplicationGraphNode_GridSpatialization2D::PrepareForReplication: Dynamic Actor no longer ready for replication"));
UE_LOG(LogReplicationGraph, Warning, TEXT("%s"), *GetNameSafe(DynamicActor));
continue;
}
#endif
// Update location
FGlobalActorReplicationInfo& ActorRepInfo = GlobalRepMap->Get(DynamicActor);
// Check if this resets spatial bias
const FVector Location3D = DynamicActor->GetActorLocation();
ActorRepInfo.WorldLocation = Location3D;
if (WillActorLocationGrowSpatialBounds(Location3D))
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
{
HandleActorOutOfSpatialBounds(DynamicActor, Location3D, false);
}
if (!bNeedsRebuild)
{
// Get the new CellInfo
const FActorCellInfo NewCellInfo = GetCellInfoForActor(DynamicActor, Location3D, ActorRepInfo.Settings.GetCullDistance());
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 (PreviousCellInfo.IsValid())
{
bool bDirty = false;
if (UNLIKELY(NewCellInfo.StartX > PreviousCellInfo.EndX || NewCellInfo.EndX < PreviousCellInfo.StartX ||
NewCellInfo.StartY > PreviousCellInfo.EndY || NewCellInfo.EndY < PreviousCellInfo.StartY))
{
// No longer intersecting, we just have to remove from all previous nodes and add to all new nodes
bDirty = true;
GetGridNodesForActor(DynamicActor, PreviousCellInfo, GatheredNodes);
for (UReplicationGraphNode_GridCell* Node : GatheredNodes)
{
Node->RemoveDynamicActor(ActorInfo);
}
GetGridNodesForActor(DynamicActor, NewCellInfo, GatheredNodes);
for (UReplicationGraphNode_GridCell* Node : GatheredNodes)
{
Node->AddDynamicActor(ActorInfo);
}
}
else
{
// Some overlap so lets find out what cells need to be added or removed
if (PreviousCellInfo.StartX < NewCellInfo.StartX)
{
// We lost columns on the left side
bDirty = true;
for (int32 X = PreviousCellInfo.StartX; X < NewCellInfo.StartX; ++X)
{
auto& GridX = GetGridX(X);
for (int32 Y = PreviousCellInfo.StartY; Y <= PreviousCellInfo.EndY; ++Y)
{
if (auto& Node = GetCell(GridX, Y))
{
Node->RemoveDynamicActor(ActorInfo);
}
}
}
}
else if(PreviousCellInfo.StartX > NewCellInfo.StartX)
{
// We added columns on the left side
bDirty = true;
for (int32 X = NewCellInfo.StartX; X < PreviousCellInfo.StartX; ++X)
{
auto& GridX = GetGridX(X);
for (int32 Y = NewCellInfo.StartY; Y <= NewCellInfo.EndY; ++Y)
{
GetCellNode(GetCell(GridX,Y))->AddDynamicActor(ActorInfo);
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 (PreviousCellInfo.EndX < NewCellInfo.EndX)
{
// We added columns on the right side
bDirty = true;
for (int32 X = PreviousCellInfo.EndX+1; X <= NewCellInfo.EndX; ++X)
{
auto& GridX = GetGridX(X);
for (int32 Y = NewCellInfo.StartY; Y <= NewCellInfo.EndY; ++Y)
{
GetCellNode(GetCell(GridX,Y))->AddDynamicActor(ActorInfo);
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
}
}
}
else if(PreviousCellInfo.EndX > NewCellInfo.EndX)
{
// We lost columns on the right side
bDirty = true;
for (int32 X = NewCellInfo.EndX+1; X <= PreviousCellInfo.EndX; ++X)
{
auto& GridX = GetGridX(X);
for (int32 Y = PreviousCellInfo.StartY; Y <= PreviousCellInfo.EndY; ++Y)
{
if (auto& Node = GetCell(GridX, Y))
{
Node->RemoveDynamicActor(ActorInfo);
}
}
}
}
// --------------------------------------------------
// We've handled left/right sides. So while handling top and bottom we only need to worry about this run of X cells
const int32 StartX = FMath::Max<int32>(NewCellInfo.StartX, PreviousCellInfo.StartX);
const int32 EndX = FMath::Min<int32>(NewCellInfo.EndX, PreviousCellInfo.EndX);
if (PreviousCellInfo.StartY < NewCellInfo.StartY)
{
// We lost rows on the top side
bDirty = true;
for (int32 X = StartX; X <= EndX; ++X)
{
auto& GridX = GetGridX(X);
for (int32 Y = PreviousCellInfo.StartY; Y < NewCellInfo.StartY; ++Y)
{
if (auto& Node = GetCell(GridX, Y))
{
Node->RemoveDynamicActor(ActorInfo);
}
}
}
}
else if(PreviousCellInfo.StartY > NewCellInfo.StartY)
{
// We added rows on the top side
bDirty = true;
for (int32 X = StartX; X <= EndX; ++X)
{
auto& GridX = GetGridX(X);
for (int32 Y = NewCellInfo.StartY; Y < PreviousCellInfo.StartY; ++Y)
{
GetCellNode(GetCell(GridX,Y))->AddDynamicActor(ActorInfo);
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 (PreviousCellInfo.EndY < NewCellInfo.EndY)
{
// We added rows on the bottom side
bDirty = true;
for (int32 X = StartX; X <= EndX; ++X)
{
auto& GridX = GetGridX(X);
for (int32 Y = PreviousCellInfo.EndY+1; Y <= NewCellInfo.EndY; ++Y)
{
GetCellNode(GetCell(GridX,Y))->AddDynamicActor(ActorInfo);
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
}
}
}
else if (PreviousCellInfo.EndY > NewCellInfo.EndY)
{
// We lost rows on the bottom side
bDirty = true;
for (int32 X = StartX; X <= EndX; ++X)
{
auto& GridX = GetGridX(X);
for (int32 Y = NewCellInfo.EndY+1; Y <= PreviousCellInfo.EndY; ++Y)
{
if (auto& Node = GetCell(GridX, Y))
{
Node->RemoveDynamicActor(ActorInfo);
}
}
}
}
}
if (bDirty)
{
#if !(UE_BUILD_SHIPPING || UE_BUILD_TEST)
if (CVar_RepGraph_Spatial_DebugDynamic)
{
auto CellInfoStr = [](const FActorCellInfo& CellInfo) { return FString::Printf(TEXT("[%d,%d]-[%d,%d]"), CellInfo.StartX, CellInfo.StartY, CellInfo.EndX, CellInfo.EndY); };
UE_LOG(LogReplicationGraph, Display, TEXT("%s moved cells. From %s to %s"), *GetActorRepListTypeDebugString(DynamicActor), *CellInfoStr(PreviousCellInfo), *CellInfoStr(NewCellInfo));
const int32 MinX = FMath::Min<int32>(PreviousCellInfo.StartX, NewCellInfo.StartX);
const int32 MinY = FMath::Min<int32>(PreviousCellInfo.StartY, NewCellInfo.StartY);
const int32 MaxX = FMath::Max<int32>(PreviousCellInfo.EndX, NewCellInfo.EndX);
const int32 MaxY = FMath::Max<int32>(PreviousCellInfo.EndY, NewCellInfo.EndY);
for (int32 Y = MinY; Y <= MaxY; ++Y)
{
FString Str = FString::Printf(TEXT("[%d] "), Y);
for (int32 X = MinX; X <= MaxX; ++X)
{
const bool bShouldBeInOld = (X >= PreviousCellInfo.StartX && X <= PreviousCellInfo.EndX) && (Y >= PreviousCellInfo.StartY && Y <= PreviousCellInfo.EndY);
const bool bShouldBeInNew = (X >= NewCellInfo.StartX && X <= NewCellInfo.EndX) && (Y >= NewCellInfo.StartY && Y <= NewCellInfo.EndY);
bool bInCell = false;
if (auto& Node = GetCell(GetGridX(X),Y))
{
TArray<FActorRepListType> ActorsInCell;
Node->GetAllActorsInNode_Debugging(ActorsInCell);
for (auto ActorInCell : ActorsInCell)
{
if (ActorInCell == DynamicActor)
{
if (bInCell)
{
UE_LOG(LogReplicationGraph, Warning, TEXT(" Actor is in cell multiple times! [%d, %d]"), X, Y);
}
bInCell = true;
}
}
}
if (bShouldBeInOld && bShouldBeInNew && bInCell)
{
// All good, didn't move
Str += "* ";
}
else if (!bShouldBeInOld && bShouldBeInNew && bInCell)
{
// All good, add
Str += "+ ";
}
else if (bShouldBeInOld && !bShouldBeInNew && !bInCell)
{
// All good, removed
Str += "- ";
}
else if (!bShouldBeInOld && !bShouldBeInNew && !bInCell)
{
// nada
Str += " ";
}
else
{
UE_LOG(LogReplicationGraph, Warning, TEXT(" Bad update! Cell [%d,%d]. ShouldBeInOld: %d. ShouldBeInNew: %d. IsInCell: %d"), X, Y, bShouldBeInOld, bShouldBeInNew, bInCell);
Str += "! ";
}
}
UE_LOG(LogReplicationGraph, Display, TEXT("%s"), *Str);
}
}
#endif
PreviousCellInfo = NewCellInfo;
}
}
else
{
// First time - Just add
GetGridNodesForActor(DynamicActor, NewCellInfo, GatheredNodes);
for (UReplicationGraphNode_GridCell* Node : GatheredNodes)
{
Node->AddDynamicActor(ActorInfo);
}
PreviousCellInfo = NewCellInfo;
}
}
}
}
// -------------------------------------------
// Pending Spatial Actors
// -------------------------------------------
for (int32 idx=PendingStaticSpatializedActors.Num()-1; idx>=0; --idx)
{
FPendingStaticActors& PendingStaticActor = PendingStaticSpatializedActors[idx];
if (PendingStaticActor.Actor->IsActorInitialized() == false)
{
continue;
}
FNewReplicatedActorInfo NewActorInfo(PendingStaticActor.Actor);
FGlobalActorReplicationInfo& GlobalInfo = GraphGlobals->GlobalActorReplicationInfoMap->Get(PendingStaticActor.Actor);
AddActorInternal_Static_Implementation(NewActorInfo, GlobalInfo, PendingStaticActor.DormancyDriven);
PendingStaticSpatializedActors.RemoveAtSwap(idx, 1, 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
// -------------------------------------------
// Queued Rebuilds
// -------------------------------------------
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 (bNeedsRebuild)
{
QUICK_SCOPE_CYCLE_COUNTER(UReplicationGraphNode_GridSpatialization2D_RebuildAll);
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
UE_LOG(LogReplicationGraph, Warning, TEXT("Rebuilding spatialization graph for bias %s"), *SpatialBias.ToString());
// Tear down all existing nodes first. This marks them pending kill.
int32 GridsDestroyed(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
for (auto& InnerArray : Grid)
{
for (UReplicationGraphNode_GridCell*& N : InnerArray)
{
if (N)
{
N->TearDown();
N = nullptr;
++GridsDestroyed;
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
}
}
}
// Force a garbage collection. Without this you may hit OOMs if rebuilding spatialization every frame for some period of time.
// (Obviously not ideal to ever be doing this. But you are already hitching, might as well GC to avoid OOM crash).
if (GridsDestroyed >= CVar_RepGraph_NbDestroyedGridsToTriggerGC)
{
GEngine->ForceGarbageCollection(true);
}
CleanChildNodes(NodeOrdering::IgnoreOrdering);
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
for (auto& MapIt : DynamicSpatializedActors)
{
FActorRepListType& DynamicActor = MapIt.Key;
if (ensureMsgf(IsActorValidForReplicationGather(DynamicActor), TEXT("%s not ready for replication."), *GetNameSafe(DynamicActor)))
{
FCachedDynamicActorInfo& DynamicActorInfo = MapIt.Value;
FActorCellInfo& PreviousCellInfo = DynamicActorInfo.CellInfo;
FNewReplicatedActorInfo& ActorInfo = DynamicActorInfo.ActorInfo;
const FVector Location3D = DynamicActor->GetActorLocation();
FGlobalActorReplicationInfo& ActorRepInfo = GlobalRepMap->Get(DynamicActor);
ActorRepInfo.WorldLocation = Location3D;
const FActorCellInfo NewCellInfo = GetCellInfoForActor(DynamicActor, Location3D, ActorRepInfo.Settings.GetCullDistance());
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
GetGridNodesForActor(DynamicActor, NewCellInfo, GatheredNodes);
for (UReplicationGraphNode_GridCell* Node : GatheredNodes)
{
Node->AddDynamicActor(ActorInfo);
}
PreviousCellInfo = NewCellInfo;
}
}
for (auto& MapIt : StaticSpatializedActors)
{
FActorRepListType& StaticActor = MapIt.Key;
FCachedStaticActorInfo& StaticActorInfo = MapIt.Value;
if (ensureMsgf(IsActorValidForReplicationGather(StaticActor), TEXT("%s not ready for replication."), *GetNameSafe(StaticActor)))
{
PutStaticActorIntoCell(StaticActorInfo.ActorInfo, GlobalRepMap->Get(StaticActor), StaticActorInfo.bDormancyDriven);
}
}
bNeedsRebuild = false;
}
#endif // WITH_SERVER_CODE
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
}
// Small structure to make it easier to keep track of
// information regarding current players for a connection when working with grids
struct FPlayerGridCellInformation
{
FPlayerGridCellInformation(FIntPoint InCurLocation) :
CurLocation(InCurLocation), PrevLocation(FIntPoint::ZeroValue)
{
}
FIntPoint CurLocation;
FIntPoint PrevLocation;
};
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 UReplicationGraphNode_GridSpatialization2D::GatherActorListsForConnection(const FConnectionGatherActorListParameters& Params)
{
#if WITH_SERVER_CODE
TArray<FLastLocationGatherInfo>& LastLocationArray = Params.ConnectionManager.LastGatherLocations;
TArray<FVector2D, FReplicationGraphConnectionsAllocator> UniqueCurrentLocations;
// Consider all users that are in cells for this connection.
// From here, generate a list of coordinates, we'll later work through each coordinate pairing
// to find the cells that are actually active. This reduces redundancy and cache misses.
TArray<FPlayerGridCellInformation, FReplicationGraphConnectionsAllocator> ActiveGridCells;
for (const FNetViewer& CurViewer : Params.Viewers)
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 (CurViewer.ViewLocation.Z > ConnectionMaxZ)
{
continue;
}
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
// Figure out positioning
FVector ClampedViewLoc = CurViewer.ViewLocation;
if (GridBounds.IsValid)
{
ClampedViewLoc = GridBounds.GetClosestPointTo(ClampedViewLoc);
}
else
{
// Prevent extreme locations from causing the Grid to grow too large
ClampedViewLoc = ClampedViewLoc.BoundToCube(HALF_WORLD_MAX);
}
// Find out what bucket the view is in
int32 CellX = (ClampedViewLoc.X - SpatialBias.X) / CellSize;
if (CellX < 0)
{
UE_LOG(LogReplicationGraph, Verbose, TEXT("Net view location.X %s is less than the spatial bias %s for %s"), *ClampedViewLoc.ToString(), *SpatialBias.ToString(), CurViewer.Connection ? *CurViewer.Connection->Describe() : TEXT("NONE"));
CellX = 0;
}
int32 CellY = (ClampedViewLoc.Y - SpatialBias.Y) / CellSize;
if (CellY < 0)
{
UE_LOG(LogReplicationGraph, Verbose, TEXT("Net view location.Y %s is less than the spatial bias %s for %s"), *ClampedViewLoc.ToString(), *SpatialBias.ToString(), CurViewer.Connection ? *CurViewer.Connection->Describe() : TEXT("NONE"));
CellY = 0;
}
FPlayerGridCellInformation NewPlayerCell(FIntPoint(CellX, CellY));
FLastLocationGatherInfo* GatherInfoForConnection = nullptr;
// Save this information out for later.
if (CurViewer.Connection != nullptr)
{
GatherInfoForConnection = LastLocationArray.FindByKey<UNetConnection*>(CurViewer.Connection);
// Add any missing last location information that we don't have
if (GatherInfoForConnection == nullptr)
{
GatherInfoForConnection = &LastLocationArray[LastLocationArray.Emplace(CurViewer.Connection, FVector(ForceInitToZero))];
}
}
FVector LastLocationForConnection = GatherInfoForConnection ? GatherInfoForConnection->LastLocation : ClampedViewLoc;
//@todo: if this is clamp view loc this is now redundant...
if (GridBounds.IsValid)
{
// Clean up the location data for this connection to be grid bound
LastLocationForConnection = GridBounds.GetClosestPointTo(LastLocationForConnection);
}
else
{
// Prevent extreme locations from causing the Grid to grow too large
LastLocationForConnection = LastLocationForConnection.BoundToCube(HALF_WORLD_MAX);
}
// Try to determine the previous location of the user.
NewPlayerCell.PrevLocation.X = FMath::Max(0, (int32)((LastLocationForConnection.X - SpatialBias.X) / CellSize));
NewPlayerCell.PrevLocation.Y = FMath::Max(0, (int32)((LastLocationForConnection.Y - SpatialBias.Y) / CellSize));
// If we have not operated on this cell yet (meaning it's not shared by anyone else), gather for it.
if (!UniqueCurrentLocations.Contains(NewPlayerCell.CurLocation))
{
TArray<UReplicationGraphNode_GridCell*>& GridX = GetGridX(CellX);
if (GridX.Num() <= CellY)
{
GridX.SetNum(CellY + 1);
}
UReplicationGraphNode_GridCell* CellNode = GridX[CellY];
if (CellNode)
{
CellNode->GatherActorListsForConnection(Params);
}
UniqueCurrentLocations.Add(NewPlayerCell.CurLocation);
}
// Add this to things we consider later.
ActiveGridCells.Add(NewPlayerCell);
}
if (bDestroyDormantDynamicActors && CVar_RepGraph_DormantDynamicActorsDestruction > 0)
{
FActorRepListRefView& PrevDormantActorList = Params.ConnectionManager.GetPrevDormantActorListForNode(this);
// Process and create the dormancy list for the active grid for this user
for (const FPlayerGridCellInformation& CellInfo : ActiveGridCells)
{
const int32& CellX = CellInfo.CurLocation.X;
const int32& CellY = CellInfo.CurLocation.Y;
const int32& PrevX = CellInfo.PrevLocation.X;
const int32& PrevY = CellInfo.PrevLocation.Y;
// The idea is that if the previous location is a current location for any other user, we do not bother to do operations on this cell
// However, if the current location matches with a current location of another user, continue anyways.
//
// as above, if the grid cell changed this gather and is not in current use by any other viewer
// TODO: There is a potential list gathering redundancy if two actors share the same current and previous cell information
// but this should just result in a wasted cycle if anything.
if (((CellX != PrevX) || (CellY != PrevY)) && !UniqueCurrentLocations.Contains(CellInfo.PrevLocation))
{
RG_QUICK_SCOPE_CYCLE_COUNTER(UReplicationGraphNode_GridSpatialization2D_CellChangeDormantRelevancy);
FActorRepListRefView DormantActorList;
TArray<UReplicationGraphNode_GridCell*>& GridX = GetGridX(CellX);
UReplicationGraphNode_GridCell* CellNode = GridX[CellY];
if (CellNode)
{
if (UReplicationGraphNode_DormancyNode* DormancyNode = CellNode->GetDormancyNode())
{
// Making sure to remove from the PrevDormantActorList since we don't want things added to the DormantActorList to be destroyed anymore
DormancyNode->ConditionalGatherDormantDynamicActors(DormantActorList, Params, nullptr, false, &PrevDormantActorList);
}
}
// Determine dormant actors for our last location. Do not add actors if they are relevant to anyone.
if (UReplicationGraphNode_GridCell* PrevCell = GetCell(GetGridX(PrevX), PrevY))
{
if (UReplicationGraphNode_DormancyNode* DormancyNode = PrevCell->GetDormancyNode())
{
DormancyNode->ConditionalGatherDormantDynamicActors(PrevDormantActorList, Params, &DormantActorList, true);
}
}
}
}
if (PrevDormantActorList.Num() > 0)
{
int32 NumActorsToRemove = CVar_RepGraph_ReplicatedDormantDestructionInfosPerFrame;
UE_LOG(LogReplicationGraph, Verbose, TEXT("UReplicationGraphNode_GridSpatialization2D::GatherActorListsForConnection: Removing %d Actors (List size: %d)"), FMath::Min(NumActorsToRemove, PrevDormantActorList.Num()), PrevDormantActorList.Num());
FGlobalActorReplicationInfoMap* GlobalRepMap = GraphGlobals.IsValid() ? GraphGlobals->GlobalActorReplicationInfoMap : nullptr;
// any previous dormant actors not in the current node dormant list
for (int32 i = 0; i < PrevDormantActorList.Num() && NumActorsToRemove > 0; i++)
{
FActorRepListType& Actor = PrevDormantActorList[i];
const FGlobalActorReplicationInfo* GlobalActorInfo = GlobalRepMap != nullptr ? GlobalRepMap->Find(Actor) : nullptr;
if (FConnectionReplicationActorInfo* ActorInfo = Params.ConnectionManager.ActorInfoMap.Find(Actor))
{
if (ActorInfo->bDormantOnConnection)
{
Params.ConnectionManager.NotifyAddDormantDestructionInfo(Actor);
ActorInfo->bDormantOnConnection = false;
// Ideally, no actor info outside this list should be set to true, so we don't have to worry about resetting them.
// However we could consider iterating through the actor map to reset all of them.
ActorInfo->bGridSpatilization_AlreadyDormant = false;
// add back to connection specific dormancy nodes
// Try to make sure that we're using the stored actor location otherwise we'll end up adding them to nodes they weren't in before
const FVector& ActorLocation = GlobalActorInfo != nullptr ? GlobalActorInfo->WorldLocation : Actor->GetActorLocation();
const FActorCellInfo CellInfo = GetCellInfoForActor(Actor, ActorLocation, ActorInfo->GetCullDistance());
GetGridNodesForActor(Actor, CellInfo, GatheredNodes);
for (UReplicationGraphNode_GridCell* Node : GatheredNodes)
{
if (UReplicationGraphNode_DormancyNode* DormancyNode = Node->GetDormancyNode())
{
// Only notify the connection node if this client was previously inside the cell.
if (UReplicationGraphNode_ConnectionDormancyNode* ConnectionDormancyNode = DormancyNode->GetExistingConnectionNode(Params))
{
ConnectionDormancyNode->NotifyActorDormancyFlush(Actor);
}
}
}
NumActorsToRemove--;
PrevDormantActorList.RemoveAtSwap(i--);
}
else if (ActorInfo->Channel == nullptr)
{
//Channel was closed before becoming dormant. Remove from list
UE_CLOG(CVar_RepGraph_Verify, LogReplicationGraph, Warning, TEXT("UReplicationGraphNode_GridSpatialization2D::GatherActorListsForConnection: Actor with null channel pointer in Connection's PrevDormantActorList, it is preferred that we remove actors from the PrevDormantActorList when we clear their channel."));
ActorInfo->bGridSpatilization_AlreadyDormant = false;
PrevDormantActorList.RemoveAtSwap(i--);
}
}
}
}
}
#endif // WITH_SERVER_CODE
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 UReplicationGraphNode_GridSpatialization2D::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
{
RG_QUICK_SCOPE_CYCLE_COUNTER(UReplicationGraphNode_GridSpatialization2D_NotifyActorCullDistChange);
// If this actor is statically spatialized then we need to remove it and readd it (this is a little wasteful but in practice not common/only happens at startup)
if (FCachedStaticActorInfo* StaticActorInfo = StaticSpatializedActors.Find(Actor))
{
// Remove with old distance
GetGridNodesForActor(Actor, GetCellInfoForActor(Actor, GlobalInfo.WorldLocation, OldDist), GatheredNodes);
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
for (UReplicationGraphNode_GridCell* Node : GatheredNodes)
{
Node->RemoveStaticActor(StaticActorInfo->ActorInfo, GlobalInfo, GlobalInfo.bWantsToBeDormant);
}
// Add new distances (there is some waste here but this hopefully doesn't happen much at runtime!)
GetGridNodesForActor(Actor, GetCellInfoForActor(Actor, GlobalInfo.WorldLocation, GlobalInfo.Settings.GetCullDistance()), GatheredNodes);
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
for (UReplicationGraphNode_GridCell* Node : GatheredNodes)
{
Node->AddStaticActor(StaticActorInfo->ActorInfo, GlobalInfo, StaticActorInfo->bDormancyDriven);
}
}
else if (FCachedDynamicActorInfo* DynamicActorInfo = DynamicSpatializedActors.Find(Actor))
{
// Pull dynamic actor out of the grid. We will put him back on the next gather
FActorCellInfo& PreviousCellInfo = DynamicActorInfo->CellInfo;
if (PreviousCellInfo.IsValid())
{
GetGridNodesForActor(Actor, PreviousCellInfo, GatheredNodes);
for (UReplicationGraphNode_GridCell* Node : GatheredNodes)
{
Node->RemoveDynamicActor(DynamicActorInfo->ActorInfo);
}
PreviousCellInfo.Reset();
}
}
else
{
#if !UE_BUILD_SHIPPING
// Might be in the pending init list
if (PendingStaticSpatializedActors.FindByKey(Actor) == 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
{
UE_LOG(LogReplicationGraph, Warning, TEXT("UReplicationGraphNode_GridSpatialization2D::NotifyActorCullDistChange. %s Changed Cull Distance (%.2f -> %.2f) but is not in static or dynamic actor lists. %s"), *Actor->GetPathName(), OldDist, GlobalInfo.Settings.GetCullDistance(), *GetPathName() );
// Search the entire grid. This is slow so only enabled if verify is on.
if (CVar_RepGraph_Verify)
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 bFound = false;
for (auto& InnerArray : Grid)
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
{
for (UReplicationGraphNode_GridCell* CellNode : InnerArray)
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 (CellNode)
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<FActorRepListType> AllActors;
CellNode->GetAllActorsInNode_Debugging(AllActors);
if (AllActors.Contains(Actor))
{
UE_LOG(LogReplicationGraph, Warning, TEXT(" Its in node %s"), *CellNode->GetPathName());
bFound = true;
}
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 (!bFound)
{
UE_LOG(LogReplicationGraph, Warning, TEXT(" Not in the grid at all!"));
}
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
}
}
#endif
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
}
}
// -------------------------------------------------------
UReplicationGraphNode_AlwaysRelevant::UReplicationGraphNode_AlwaysRelevant()
{
bRequiresPrepareForReplicationCall = true;
}
void UReplicationGraphNode_AlwaysRelevant::PrepareForReplication()
{
QUICK_SCOPE_CYCLE_COUNTER(UReplicationGraphNode_AlwaysRelevant_PrepareForReplication);
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 (ChildNode == nullptr)
{
ChildNode = CreateChildNode<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
}
ChildNode->NotifyResetAllNetworkActors();
for (UClass* ActorClass : AlwaysRelevantClasses)
{
for (TActorIterator<AActor> It(GetWorld(), ActorClass); It; ++It)
{
AActor* Actor = *It;
if (IsActorValidForReplicationGather(Actor))
{
ChildNode->NotifyAddNetworkActor( FNewReplicatedActorInfo(*It) );
}
}
}
}
void UReplicationGraphNode_AlwaysRelevant::AddAlwaysRelevantClass(UClass* Class)
{
// Check that we aren't adding sub classes
for (UClass* ExistingClass : AlwaysRelevantClasses)
{
if (ExistingClass->IsChildOf(Class) || Class->IsChildOf(ExistingClass))
{
UE_LOG(LogReplicationGraph, Warning, TEXT("UReplicationGraphNode_AlwaysRelevant::AddAlwaysRelevantClass Adding class %s when %s is already in the list."), *Class->GetName(), *ExistingClass->GetName());
}
}
AlwaysRelevantClasses.AddUnique(Class);
}
void UReplicationGraphNode_AlwaysRelevant::GatherActorListsForConnection(const FConnectionGatherActorListParameters& Params)
{
ChildNode->GatherActorListsForConnection(Params);
}
// -------------------------------------------------------
void UReplicationGraphNode_TearOff_ForConnection::Serialize(FArchive& Ar)
{
Super::Serialize(Ar);
if (Ar.IsCountingMemory())
{
GRANULAR_NETWORK_MEMORY_TRACKING_INIT(Ar, "UReplicationGraphNode_TearOff_ForConnection::Serialize");
GRANULAR_NETWORK_MEMORY_TRACKING_TRACK("TearOffActors", TearOffActors.CountBytes(Ar));
GRANULAR_NETWORK_MEMORY_TRACKING_TRACK("ReplicationActorList", ReplicationActorList.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
void UReplicationGraphNode_TearOff_ForConnection::GatherActorListsForConnection(const FConnectionGatherActorListParameters& Params)
{
#if WITH_SERVER_CODE
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 (TearOffActors.Num() > 0)
{
ReplicationActorList.Reset();
FPerConnectionActorInfoMap& ActorInfoMap = Params.ConnectionManager.ActorInfoMap;
for (int32 idx=TearOffActors.Num()-1; idx >=0; --idx)
{
FTearOffActorInfo& TearOffInfo = TearOffActors[idx];
AActor* Actor = TearOffInfo.Actor;
const uint32 TearOffFrameNum = TearOffInfo.TearOffFrameNum;
//UE_LOG(LogReplicationGraph, Display, TEXT("UReplicationGraphNode_TearOff_ForConnection::GatherActorListsForConnection. Actor: %s. GetTearOff: %d. FrameNum: %d. TearOffFrameNum: %d"), *GetNameSafe(Actor), (int32)Actor->GetTearOff(), Params.ReplicationFrameNum, TearOffFrameNum);
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 actor is still valid (not pending kill etc)
if (Actor && IsActorValidForReplication(Actor))
{
// And has not replicated since becoming torn off
if (FConnectionReplicationActorInfo* ActorInfo = ActorInfoMap.Find(Actor))
{
//UE_LOG(LogReplicationGraph, Display, TEXT("0x%X ActorInfo->LastRepFrameNum: %d ActorInfo->NextReplicationFrameNum: %d. (%d)"), (int64)ActorInfo, ActorInfo->LastRepFrameNum, ActorInfo->NextReplicationFrameNum, (ActorInfo->NextReplicationFrameNum - Params.ReplicationFrameNum));
// Keep adding it to the out list until its replicated at least once. Saturation can prevent it from happening on any given frame.
// But we could also rep, get an ack for the close, clear the actor's ActorInfo (set LastRepFrameNum = 0), and "miss it". So track that here with bHasReppedOnce
if (ActorInfo->LastRepFrameNum <= TearOffFrameNum && !(ActorInfo->LastRepFrameNum <= 0 && TearOffInfo.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
{
// Add it to the rep list
ReplicationActorList.Add(Actor);
TearOffInfo.bHasReppedOnce = true;
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
continue;
}
}
}
//UE_LOG(LogReplicationGraph, Display, TEXT("Removing tearOffActor: %s. GetTearOff: %d"), *GetNameSafe(Actor), (int32)Actor->GetTearOff());
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 we didn't get added to the list, remove this
TearOffActors.RemoveAtSwap(idx, 1, false);
}
if (ReplicationActorList.Num() > 0)
{
Params.OutGatheredReplicationLists.AddReplicationActorList(ReplicationActorList);
}
}
#endif // WITH_SERVER_CODE
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 UReplicationGraphNode_TearOff_ForConnection::NotifyTearOffActor(AActor* Actor, uint32 FrameNum)
{
TearOffActors.Emplace( Actor, 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
// -------------------------------------------------------
void UReplicationGraphNode_AlwaysRelevant_ForConnection::GatherActorListsForConnection(const FConnectionGatherActorListParameters& Params)
{
// Call super to add any actors that were explicitly given to use via NotifyAddNetworkActor
Super::GatherActorListsForConnection(Params);
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 WITH_SERVER_CODE
auto UpdateActor = [&](AActor* NewActor, AActor*& LastActor)
{
if (NewActor != LastActor)
{
if (NewActor)
{
// Zero out new actor cull distance
Params.ConnectionManager.ActorInfoMap.FindOrAdd(NewActor).SetCullDistanceSquared(0.f);
}
if (IsValid(LastActor))
{
// Reset previous actor culldistance
FConnectionReplicationActorInfo& ActorInfo = Params.ConnectionManager.ActorInfoMap.FindOrAdd(LastActor);
ActorInfo.SetCullDistanceSquared(GraphGlobals->GlobalActorReplicationInfoMap->Get(LastActor).Settings.GetCullDistanceSquared());
}
LastActor = NewActor;
}
if (NewActor && !ReplicationActorList.Contains(NewActor))
{
ReplicationActorList.Add(NewActor);
}
};
// Reset and rebuild another list that will contains our current viewer/viewtarget
ReplicationActorList.Reset();
for (const FNetViewer& CurViewer : Params.Viewers)
{
if (CurViewer.Connection == nullptr)
{
continue;
}
// Ignore other connection view targets when this is a replay connection
if (Params.ConnectionManager.NetConnection->IsReplay() && (CurViewer.Connection != Params.ConnectionManager.NetConnection))
{
continue;
}
FAlwaysRelevantActorInfo* LastData = PastRelevantActors.FindByKey<UNetConnection*>(CurViewer.Connection);
// We've not seen this actor before, go ahead and add them.
if (LastData == nullptr)
{
FAlwaysRelevantActorInfo NewActorInfo;
NewActorInfo.Connection = CurViewer.Connection;
LastData = &(PastRelevantActors[PastRelevantActors.Add(NewActorInfo)]);
}
check(LastData != nullptr);
UpdateActor(CurViewer.InViewer, static_cast<AActor*&>(LastData->LastViewer));
UpdateActor(CurViewer.ViewTarget, static_cast<AActor*&>(LastData->LastViewTarget));
}
// Remove excess
PastRelevantActors.RemoveAll([&](FAlwaysRelevantActorInfo& RelActorInfo){
return RelActorInfo.Connection == nullptr;
});
if (ReplicationActorList.Num() > 0)
{
Params.OutGatheredReplicationLists.AddReplicationActorList(ReplicationActorList);
}
#endif // WITH_SERVER_CODE
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 UReplicationGraphNode_AlwaysRelevant_ForConnection::TearDown()
{
Super::TearDown();
ReplicationActorList.TearDown();
}
void UReplicationGraphNode_AlwaysRelevant_ForConnection::OnCollectActorRepListStats(FActorRepListStatCollector& StatsCollector) const
{
StatsCollector.VisitRepList(this, ReplicationActorList);
Super::OnCollectActorRepListStats(StatsCollector);
}
// -------------------------------------------------------
#if WITH_SERVER_CODE
FAutoConsoleCommandWithWorldAndArgs NetRepGraphPrintChannelCounters(TEXT("Net.RepGraph.PrintActorChannelCounters"),TEXT(""),
FConsoleCommandWithWorldAndArgsDelegate::CreateLambda([](const TArray<FString>& Args, UWorld* World)
{
for (auto& MapIt: ActorChannelCreateCounter)
{
FActorConnectionPair& Pair = MapIt.Key;
int32 Count = MapIt.Value;
UE_LOG(LogReplicationGraph, Display, TEXT("%s : %s ----> %d"), *GetNameSafe(Pair.Actor.Get()), *GetNameSafe(Pair.Connection.Get()), Count );
}
})
);
// ------------------------------------------------------------------------------
FAutoConsoleCommandWithWorldAndArgs ChangeActorDiscoveryBudget(TEXT("Net.RepGraph.ActorDiscoveryBudget"), TEXT("Set a separate network traffic budget for data sent when opening a new actor channel. Value in kilobytes per second"), FConsoleCommandWithWorldAndArgsDelegate::CreateLambda([](const TArray< FString >& Args, UWorld* World)
{
int32 BudgetInKBPS = 0;
if (Args.Num() > 0)
{
LexTryParseString<int32>(BudgetInKBPS, *Args[0]);
}
for (TObjectIterator<UReplicationGraph> It; It; ++It)
{
It->SetActorDiscoveryBudget(BudgetInKBPS);
}
}));
#endif // WITH_SERVER_CODE