2018-12-14 13:44:01 -05:00
// Copyright 1998-2019 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
# include "ReplicationGraph.h"
# include "ReplicationGraphTypes.h"
# include "Misc/CoreDelegates.h"
# include "Engine/ActorChannel.h"
# include "Engine/LocalPlayer.h"
# include "GameFramework/PlayerController.h"
# include "GameFramework/Info.h"
# include "GameFramework/HUD.h"
# include "UObject/UObjectIterator.h"
# include "UObject/UObjectBaseUtility.h"
# include "Engine/Canvas.h"
# include "Engine/Engine.h"
# include "DrawDebugHelpers.h"
# include "ProfilingDebugging/CsvProfiler.h"
# include "EngineUtils.h"
# include "Engine/NetConnection.h"
/**
*
* = = = = = = = = = = = = = = = = = = = = = Debugging Tools ( WIP ) = = = = = = = = = = = = = = = = = = = = =
*
* Net . RepGraph . PrintGraph Prints replication graph to log ( hierarchical representation of graph and its lists )
* Net . RepGraph . DrawGraph Draws replication graph on HUD
*
* Net . RepGraph . PrintAllActorInfo < MatchString > Prints global and connection specific info about actors whose pathname contains MatchString . Can be called from client .
*
* Net . RepGraph . PrioritizedLists . Print < ConnectionIdx > Prints prioritized replication list to log
* Net . RepGraph . PrioritizedLists . Draw < ConnectionIdx > Draws prioritized replication list on HUD
*
* Net . RepGraph . PrintAll < Frames > < ConnectionIdx > < " Class " / " Num " > Prints the replication graph and prioritized list for given ConnectionIdx for given Frames .
*
* Net . PacketBudget . HUD Draws Packet Budget details on HUD
* Net . PacketBudget . HUD . Toggle Toggles capturing / updating the Packet Budget details HUD
*
* Net . RepGraph . Lists . DisplayDebug Displays RepActoList stats on HUD
* Net . RepGraph . Lists . Stats Prints RepActorList stats to Log
* Net . RepGraph . Lists . Details Prints extended RepActorList details to log
*
* Net . RepGraph . StarvedList < ConnectionIdx > Prints actor starvation stats to HUD
*
2018-11-16 14:01:06 -05:00
* Net . RepGraph . SetDebugActor < ClassName > Call on client : sets server debug actor to the closest actor that matches ClassName . See RepGraphConditionalActorBreakpoint
*
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
*/
// ----------------------------------------------------------
// Console Commands
// ----------------------------------------------------------
UNetConnection * AReplicationGraphDebugActor : : GetNetConnection ( ) const
{
if ( ConnectionManager )
{
return ConnectionManager - > NetConnection ;
}
if ( UNetDriver * Driver = GetNetDriver ( ) )
{
return Driver - > ServerConnection ;
}
return nullptr ;
}
// -------------------------------------------------------------
bool AReplicationGraphDebugActor : : ServerStartDebugging_Validate ( )
{
return true ;
}
void AReplicationGraphDebugActor : : ServerStartDebugging_Implementation ( )
{
UE_LOG ( LogReplicationGraph , Display , TEXT ( " ServerStartDebugging " ) ) ;
ConnectionManager - > bEnableDebugging = true ;
UReplicationGraphNode_GridSpatialization2D * GridNode = nullptr ;
for ( UReplicationGraphNode * Node : ReplicationGraph - > GlobalGraphNodes )
{
GridNode = Cast < UReplicationGraphNode_GridSpatialization2D > ( Node ) ;
if ( GridNode )
{
break ;
2018-06-07 22:39:07 -04:00
}
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
}
if ( GridNode = = nullptr )
{
return ;
}
int32 TotalNumCells = 0 ; // How many cells have been allocated
int32 TotalLeafNodes = 0 ; // How many cells have leaf nodes allocated
TSet < AActor * > UniqueActors ;
int32 TotalElementsInLists = 0 ;
TMap < int32 , int32 > NumStreamLevelsMap ;
int32 MaxY = 0 ;
for ( TArray < UReplicationGraphNode_GridCell * > & GridY : GridNode - > Grid )
{
for ( UReplicationGraphNode_GridCell * LeafNode : GridY )
{
TotalNumCells + + ;
if ( LeafNode )
{
TotalLeafNodes + + ;
TArray < FActorRepListType > NodeActors ;
LeafNode - > GetAllActorsInNode_Debugging ( NodeActors ) ;
TotalElementsInLists + = NodeActors . Num ( ) ;
UniqueActors . Append ( NodeActors ) ;
NumStreamLevelsMap . FindOrAdd ( LeafNode - > StreamingLevelCollection . NumLevels ( ) ) + + ;
}
}
MaxY = FMath : : Max < int32 > ( MaxY , GridY . Num ( ) ) ;
}
UE_LOG ( LogReplicationGraph , Display , TEXT ( " Grid Dimensions: %d x %d (%d) " ) , GridNode - > Grid . Num ( ) , MaxY , GridNode - > Grid . Num ( ) * MaxY ) ;
UE_LOG ( LogReplicationGraph , Display , TEXT ( " Total Num Cells: %d " ) , TotalNumCells ) ;
UE_LOG ( LogReplicationGraph , Display , TEXT ( " Total Num Leaf Nodes: %d " ) , TotalLeafNodes ) ;
UE_LOG ( LogReplicationGraph , Display , TEXT ( " Total List Elements: %d " ) , TotalElementsInLists ) ;
UE_LOG ( LogReplicationGraph , Display , TEXT ( " Total Unique Spatial Actors: %d " ) , UniqueActors . Num ( ) ) ;
UE_LOG ( LogReplicationGraph , Display , TEXT ( " Stream Levels per grid Frequency Report: " ) ) ;
NumStreamLevelsMap . ValueSort ( TGreater < int32 > ( ) ) ;
for ( auto It : NumStreamLevelsMap )
{
UE_LOG ( LogReplicationGraph , Display , TEXT ( " %d Levels --> %d " ) , It . Key , It . Value ) ;
}
}
FAutoConsoleCommandWithWorldAndArgs NetRepGraphDebugActorStart ( TEXT ( " Net.RepGraph.Debug.Start " ) , TEXT ( " " ) ,
FConsoleCommandWithWorldAndArgsDelegate : : CreateLambda ( [ ] ( const TArray < FString > & Args , UWorld * World )
{
for ( TActorIterator < AReplicationGraphDebugActor > It ( World ) ; It ; + + It )
{
It - > ServerStartDebugging ( ) ;
}
} )
) ;
// -------------------------------------------------------------
bool AReplicationGraphDebugActor : : ServerStopDebugging_Validate ( )
{
return true ;
}
void AReplicationGraphDebugActor : : ServerStopDebugging_Implementation ( )
{
}
// -------------------------------------------------------------
void AReplicationGraphDebugActor : : PrintCullDistances ( )
{
struct FData
{
UClass * Class = nullptr ;
float DistSq ;
int32 Count ;
} ;
TArray < FData > DataList ;
for ( auto It = ReplicationGraph - > GlobalActorReplicationInfoMap . CreateActorMapIterator ( ) ; It ; + + It )
{
AActor * Actor = It . Key ( ) ;
2018-06-07 22:39:07 -04:00
TUniquePtr < FGlobalActorReplicationInfo > & InfoPtr = It . Value ( ) ;
if ( ! InfoPtr | | InfoPtr . Get ( ) = = nullptr )
{
continue ;
}
FGlobalActorReplicationInfo & Info = * InfoPtr . Get ( ) ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for 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 ( FData & ExistingData : DataList )
{
2019-04-05 11:18:24 -04:00
if ( ExistingData . Class = = Actor - > GetClass ( ) & & FMath : : IsNearlyZero ( ExistingData . DistSq - Info . 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
{
ExistingData . Count + + ;
bFound = true ;
break ;
}
}
if ( bFound )
{
continue ;
}
FData NewData ;
NewData . Class = Actor - > GetClass ( ) ;
2019-04-05 11:18:24 -04:00
NewData . DistSq = Info . 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
NewData . Count = 1 ;
DataList . Add ( NewData ) ;
}
DataList . Sort ( [ ] ( const FData & LHS , const FData & RHS ) { return LHS . DistSq < RHS . DistSq ; } ) ;
for ( FData & Data : DataList )
{
const UClass * NativeParent = Data . Class ;
while ( NativeParent & & ! NativeParent - > IsNative ( ) )
{
NativeParent = NativeParent - > GetSuperClass ( ) ;
}
UE_LOG ( LogReplicationGraph , Display , TEXT ( " %s (%s) [%d] = %.2f " ) , * GetNameSafe ( Data . Class ) , * GetNameSafe ( NativeParent ) , Data . Count , FMath : : Sqrt ( Data . DistSq ) ) ;
}
}
FAutoConsoleCommandWithWorldAndArgs NetRepGraphPrintCullDistancesCommand ( TEXT ( " Net.RepGraph.PrintCullDistances " ) , TEXT ( " " ) ,
FConsoleCommandWithWorldAndArgsDelegate : : CreateLambda ( [ ] ( const TArray < FString > & Args , UWorld * World )
{
for ( TActorIterator < AReplicationGraphDebugActor > It ( World ) ; It ; + + It )
{
It - > PrintCullDistances ( ) ;
}
} )
) ;
// -------------------------------------------------------------
void AReplicationGraphDebugActor : : ServerPrintAllActorInfo_Implementation ( const FString & Str )
{
PrintAllActorInfo ( Str ) ;
}
bool AReplicationGraphDebugActor : : ServerPrintAllActorInfo_Validate ( const FString & Str )
{
return true ;
}
void AReplicationGraphDebugActor : : PrintAllActorInfo ( FString MatchString )
{
auto Matches = [ & MatchString ] ( UObject * Obj ) { return MatchString . IsEmpty ( ) | | Obj - > GetPathName ( ) . Contains ( MatchString ) ; } ;
GLog - > Logf ( TEXT ( " ================================================================ " ) ) ;
GLog - > Logf ( TEXT ( " Printing All Actor Info. Replication Frame: %d. MatchString: %s " ) , ReplicationGraph - > GetReplicationGraphFrame ( ) , * MatchString ) ;
GLog - > Logf ( TEXT ( " ================================================================ " ) ) ;
for ( auto ClassRepInfoIt = ReplicationGraph - > GlobalActorReplicationInfoMap . CreateClassMapIterator ( ) ; ClassRepInfoIt ; + + ClassRepInfoIt )
{
UClass * Class = CastChecked < UClass > ( ClassRepInfoIt . Key ( ) . ResolveObjectPtr ( ) ) ;
const FClassReplicationInfo & ClassInfo = ClassRepInfoIt . Value ( ) ;
if ( ! Matches ( Class ) )
{
continue ;
}
UClass * ParentClass = Class ;
2018-06-07 22:39:07 -04:00
while ( ParentClass & & ! ParentClass - > IsNative ( ) & & ParentClass - > GetSuperClass ( ) & & ParentClass - > GetSuperClass ( ) ! = AActor : : StaticClass ( ) )
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
{
ParentClass = ParentClass - > GetSuperClass ( ) ;
}
GLog - > Logf ( TEXT ( " " ) ) ;
GLog - > Logf ( TEXT ( " ClassInfo for %s (Native: %s) " ) , * GetNameSafe ( Class ) , * GetNameSafe ( ParentClass ) ) ;
GLog - > Logf ( TEXT ( " %s " ) , * ClassInfo . BuildDebugStringDelta ( ) ) ;
}
for ( TActorIterator < AActor > ActorIt ( GetWorld ( ) ) ; ActorIt ; + + ActorIt )
{
AActor * Actor = * ActorIt ;
if ( IsActorValidForReplication ( Actor ) = = false )
{
continue ;
}
if ( ! Matches ( Actor ) )
{
continue ;
}
if ( FGlobalActorReplicationInfo * Info = ReplicationGraph - > GlobalActorReplicationInfoMap . Find ( Actor ) )
{
GLog - > Logf ( TEXT ( " " ) ) ;
GLog - > Logf ( TEXT ( " GlobalInfo for %s " ) , * Actor - > GetPathName ( ) ) ;
Info - > LogDebugString ( * GLog ) ;
}
if ( FConnectionReplicationActorInfo * Info = ConnectionManager - > ActorInfoMap . Find ( Actor ) )
{
GLog - > Logf ( TEXT ( " " ) ) ;
GLog - > Logf ( TEXT ( " ConnectionInfo for %s " ) , * Actor - > GetPathName ( ) ) ;
Info - > LogDebugString ( * GLog ) ;
}
}
2018-06-07 22:39:07 -04:00
GLog - > Logf ( TEXT ( " " ) ) ;
GLog - > Logf ( TEXT ( " sizeof(FGlobalActorReplicationInfo): %d " ) , sizeof ( FGlobalActorReplicationInfo ) ) ;
GLog - > Logf ( TEXT ( " sizeof(FConnectionReplicationActorInfo): %d " ) , sizeof ( FConnectionReplicationActorInfo ) ) ;
GLog - > Logf ( TEXT ( " Total GlobalActorReplicationInfoMap Num/Size (Unfiltered): %d elements / %d bytes " ) , ReplicationGraph - > GlobalActorReplicationInfoMap . Num ( ) , ReplicationGraph - > GlobalActorReplicationInfoMap . Num ( ) * sizeof ( FGlobalActorReplicationInfo ) ) ;
GLog - > Logf ( TEXT ( " Total PerConnectionActorInfoMap Num/Size (Unfiltered, for this connection only): %d elements / %d bytes " ) , ConnectionManager - > ActorInfoMap . Num ( ) , ConnectionManager - > ActorInfoMap . Num ( ) * sizeof ( FConnectionReplicationActorInfo ) ) ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
}
FAutoConsoleCommandWithWorldAndArgs NetRepGraphPrintAllActorInfoCmd ( TEXT ( " Net.RepGraph.PrintAllActorInfo " ) , TEXT ( " " ) ,
FConsoleCommandWithWorldAndArgsDelegate : : CreateLambda ( [ ] ( const TArray < FString > & Args , UWorld * World )
{
FString MatchString ;
if ( Args . Num ( ) > 0 )
{
MatchString = Args [ 0 ] ;
}
for ( TActorIterator < AReplicationGraphDebugActor > It ( World ) ; It ; + + It )
{
It - > ServerPrintAllActorInfo ( MatchString ) ;
}
} )
) ;
// -------------------------------------------------------------
bool AReplicationGraphDebugActor : : ServerCellInfo_Validate ( )
{
return true ;
}
void AReplicationGraphDebugActor : : ServerCellInfo_Implementation ( )
{
2019-04-16 19:16:18 -04:00
TArray < FVector , FReplicationGraphConnectionsAllocator > LocationsSent ;
TArray < UNetConnection * , FReplicationGraphConnectionsAllocator > ConnectionsToConsider ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
2019-04-16 19:16:18 -04:00
UNetConnection * PrimaryNetConnection = GetNetConnection ( ) ;
ConnectionsToConsider . Add ( PrimaryNetConnection ) ;
for ( UChildConnection * Child : PrimaryNetConnection - > Children )
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
{
2019-04-16 19:16:18 -04:00
ConnectionsToConsider . Add ( ( UNetConnection * ) Child ) ;
}
for ( UNetConnection * Connection : ConnectionsToConsider )
{
FNetViewer Viewer ( Connection , 0.f ) ;
UReplicationGraphNode_GridSpatialization2D * GridNode = nullptr ;
for ( UReplicationGraphNode * Node : ReplicationGraph - > GlobalGraphNodes )
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
{
2019-04-16 19:16:18 -04:00
GridNode = Cast < UReplicationGraphNode_GridSpatialization2D > ( Node ) ;
if ( GridNode )
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
{
2019-04-16 19:16:18 -04:00
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
}
}
2019-04-16 19:16:18 -04:00
if ( GridNode = = nullptr )
{
return ;
}
int32 CellX = FMath : : Max < int32 > ( 0 , ( Viewer . ViewLocation . X - GridNode - > SpatialBias . X ) / GridNode - > CellSize ) ;
int32 CellY = FMath : : Max < int32 > ( 0 , ( Viewer . ViewLocation . Y - GridNode - > SpatialBias . Y ) / GridNode - > CellSize ) ;
FVector CellLocation ( GridNode - > SpatialBias . X + ( ( ( float ) ( CellX ) + 0.5f ) * GridNode - > CellSize ) , GridNode - > SpatialBias . Y + ( ( ( float ) ( CellY ) + 0.5f ) * GridNode - > CellSize ) , Viewer . ViewLocation . Z ) ;
if ( LocationsSent . Contains ( CellLocation ) )
{
UE_LOG ( LogReplicationGraph , Verbose , TEXT ( " Skipping location %s as we've already sent it " ) , * ( CellLocation . ToString ( ) ) ) ;
continue ;
}
LocationsSent . Add ( CellLocation ) ;
TArray < AActor * > ActorsInCell ;
FVector CellExtent ( GridNode - > CellSize , GridNode - > CellSize , 10.f ) ;
if ( GridNode - > Grid . IsValidIndex ( CellX ) )
{
TArray < UReplicationGraphNode_GridCell * > & GridY = GridNode - > Grid [ CellX ] ;
if ( GridY . IsValidIndex ( CellY ) )
{
if ( UReplicationGraphNode_GridCell * LeafNode = GridY [ CellY ] )
{
LeafNode - > GetAllActorsInNode_Debugging ( ActorsInCell ) ;
}
}
}
ClientCellInfo ( CellLocation , CellExtent , ActorsInCell ) ;
}
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for 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 AReplicationGraphDebugActor : : ClientCellInfo_Implementation ( FVector CellLocation , FVector CellExtent , const TArray < AActor * > & Actors )
{
DrawDebugBox ( GetWorld ( ) , CellLocation , CellExtent , FColor : : Blue , true , 10.f ) ;
int32 NullActors = 0 ;
for ( const AActor * Actor : Actors )
{
if ( Actor )
{
DrawDebugLine ( GetWorld ( ) , CellLocation , Actor - > GetActorLocation ( ) , FColor : : Blue , true , 10.f ) ;
}
else
{
NullActors + + ;
}
}
UE_LOG ( LogReplicationGraph , Display , TEXT ( " NullActors: %d " ) , NullActors ) ;
}
FAutoConsoleCommandWithWorldAndArgs NetRepGraphCellInfo ( TEXT ( " Net.RepGraph.Spatial.CellInfo " ) , TEXT ( " " ) ,
FConsoleCommandWithWorldAndArgsDelegate : : CreateLambda ( [ ] ( const TArray < FString > & Args , UWorld * World )
{
for ( TActorIterator < AReplicationGraphDebugActor > It ( World ) ; It ; + + It )
{
It - > ServerCellInfo ( ) ;
}
} )
) ;
2018-06-07 22:39:07 -04:00
// -------------------------------------------------------------
bool AReplicationGraphDebugActor : : ServerSetCullDistanceForClass_Validate ( UClass * Class , float CullDistance )
{
return true ;
}
void AReplicationGraphDebugActor : : ServerSetCullDistanceForClass_Implementation ( UClass * Class , float CullDistance )
{
if ( ! Class )
{
UE_LOG ( LogReplicationGraph , Display , TEXT ( " Invalid Class " ) ) ;
return ;
}
2018-10-29 10:01:28 -04:00
const float CullDistSq = CullDistance * CullDistance ;
2018-06-07 22:39:07 -04:00
FClassReplicationInfo & ClassInfo = ReplicationGraph - > GlobalActorReplicationInfoMap . GetClassInfo ( Class ) ;
2019-04-05 11:18:24 -04:00
ClassInfo . SetCullDistanceSquared ( CullDistSq ) ;
2018-06-07 22:39:07 -04:00
UE_LOG ( LogReplicationGraph , Display , TEXT ( " Setting cull distance for class %s to %.2f " ) , * Class - > GetName ( ) , CullDistance ) ;
for ( TActorIterator < AActor > ActorIt ( GetWorld ( ) , Class ) ; ActorIt ; + + ActorIt )
{
AActor * Actor = * ActorIt ;
if ( FGlobalActorReplicationInfo * ActorInfo = ReplicationGraph - > GlobalActorReplicationInfoMap . Find ( Actor ) )
{
2019-04-05 11:18:24 -04:00
ActorInfo - > Settings . SetCullDistanceSquared ( CullDistSq ) ;
2018-06-07 22:39:07 -04:00
UE_LOG ( LogReplicationGraph , Display , TEXT ( " Setting GlobalActorInfo cull distance for %s to %.2f " ) , * Actor - > GetName ( ) , CullDistance ) ;
}
if ( FConnectionReplicationActorInfo * ConnectionActorInfo = ConnectionManager - > ActorInfoMap . Find ( Actor ) )
{
2019-04-05 11:18:24 -04:00
ConnectionActorInfo - > SetCullDistanceSquared ( CullDistSq ) ;
2018-06-07 22:39:07 -04:00
UE_LOG ( LogReplicationGraph , Display , TEXT ( " Setting Connection cull distance for %s to %.2f " ) , * Actor - > GetName ( ) , CullDistance ) ;
}
}
}
FAutoConsoleCommandWithWorldAndArgs NetRepGraphSetClassCullDistance ( TEXT ( " Net.RepGraph.SetClassCullDistance " ) , TEXT ( " " ) ,
FConsoleCommandWithWorldAndArgsDelegate : : CreateLambda ( [ ] ( const TArray < FString > & Args , UWorld * World )
{
if ( Args . Num ( ) < = 1 )
{
UE_LOG ( LogReplicationGraph , Display , TEXT ( " Usage: Net.RepGraph.SetClassCullDistance <Class> <Distance> " ) ) ;
return ;
}
UClass * Class = FindObject < UClass > ( ANY_PACKAGE , * Args [ 0 ] ) ;
if ( Class = = nullptr )
{
UE_LOG ( LogReplicationGraph , Display , TEXT ( " Could not find Class: %s " ) , * Args [ 0 ] ) ;
return ;
}
float Distance = 0.f ;
if ( ! LexTryParseString < float > ( Distance , * Args [ 1 ] ) )
{
UE_LOG ( LogReplicationGraph , Display , TEXT ( " Could not parse %s as float. " ) , * Args [ 1 ] ) ;
}
for ( TActorIterator < AReplicationGraphDebugActor > It ( World ) ; It ; + + It )
{
It - > ServerSetCullDistanceForClass ( Class , Distance ) ;
}
} )
) ;
2018-10-29 10:01:28 -04:00
// -------------------------------------------------------------
bool AReplicationGraphDebugActor : : ServerSetPeriodFrameForClass_Validate ( UClass * Class , int32 PeriodFrame )
{
return true ;
}
void AReplicationGraphDebugActor : : ServerSetPeriodFrameForClass_Implementation ( UClass * Class , int32 PeriodFrame )
{
if ( ! Class )
{
UE_LOG ( LogReplicationGraph , Display , TEXT ( " Invalid Class " ) ) ;
return ;
}
FClassReplicationInfo & ClassInfo = ReplicationGraph - > GlobalActorReplicationInfoMap . GetClassInfo ( Class ) ;
ClassInfo . ReplicationPeriodFrame = PeriodFrame ;
UE_LOG ( LogReplicationGraph , Display , TEXT ( " Setting ReplicationPeriodFrame for class %s to %d " ) , * Class - > GetName ( ) , PeriodFrame ) ;
for ( TActorIterator < AActor > ActorIt ( GetWorld ( ) , Class ) ; ActorIt ; + + ActorIt )
{
AActor * Actor = * ActorIt ;
if ( FGlobalActorReplicationInfo * ActorInfo = ReplicationGraph - > GlobalActorReplicationInfoMap . Find ( Actor ) )
{
ActorInfo - > Settings . ReplicationPeriodFrame = PeriodFrame ;
UE_LOG ( LogReplicationGraph , Display , TEXT ( " Setting GlobalActorInfo ReplicationPeriodFrame for %s to %d " ) , * Actor - > GetName ( ) , PeriodFrame ) ;
}
if ( FConnectionReplicationActorInfo * ConnectionActorInfo = ConnectionManager - > ActorInfoMap . Find ( Actor ) )
{
ConnectionActorInfo - > ReplicationPeriodFrame = PeriodFrame ;
UE_LOG ( LogReplicationGraph , Display , TEXT ( " Setting Connection ReplicationPeriodFrame for %s to %d " ) , * Actor - > GetName ( ) , PeriodFrame ) ;
}
}
}
FAutoConsoleCommandWithWorldAndArgs NetRepGraphSetPeriodFrame ( TEXT ( " Net.RepGraph.SetPeriodFrame " ) , TEXT ( " " ) ,
FConsoleCommandWithWorldAndArgsDelegate : : CreateLambda ( [ ] ( const TArray < FString > & Args , UWorld * World )
{
if ( Args . Num ( ) < = 1 )
{
UE_LOG ( LogReplicationGraph , Display , TEXT ( " Usage: Net.RepGraph.SetPeriodFrame <Class> <PeriodFrameNum> " ) ) ;
return ;
}
UClass * Class = FindObject < UClass > ( ANY_PACKAGE , * Args [ 0 ] ) ;
if ( Class = = nullptr )
{
UE_LOG ( LogReplicationGraph , Display , TEXT ( " Could not find Class: %s " ) , * Args [ 0 ] ) ;
return ;
}
float Distance = 0.f ;
if ( ! LexTryParseString < float > ( Distance , * Args [ 1 ] ) )
{
UE_LOG ( LogReplicationGraph , Display , TEXT ( " Could not parse %s as float. " ) , * Args [ 1 ] ) ;
}
for ( TActorIterator < AReplicationGraphDebugActor > It ( World ) ; It ; + + It )
{
It - > ServerSetPeriodFrameForClass ( Class , Distance ) ;
}
} )
) ;
2018-11-16 14:01:06 -05:00
// -------------------------------------------------------------
bool AReplicationGraphDebugActor : : ServerSetConditionalActorBreakpoint_Validate ( AActor * Actor )
{
return true ;
}
void AReplicationGraphDebugActor : : ServerSetConditionalActorBreakpoint_Implementation ( AActor * Actor )
{
DebugActorConnectionPair . Actor = Actor ;
DebugActorConnectionPair . Connection = Actor ? this - > GetNetConnection ( ) : nullptr ; // clear connection if null actor was sent
UE_LOG ( LogReplicationGraph , Display , TEXT ( " AReplicationGraphDebugActor::ServerSetConditionalActorBreakpoint set to %s/%s " ) , * GetPathNameSafe ( Actor ) , DebugActorConnectionPair . Connection . IsValid ( ) ? * DebugActorConnectionPair . Connection - > Describe ( ) : TEXT ( " Null " ) ) ;
}
FAutoConsoleCommandWithWorldAndArgs NetRepGraphSetDebugActorConnectionCmd ( TEXT ( " Net.RepGraph.SetDebugActor " ) , TEXT ( " Set DebugActorConnectionPair on server, from client. Specify " ) ,
FConsoleCommandWithWorldAndArgsDelegate : : CreateLambda ( [ ] ( const TArray < FString > & Args , UWorld * World )
{
UE_LOG ( LogReplicationGraph , Display , TEXT ( " Usage: Net.RepGraph.SetDebugActor <Class> " ) ) ;
APlayerController * PC = GEngine - > GetFirstLocalPlayerController ( World ) ;
if ( ! PC )
{
UE_LOG ( LogReplicationGraph , Display , TEXT ( " No PC found! " ) ) ;
return ;
}
AActor * NewDebugActor = nullptr ;
if ( Args . Num ( ) < = 0 )
{
UE_LOG ( LogReplicationGraph , Display , TEXT ( " No class specified. Clearing debug actor! " ) ) ;
}
else
{
float ClosestMatchDistSq = WORLD_MAX ;
AActor * ClosestMatchActor = nullptr ;
FVector CamLoc ;
FRotator CamRot ;
PC - > GetPlayerViewPoint ( CamLoc , CamRot ) ;
for ( TActorIterator < AActor > ActorIt ( World ) ; ActorIt ; + + ActorIt )
{
AActor * Actor = * ActorIt ;
UClass * Class = Actor - > GetClass ( ) ;
if ( Actor - > GetIsReplicated ( ) = = false )
{
continue ;
}
while ( Class )
{
if ( Class - > GetName ( ) . Contains ( Args [ 0 ] ) )
{
break ;
}
Class = Class - > GetSuperClass ( ) ;
}
if ( Class )
{
float DistSq = ( Actor - > GetActorLocation ( ) - CamLoc ) . SizeSquared2D ( ) ;
if ( DistSq < ClosestMatchDistSq )
{
ClosestMatchDistSq = DistSq ;
ClosestMatchActor = Actor ;
}
}
}
if ( ClosestMatchActor )
{
UE_LOG ( LogReplicationGraph , Display , TEXT ( " Best Match = %s. (Class=%s) " ) , * ClosestMatchActor - > GetPathName ( ) , * ClosestMatchActor - > GetClass ( ) - > GetName ( ) ) ;
NewDebugActor = ClosestMatchActor ;
}
else
{
UE_LOG ( LogReplicationGraph , Display , TEXT ( " Unable to find actor that matched class %s " ) , * Args [ 0 ] ) ;
}
}
for ( TActorIterator < AReplicationGraphDebugActor > It ( World ) ; It ; + + It )
{
It - > ServerSetConditionalActorBreakpoint ( NewDebugActor ) ;
}
} )
) ;
2018-10-29 10:01:28 -04:00
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
// --------------------------------------------------------------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------------------------------
# if !(UE_BUILD_SHIPPING | UE_BUILD_TEST)
FAutoConsoleCommandWithWorldAndArgs NetRepGraphForceRebuild ( TEXT ( " Net.RepGraph.Spatial.ForceRebuild " ) , TEXT ( " " ) ,
FConsoleCommandWithWorldAndArgsDelegate : : CreateLambda ( [ ] ( const TArray < FString > & Args , UWorld * World )
{
for ( TObjectIterator < UReplicationGraphNode_GridSpatialization2D > It ; It ; + + It )
{
UReplicationGraphNode_GridSpatialization2D * Node = * It ;
if ( Node & & Node - > HasAnyFlags ( RF_ClassDefaultObject ) = = false )
{
Node - > ForceRebuild ( ) ;
Node - > DebugActorNames . Append ( Args ) ;
}
}
} )
) ;
FAutoConsoleCommandWithWorldAndArgs NetRepGraphSetCellSize ( TEXT ( " Net.RepGraph.Spatial.SetCellSize " ) , TEXT ( " " ) ,
FConsoleCommandWithWorldAndArgsDelegate : : CreateLambda ( [ ] ( const TArray < FString > & Args , UWorld * World )
{
float NewGridSize = 0.f ;
if ( Args . Num ( ) > 0 )
{
2018-06-07 22:39:07 -04:00
LexFromString ( NewGridSize , * Args [ 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 ( NewGridSize < = 0.f )
{
return ;
}
for ( TObjectIterator < UReplicationGraphNode_GridSpatialization2D > It ; It ; + + It )
{
UReplicationGraphNode_GridSpatialization2D * Node = * It ;
if ( Node & & Node - > HasAnyFlags ( RF_ClassDefaultObject ) = = false )
{
Node - > CellSize = NewGridSize ;
Node - > ForceRebuild ( ) ;
}
}
} )
) ;
// --------------------------------------------------------------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------------------------------
FAutoConsoleCommand RepDriverListsAddTestmd ( TEXT ( " Net.RepGraph.Lists.AddTest " ) , TEXT ( " " ) , FConsoleCommandWithArgsDelegate : : CreateLambda ( [ ] ( const TArray < FString > & Args )
{
static FActorRepListRefView List ;
List . PrepareForWrite ( true ) ;
int32 Num = 1 ;
if ( Args . Num ( ) > 0 )
{
2018-06-07 22:39:07 -04:00
LexFromString ( Num , * Args [ 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
}
while ( Num - - > 0 )
{
List . Add ( nullptr ) ;
}
} ) ) ;
FAutoConsoleCommand RepDriverListsStatsCmd ( TEXT ( " Net.RepGraph.Lists.Stats " ) , TEXT ( " " ) , FConsoleCommandWithArgsDelegate : : CreateLambda ( [ ] ( const TArray < FString > & Args )
{
int32 Mode = 0 ;
if ( Args . Num ( ) > 0 )
{
2018-06-07 22:39:07 -04:00
LexFromString ( Mode , * Args [ 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
}
PrintRepListStats ( Mode ) ;
} ) ) ;
FAutoConsoleCommand RepDriverListDetailsCmd ( TEXT ( " Net.RepGraph.Lists.Details " ) , TEXT ( " " ) , FConsoleCommandWithArgsDelegate : : CreateLambda ( [ ] ( const TArray < FString > & Args )
{
int32 PoolIdx = 0 ;
int32 BlockIdx = 0 ;
int32 ListIdx = - 1 ;
if ( Args . Num ( ) > 0 )
{
2018-06-07 22:39:07 -04:00
LexFromString ( PoolIdx , * Args [ 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 ( Args . Num ( ) > 1 )
{
2018-06-07 22:39:07 -04:00
LexFromString ( BlockIdx , * Args [ 1 ] ) ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for 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 ( Args . Num ( ) > 2 )
{
2018-06-07 22:39:07 -04:00
LexFromString ( ListIdx , * Args [ 2 ] ) ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
}
PrintRepListDetails ( PoolIdx , BlockIdx , ListIdx ) ;
} ) ) ;
FAutoConsoleCommand RepDriverListsDisplayDebugCmd ( TEXT ( " Net.RepGraph.Lists.DisplayDebug " ) , TEXT ( " " ) , FConsoleCommandWithArgsDelegate : : CreateLambda ( [ ] ( const TArray < FString > & Args )
{
static FDelegateHandle Handle ;
static int32 Mode = 0 ;
if ( Args . Num ( ) > 0 )
{
2018-06-07 22:39:07 -04:00
LexFromString ( Mode , * Args [ 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 ( Handle . IsValid ( ) )
{
FCoreDelegates : : OnGetOnScreenMessages . Remove ( Handle ) ;
Handle . Reset ( ) ;
}
else
{
Handle = FCoreDelegates : : OnGetOnScreenMessages . AddLambda ( [ ] ( TMultiMap < FCoreDelegates : : EOnScreenMessageSeverity , FText > & OutMessages )
{
FStringOutputDevice Str ;
Str . SetAutoEmitLineTerminator ( true ) ;
PrintRepListStatsAr ( Mode , Str ) ;
TArray < FString > Lines ;
Str . ParseIntoArrayLines ( Lines , true ) ;
for ( int32 idx = Lines . Num ( ) - 1 ; idx > = 0 ; - - idx )
{
OutMessages . Add ( FCoreDelegates : : EOnScreenMessageSeverity : : Info , FText : : FromString ( Lines [ idx ] ) ) ;
}
} ) ;
}
} ) ) ;
# endif
// --------------------------------------------------------------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------------------------------
FAutoConsoleCommand RepDriverStarvListCmd ( TEXT ( " Net.RepGraph.StarvedList " ) , TEXT ( " " ) , FConsoleCommandWithArgsDelegate : : CreateLambda ( [ ] ( const TArray < FString > & Args )
{
static FDelegateHandle Handle ;
static int32 ConnectionIdx = 0 ;
if ( Args . Num ( ) > 0 )
{
2018-06-07 22:39:07 -04:00
LexFromString ( ConnectionIdx , * Args [ 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 ( Handle . IsValid ( ) )
{
FCoreDelegates : : OnGetOnScreenMessages . Remove ( Handle ) ;
Handle . Reset ( ) ;
}
else
{
Handle = FCoreDelegates : : OnGetOnScreenMessages . AddLambda ( [ ] ( TMultiMap < FCoreDelegates : : EOnScreenMessageSeverity , FText > & OutMessages )
{
UNetDriver * BestNetDriver = nullptr ;
for ( TObjectIterator < UNetDriver > It ; It ; + + It )
{
if ( It - > NetDriverName = = NAME_GameNetDriver )
{
if ( It - > ClientConnections . Num ( ) > 0 )
{
if ( UReplicationGraph * RepGraph = Cast < UReplicationGraph > ( It - > GetReplicationDriver ( ) ) )
{
UNetConnection * Connection = It - > ClientConnections [ FMath : : Min ( ConnectionIdx , It - > ClientConnections . Num ( ) - 1 ) ] ;
for ( TObjectIterator < UNetReplicationGraphConnection > ConIt ; ConIt ; + + ConIt )
{
if ( ConIt - > NetConnection = = Connection )
{
struct FStarveStruct
{
FStarveStruct ( AActor * InActor , uint32 InStarvedCount ) : Actor ( InActor ) , StarveCount ( InStarvedCount ) { }
AActor * Actor = nullptr ;
uint32 StarveCount = 0 ;
bool operator < ( const FStarveStruct & Other ) const { return StarveCount < Other . StarveCount ; }
} ;
TArray < FStarveStruct > TheList ;
for ( auto MapIt = ConIt - > ActorInfoMap . CreateIterator ( ) ; MapIt ; + + MapIt )
{
2018-06-07 22:39:07 -04:00
TheList . Emplace ( MapIt . Key ( ) , RepGraph - > GetReplicationGraphFrame ( ) - MapIt . Value ( ) . Get ( ) - > 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
}
TheList . Sort ( ) ;
for ( int32 i = TheList . Num ( ) - 1 ; i > = 0 ; - - i )
{
OutMessages . Add ( FCoreDelegates : : EOnScreenMessageSeverity : : Info , FText : : FromString ( FString : : Printf ( TEXT ( " [%d] %s " ) , TheList [ i ] . StarveCount , * GetNameSafe ( TheList [ i ] . Actor ) ) ) ) ;
}
}
}
}
}
}
}
//
} ) ;
}
} ) ) ;
UReplicationGraph * FindReplicationGraphHelper ( )
{
UReplicationGraph * Graph = nullptr ;
for ( TObjectIterator < UReplicationGraph > It ; It ; + + It )
{
if ( It - > NetDriver & & It - > NetDriver - > GetNetMode ( ) ! = NM_Client )
{
Graph = * It ;
break ;
}
}
return Graph ;
}
// --------------------------------------------------------------------------------------------------------------------------------------------
// Graph Debugging: help log/debug the state of the Replication Graph
// --------------------------------------------------------------------------------------------------------------------------------------------
void LogGraphHelper ( FOutputDevice & Ar , const TArray < FString > & Args )
{
UReplicationGraph * Graph = nullptr ;
for ( TObjectIterator < UReplicationGraph > It ; It ; + + It )
{
if ( It - > NetDriver & & It - > NetDriver - > GetNetMode ( ) ! = NM_Client )
{
Graph = * It ;
break ;
}
}
if ( ! Graph )
{
return ;
}
FReplicationGraphDebugInfo DebugInfo ( Ar ) ;
if ( Args . FindByPredicate ( [ ] ( const FString & Str ) { return Str . Contains ( TEXT ( " nativeclass " ) ) | | Str . Contains ( TEXT ( " nclass " ) ) ; } ) )
{
DebugInfo . Flags = FReplicationGraphDebugInfo : : ShowNativeClasses ;
}
else if ( Args . FindByPredicate ( [ ] ( const FString & Str ) { return Str . Contains ( TEXT ( " class " ) ) ; } ) )
{
DebugInfo . Flags = FReplicationGraphDebugInfo : : ShowClasses ;
}
else if ( Args . FindByPredicate ( [ ] ( const FString & Str ) { return Str . Contains ( TEXT ( " num " ) ) ; } ) )
{
DebugInfo . Flags = FReplicationGraphDebugInfo : : ShowTotalCount ;
}
else
{
DebugInfo . Flags = FReplicationGraphDebugInfo : : ShowActors ;
}
2018-10-29 10:01:28 -04:00
if ( Args . FindByPredicate ( [ ] ( const FString & Str ) { return Str . Contains ( TEXT ( " empty " ) ) ; } ) )
{
DebugInfo . bShowEmptyNodes = 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
Graph - > LogGraph ( DebugInfo ) ;
}
FAutoConsoleCommand RepGraphPrintGraph ( TEXT ( " Net.RepGraph.PrintGraph " ) , TEXT ( " " ) , FConsoleCommandWithArgsDelegate : : CreateLambda ( [ ] ( const TArray < FString > & Args )
{
LogGraphHelper ( * GLog , Args ) ;
} ) ) ;
FAutoConsoleCommand RepGraphDrawGraph ( TEXT ( " Net.RepGraph.DrawGraph " ) , TEXT ( " " ) , FConsoleCommandWithArgsDelegate : : CreateLambda ( [ ] ( const TArray < FString > & InArgs )
{
static FDelegateHandle Handle ;
static TArray < FString > Args ;
Args = InArgs ;
if ( Handle . IsValid ( ) )
{
FCoreDelegates : : OnGetOnScreenMessages . Remove ( Handle ) ;
Handle . Reset ( ) ;
}
else
{
Handle = FCoreDelegates : : OnGetOnScreenMessages . AddLambda ( [ ] ( TMultiMap < FCoreDelegates : : EOnScreenMessageSeverity , FText > & OutMessages )
{
FStringOutputDevice Str ;
Str . SetAutoEmitLineTerminator ( true ) ;
LogGraphHelper ( Str , Args ) ;
TArray < FString > Lines ;
Str . ParseIntoArrayLines ( Lines , true ) ;
for ( int32 idx = 0 ; idx < Lines . Num ( ) ; + + idx )
{
OutMessages . Add ( FCoreDelegates : : EOnScreenMessageSeverity : : Info , FText : : FromString ( Lines [ idx ] ) ) ;
}
} ) ;
}
} ) ) ;
// ===========================================================================================================
void FGlobalActorReplicationInfo : : LogDebugString ( FOutputDevice & Ar ) const
{
2018-10-29 10:01:28 -04:00
Ar . Logf ( TEXT ( " LastPreReplicationFrame: %d. ForceNetUpdateFrame: %d. WorldLocation: %s. bWantsToBeDormant %d. LastFlushNetDormancyFrame: %d " ) , LastPreReplicationFrame , ForceNetUpdateFrame , * WorldLocation . ToString ( ) , bWantsToBeDormant , LastFlushNetDormancyFrame ) ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
Ar . Logf ( TEXT ( " Settings: %s " ) , * Settings . BuildDebugStringDelta ( ) ) ;
if ( DependentActorList . Num ( ) > 0 )
{
FString DependentActorStr = TEXT ( " DependentActors: " ) ;
for ( FActorRepListType Actor : DependentActorList )
{
DependentActorStr + = GetActorRepListTypeDebugString ( Actor ) + ' ' ;
}
Ar . Logf ( TEXT ( " %s " ) , * DependentActorStr ) ;
}
}
void FConnectionReplicationActorInfo : : LogDebugString ( FOutputDevice & Ar ) const
{
2019-01-24 16:00:45 -05:00
Ar . Logf ( TEXT ( " Channel: %s " ) , * ( Channel ? Channel - > Describe ( ) : TEXT ( " 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
Ar . Logf ( TEXT ( " CullDistSq: %.2f (%.2f) " ) , CullDistanceSquared , FMath : : Sqrt ( CullDistanceSquared ) ) ;
2018-11-16 14:01:06 -05:00
Ar . Logf ( TEXT ( " NextReplicationFrameNum: %d. ReplicationPeriodFrame: %d. LastRepFrameNum: %d. ActorChannelCloseFrameNum: %d. IsDormantOnConnection: %d. TearOff: %d " ) , NextReplicationFrameNum , ReplicationPeriodFrame , LastRepFrameNum , ActorChannelCloseFrameNum , bDormantOnConnection , bTearOff ) ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for 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 : : LogGraph ( FReplicationGraphDebugInfo & DebugInfo ) const
2018-10-29 10:01:28 -04:00
{
LogGlobalGraphNodes ( DebugInfo ) ;
LogConnectionGraphNodes ( DebugInfo ) ;
}
void UReplicationGraph : : LogGlobalGraphNodes ( 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
{
for ( const UReplicationGraphNode * Node : GlobalGraphNodes )
{
Node - > LogNode ( DebugInfo , Node - > GetDebugString ( ) ) ;
}
2018-10-29 10:01:28 -04:00
}
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
2018-10-29 10:01:28 -04:00
void UReplicationGraph : : LogConnectionGraphNodes ( FReplicationGraphDebugInfo & DebugInfo ) const
{
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
for ( const UNetReplicationGraphConnection * ConnectionManager : Connections )
{
DebugInfo . Log ( FString : : Printf ( TEXT ( " Connection: %s " ) , * ConnectionManager - > NetConnection - > GetPlayerOnlinePlatformName ( ) . ToString ( ) ) ) ;
DebugInfo . PushIndent ( ) ;
for ( UReplicationGraphNode * Node : ConnectionManager - > ConnectionGraphNodes )
{
Node - > LogNode ( DebugInfo , Node - > GetDebugString ( ) ) ;
}
DebugInfo . PopIndent ( ) ;
}
}
2019-01-17 11:42:07 -05:00
# if !(UE_BUILD_SHIPPING || UE_BUILD_TEST)
AReplicationGraphDebugActor * UReplicationGraph : : CreateDebugActor ( ) const
{
return GetWorld ( ) - > SpawnActor < AReplicationGraphDebugActor > ( ) ;
}
# 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 UReplicationGraphNode : : LogNode ( FReplicationGraphDebugInfo & DebugInfo , const FString & NodeName ) const
{
DebugInfo . Log ( NodeName ) ;
DebugInfo . PushIndent ( ) ;
for ( const UReplicationGraphNode * ChildNode : AllChildNodes )
{
2018-10-29 10:01:28 -04:00
if ( DebugInfo . bShowEmptyNodes = = false )
{
TArray < FActorRepListType > TempArray ;
ChildNode - > GetAllActorsInNode_Debugging ( TempArray ) ;
if ( TempArray . Num ( ) = = 0 )
{
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
ChildNode - > LogNode ( DebugInfo , ChildNode - > GetDebugString ( ) ) ;
}
DebugInfo . PopIndent ( ) ;
}
void LogActorRepList ( FReplicationGraphDebugInfo & DebugInfo , FString Prefix , const FActorRepListRefView & List )
{
if ( List . IsValid ( ) = = false | | List . Num ( ) < = 0 )
{
return ;
}
FString ActorListStr = FString : : Printf ( TEXT ( " %s [%d Actors] " ) , * Prefix , List . Num ( ) ) ;
if ( DebugInfo . Flags = = FReplicationGraphDebugInfo : : ShowActors )
{
for ( FActorRepListType Actor : List )
{
ActorListStr + = GetActorRepListTypeDebugString ( Actor ) ;
ActorListStr + = TEXT ( " " ) ;
}
}
else if ( DebugInfo . Flags = = FReplicationGraphDebugInfo : : ShowClasses | | DebugInfo . Flags = = FReplicationGraphDebugInfo : : ShowNativeClasses )
{
TMap < UClass * , int32 > ClassCount ;
for ( FActorRepListType Actor : List )
{
UClass * ActorClass = GetActorRepListTypeClass ( Actor ) ;
if ( DebugInfo . Flags = = FReplicationGraphDebugInfo : : ShowNativeClasses )
{
while ( ActorClass & & ! ActorClass - > HasAllClassFlags ( CLASS_Native ) )
{
// We lie: don't show AActor. If its blueprinted from AActor just return the blueprint class.
if ( ActorClass - > GetSuperClass ( ) = = AActor : : StaticClass ( ) )
{
break ;
}
ActorClass = ActorClass - > GetSuperClass ( ) ;
}
}
ClassCount . FindOrAdd ( ActorClass ) + + ;
}
for ( auto & MapIt : ClassCount )
{
ActorListStr + = FString : : Printf ( TEXT ( " %s:[%d] " ) , * GetNameSafe ( MapIt . Key ) , MapIt . Value ) ;
}
}
DebugInfo . Log ( ActorListStr ) ;
}
void UReplicationGraphNode_GridCell : : LogNode ( FReplicationGraphDebugInfo & DebugInfo , const FString & NodeName ) const
{
DebugInfo . Log ( NodeName ) ;
DebugInfo . PushIndent ( ) ;
2018-10-29 10:01:28 -04:00
DebugInfo . Log ( TEXT ( " Static " ) ) ;
DebugInfo . PushIndent ( ) ;
LogActorList ( DebugInfo ) ;
DebugInfo . PopIndent ( ) ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for 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 )
{
DynamicNode - > LogNode ( DebugInfo , TEXT ( " Dynamic " ) ) ;
}
if ( DormancyNode )
{
DormancyNode - > LogNode ( DebugInfo , TEXT ( " Dormant " ) ) ;
}
DebugInfo . PopIndent ( ) ;
}
void UReplicationGraphNode_TearOff_ForConnection : : LogNode ( FReplicationGraphDebugInfo & DebugInfo , const FString & NodeName ) const
{
DebugInfo . Log ( NodeName ) ;
DebugInfo . PushIndent ( ) ;
LogActorRepList ( DebugInfo , TEXT ( " TearOff " ) , ReplicationActorList ) ;
DebugInfo . PopIndent ( ) ;
}
// --------------------------------------------------------------------------------------------------------------------------------------------
// Prioritization Debugging: help log/debug
// --------------------------------------------------------------------------------------------------------------------------------------------
2018-06-07 22:39:07 -04:00
void PrintPrioritizedList ( FOutputDevice & Ar , UNetReplicationGraphConnection * ConnectionManager , FPrioritizedRepList * PrioritizedList )
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for 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 * RepGraph = ConnectionManager - > NetConnection - > Driver - > GetReplicationDriver < UReplicationGraph > ( ) ;
uint32 RepFrameNum = RepGraph - > GetReplicationGraphFrame ( ) ;
2018-06-07 22:39:07 -04:00
// Skipped 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 REPGRAPH_DETAILS
2019-04-16 19:16:18 -04:00
if ( PrioritizedList - > SkippedDebugDetails . IsValid ( ) )
2018-06-07 22:39:07 -04:00
{
2019-04-16 19:16:18 -04:00
Ar . Logf ( TEXT ( " [%d Skipped Actors] " ) , PrioritizedList - > SkippedDebugDetails - > Num ( ) ) ;
2018-06-07 22:39:07 -04:00
2019-04-16 19:16:18 -04:00
FNativeClassAccumulator DormantClasses ;
FNativeClassAccumulator CulledClasses ;
for ( const FSkippedActorFullDebugDetails & SkippedDetails : * PrioritizedList - > SkippedDebugDetails )
{
FString SkippedStr ;
if ( SkippedDetails . bWasDormant )
{
SkippedStr = TEXT ( " Dormant " ) ;
DormantClasses . Increment ( SkippedDetails . Actor - > GetClass ( ) ) ;
}
else if ( SkippedDetails . DistanceCulled > 0.f )
{
SkippedStr = FString : : Printf ( TEXT ( " Dist Culled %.2f " ) , SkippedDetails . DistanceCulled ) ;
CulledClasses . Increment ( SkippedDetails . Actor - > GetClass ( ) ) ;
}
else if ( SkippedDetails . FramesTillNextReplication > 0 )
{
SkippedStr = FString : : Printf ( TEXT ( " Not ready (%d frames left) " ) , SkippedDetails . FramesTillNextReplication ) ;
}
else
{
SkippedStr = TEXT ( " Unknown??? " ) ;
}
Ar . Logf ( TEXT ( " %-40s %s " ) , * GetActorRepListTypeDebugString ( SkippedDetails . Actor ) , * SkippedStr ) ;
}
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
Ar . Logf ( TEXT ( " Dormant Classes: %s " ) , * DormantClasses . BuildString ( ) ) ;
Ar . Logf ( TEXT ( " Culled Classes: %s " ) , * CulledClasses . BuildString ( ) ) ;
2019-04-16 19:16:18 -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
# endif
// Passed (not skipped) actors
2018-06-07 22:39:07 -04:00
Ar . Logf ( TEXT ( " [%d Passed Actors] " ) , PrioritizedList - > Items . Num ( ) ) ;
for ( const FPrioritizedRepList : : FItem & Item : PrioritizedList - > Items )
{
const FConnectionReplicationActorInfo & ActorInfo = ConnectionManager - > ActorInfoMap . FindOrAdd ( Item . Actor ) ;
2018-11-16 14:01:06 -05:00
const bool bWasStarved = ( ActorInfo . LastRepFrameNum + ActorInfo . ReplicationPeriodFrame ) < RepFrameNum ;
2018-06-07 22:39:07 -04:00
FString StarvedString = bWasStarved ? FString : : Printf ( TEXT ( " (Starved %d) " ) , RepFrameNum - ActorInfo . LastRepFrameNum ) : TEXT ( " " ) ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
# if REPGRAPH_DETAILS
2018-06-07 22:39:07 -04:00
if ( FPrioritizedActorFullDebugDetails * FullDetails = PrioritizedList - > FullDebugDetails . Get ( ) - > FindByKey ( Item . Actor ) )
{
Ar . Logf ( TEXT ( " %-40s %.4f %s %s " ) , * GetActorRepListTypeDebugString ( Item . Actor ) , Item . Priority , * FullDetails - > BuildString ( ) , * StarvedString ) ;
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
# endif
2018-06-07 22:39:07 -04:00
// Simplified version without full details
UClass * Class = Item . Actor - > GetClass ( ) ;
while ( Class & & ! Class - > IsNative ( ) )
{
Class = Class - > GetSuperClass ( ) ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
}
2018-06-07 22:39:07 -04:00
Ar . Logf ( TEXT ( " %-40s %-20s %.4f %s " ) , * GetActorRepListTypeDebugString ( Item . Actor ) , * GetNameSafe ( Class ) , Item . Priority , * StarvedString ) ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for game viewport client to OnPreLoadMap
#jira UE-58579
[CL 4051554 by Ryan Gerleve in Main branch]
2018-05-04 10:11:42 -04:00
}
2018-06-07 22:39:07 -04:00
Ar . Logf ( TEXT ( " " ) ) ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for 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 ( ) > LogPrioritizedListHelper ( FOutputDevice & Ar , const TArray < FString > & Args , bool bAutoUnregister )
{
static TWeakObjectPtr < UNetReplicationGraphConnection > WeakConnectionManager ;
static FDelegateHandle Handle ;
static TFunction < void ( ) > ResetFunc = [ ] ( )
{
if ( Handle . IsValid ( ) & & WeakConnectionManager . IsValid ( ) )
{
WeakConnectionManager - > OnPostReplicatePrioritizeLists . Remove ( Handle ) ;
}
} ;
UReplicationGraph * Graph = FindReplicationGraphHelper ( ) ;
if ( ! Graph )
{
UE_LOG ( LogReplicationGraph , Warning , TEXT ( " Could not find valid Replication Graph. " ) ) ;
return ResetFunc ;
}
static int32 ConnectionIdx = 0 ;
if ( Args . Num ( ) > 0 )
{
2018-06-07 22:39:07 -04:00
LexFromString ( ConnectionIdx , * Args [ 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 ( Graph - > Connections . IsValidIndex ( ConnectionIdx ) = = false )
{
UE_LOG ( LogReplicationGraph , Warning , TEXT ( " Invalid ConnectionIdx %d " ) , ConnectionIdx ) ;
return ResetFunc ;
}
// Reset if we already have delegates bound
ResetFunc ( ) ;
UNetReplicationGraphConnection * ConnectionManager = Graph - > Connections [ ConnectionIdx ] ;
WeakConnectionManager = ConnectionManager ;
DO_REPGRAPH_DETAILS ( ConnectionManager - > bEnableFullActorPrioritizationDetails = true ) ;
2018-06-07 22:39:07 -04:00
Handle = ConnectionManager - > OnPostReplicatePrioritizeLists . AddLambda ( [ & Ar , bAutoUnregister ] ( UNetReplicationGraphConnection * InConnectionManager , FPrioritizedRepList * 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
{
PrintPrioritizedList ( Ar , InConnectionManager , List ) ;
if ( bAutoUnregister )
{
DO_REPGRAPH_DETAILS ( InConnectionManager - > bEnableFullActorPrioritizationDetails = false ) ;
InConnectionManager - > OnPostReplicatePrioritizeLists . Remove ( Handle ) ;
}
} ) ;
return ResetFunc ;
}
FAutoConsoleCommand RepGraphPrintPrioritizedList ( TEXT ( " Net.RepGraph.PrioritizedLists.Print " ) , TEXT ( " " ) , FConsoleCommandWithArgsDelegate : : CreateLambda ( [ ] ( const TArray < FString > & Args )
{
LogPrioritizedListHelper ( * GLog , Args , true ) ;
} ) ) ;
FAutoConsoleCommand RepGraphDrawPrioritizedList ( TEXT ( " Net.RepGraph.PrioritizedLists.Draw " ) , TEXT ( " " ) , FConsoleCommandWithArgsDelegate : : CreateLambda ( [ ] ( const TArray < FString > & InArgs )
{
static FDelegateHandle Handle ;
static TArray < FString > Args ;
static FStringOutputDevice Str ;
Args = InArgs ;
Str . SetAutoEmitLineTerminator ( true ) ;
const bool bClear = InArgs . ContainsByPredicate ( [ ] ( const FString & InStr ) { return InStr . Contains ( TEXT ( " clear " ) ) ; } ) ;
if ( Handle . IsValid ( ) )
{
FCoreDelegates : : OnGetOnScreenMessages . Remove ( Handle ) ;
Handle . Reset ( ) ;
return ;
}
if ( Handle . IsValid ( ) = = false )
{
Str . Reset ( ) ;
LogPrioritizedListHelper ( Str , Args , true ) ;
Handle = FCoreDelegates : : OnGetOnScreenMessages . AddLambda ( [ ] ( TMultiMap < FCoreDelegates : : EOnScreenMessageSeverity , FText > & OutMessages )
{
TArray < FString > Lines ;
Str . ParseIntoArrayLines ( Lines , true ) ;
for ( int32 idx = 0 ; idx < Lines . Num ( ) ; + + idx )
{
OutMessages . Add ( FCoreDelegates : : EOnScreenMessageSeverity : : Info , FText : : FromString ( Lines [ idx ] ) ) ;
}
} ) ;
}
} ) ) ;
// --------------------------------------------------------------------------------------------------------------------------------------------
// Print/Logging for everything (Replication Graph, Prioritized List, Packet Budget [TODO])
// --------------------------------------------------------------------------------------------------------------------------------------------
FAutoConsoleCommand RepGraphPrintAllCmd ( TEXT ( " Net.RepGraph.PrintAll " ) , TEXT ( " " ) , FConsoleCommandWithArgsDelegate : : CreateLambda ( [ ] ( const TArray < FString > & InArgs )
{
static TWeakObjectPtr < UNetReplicationGraphConnection > WeakConnectionManager ;
static TArray < FString > Args ;
Args = InArgs ;
UReplicationGraph * Graph = FindReplicationGraphHelper ( ) ;
if ( ! Graph )
{
UE_LOG ( LogReplicationGraph , Warning , TEXT ( " Could not find valid Replication Graph. " ) ) ;
return ;
}
int32 FrameCount = 1 ;
if ( Args . Num ( ) > 0 )
{
2018-06-07 22:39:07 -04:00
LexFromString ( FrameCount , * Args [ 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
}
int32 ConnectionIdx = 0 ;
if ( Args . Num ( ) > 1 )
{
2018-06-07 22:39:07 -04:00
LexFromString ( ConnectionIdx , * Args [ 1 ] ) ;
Copying //UE4/Dev-Networking to //UE4/Dev-Main (Source: //UE4/Dev-Networking @ 4051526)
#lockdown Nick.Penwarden
#rb none
============================
MAJOR FEATURES & CHANGES
============================
Change 3809757 by Jon.Nabozny
Fixup BuildPhysx to only set up HTML5 when needed.
Change 3812325 by Jake.Leonard
Fix keyed debug messages from getting scaled to 0 and thus not appearing at all. This appears to be a bug in main as well. Only -1 keyed messages (which are handled differently) will display anything at all as the scale application was removed.
#Jira UE-53579
Change 3828032 by Jon.Nabozny
Make sure the State is set before triggering delegates in FLwsWebSocket.
Change 3837391 by John.Barrett
NetcodeUnitTest updates for better CIS/automation support.
Change 3837392 by John.Barrett
Fixed performance issue with processing piped output for large numbers of unit tests, and fixed unit test windows overlapping - plus other bugfixes.
Change 3837397 by John.Barrett
Moved a unit test to the 'Obsolete' folder.
Change 3837476 by John.Barrett
Reduced unwanted OSS-null logspam.
Change 3844506 by Jake.Leonard
Implementing missing steam leaderboard implementations. Also streamlines and fixes the friends leaderboard too.
#Jira UE-53474,UE-53475,UE-53476
Change 3844803 by Jake.Leonard
Fixing the Steam Leaderboard to allow for overwrite instead of increment.
Please see Jira for recent comments
#Jira UE-24791
Change 3844829 by Jake.Leonard
Does the following:
* Add message on the screen while the presence test is running to let users know that the test is still running.
* Remove the FUniqueNetIDString dependencies in the test
* Fix the Steam Rich Presence from having to do an unnecessary cast
#Jira UE-53066,UE-54177
Change 3851997 by Jake.Leonard
Remove one of the double steam p2p dump prints. Now the socket subsystem is the only one that prints, which will cover more cases anyways and limits the potential of duplicate prints.
Also changes the dump interval to 10s from 3s.
#Jira: UE-53763
Change 3882307 by John.Barrett
Fixed packet flooding protection, and handling of packets with errors, so that they don't delay further packet processing.
When there's an error receiving a packet, make sure the wrong/previous-packets address isn't used for logging.
Change 3882311 by John.Barrett
Restricted socket recv code from CL 3026398/3209824 to TCP, as with UDP it prevented telling the difference between the socket having no data to receive, and receiving a 0-length UDP packet.
This is important for protecting against DoS attacks.
Change 3894785 by Jake.Leonard
Fix replays not ending properly when the user goes to end their PIE instance.
#Jira UE-54488
Change 3902627 by Jake.Leonard
Fix the demo time values being incorrect if our delta would push us to the end of the replay. Since we're done, we early out of the functions before we have a chance to update the DemoCurrentTime variable. This causes issues with UI elements as it looks like the replay is not over but it actually is.
#Jira UE-54483
Change 3902632 by Jake.Leonard
Fix voice issues on seamless travel for NullOSS
#Jira UE-54899
Change 3904775 by Jake.Leonard
Properly grab the correct world context (we were sometimes grabbing the editor instead, when we wanted the PIE world). These changes will allow us to reliably end the demos. Improves the fix in 3894785.
#Jira UE-54488
Change 3968022 by Ryan.Gerleve
PR #4538: Guarantee Return Value of 0 When GetPortNo() Fails (Contributed by XenonicDev)
Change 3994505 by Jake.Leonard
Fix some shootergame minor bugs:
1. If there's no map selector UI option, just search for all maps. This fixes the only seeing Sanctuary bug (first option in the maplist)
2. Always make the server push gametype (which is just TeamDeathmatch by default)
#Jira none
Change 3999511 by Jake.Leonard
FArchive serializer for FUniqueNetIdSteam
#Jira none
Change 4014550 by Jake.Leonard
Fix Steam Dedicated Server from linking steamclient dlls, which should not be necessary.
This fix introduces a new launch argument (-force_steamclient_link) that can be used to force the steamclient link anyways for licensees who might have required this under extreme circumstances.
#Jira UE-55183
Change 4017165 by Jake.Leonard
Modification of the leaderboard test interface to add more tests as well as arbitrary rank fetches.
Command is "online test leaderboards [optional arbitrary user id for lookup]"
#Jira UE-53533
Change 4017215 by Jake.Leonard
Fix MULTIHOME returning the incorrect ip address on Linux and Android
#Jira UE-57463
Change 4024116 by Ryan.Gerleve
Fix for the transform of spawned rollback actors in replays now that gc is not guaranteed to happen between the destroy and respawn
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3876761 by Brian.Bekich on 2018/02/07 11:06:24.
Change 4024119 by Ryan.Gerleve
Better fix for replay gc changes with rollback actors - rename pending kill copy out of the way first
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877425 by Brian.Bekich on 2018/02/07 15:14:42.
Change 4024125 by Ryan.Gerleve
Allow replays to ignore rpcs while fast forwarding (demo.FastForwardIgnoreRPCs)
#jira FORT-67138
#AUTOMERGE using branch FNMain->DevNetworking of change#3877483 by Brian.Bekich on 2018/02/07 15:31:41.
Change 4024126 by Ryan.Gerleve
Save additional state of rollback actors in replays to be applied upon respawn (demo.SaveRollbackActorState)
Convert FRepState in object replicator to a shared pointer
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3877681 by Brian.Bekich on 2018/02/07 16:52:11.
Change 4024131 by Ryan.Gerleve
[+] Add -csvdemostarttime and -csvdemoendtime command line arguments to automate CSV profiles when running replays. Since these commands use the playback time of the replay, they are much more reliable than the loading screen method we used previously.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3879630 by Luke.Thatcher on 2018/02/08 14:26:01.
Change 4024155 by Ryan.Gerleve
Fixed potential null access in DemoNetDriver
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3882753 by Jeff.Farris on 2018/02/09 16:46:43.
Change 4024158 by Ryan.Gerleve
Fixup issues with Demo Recording and Playback when using Streaming Levels.
#jira FORT-65185
#AUTOMERGE using branch FNMain->DevNetworking of change#3889448 by Jon.Nabozny on 2018/02/14 13:09:22.
Change 4024164 by Ryan.Gerleve
Create Burn In for DemoRecording / Replays
#jira NONE
#AUTOMERGE using branch FNMain->DevNetworking of change#3890879 by Jon.Nabozny on 2018/02/15 01:31:47.
Change 4024176 by Ryan.Gerleve
Added DemoNetDriver::IsSavingCheckpoint.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3897504 by Jeff.Farris on 2018/02/19 12:55:37.
Change 4024178 by Ryan.Gerleve
Fix up edge cases in Replays where Actors were being destroyed inappropriately.
#jira None
#AUTOMERGE using branch FNMain->DevNetworking of change#3903472 by Jon.Nabozny on 2018/02/22 09:40:02.
Change 4024181 by Ryan.Gerleve
Support the notion of Rewindable Actors for replays. These are actors that shouldn't be destroyed during scrubbing.
#jira FORT-71396
#AUTOMERGE using branch FNMain->DevNetworking of change#3908062 by Jon.Nabozny on 2018/02/24 11:59:27.
Change 4024184 by Ryan.Gerleve
Add functions to DemoNetDriver to support testing for changes in replicated state.
Clean up RepLayout DiffProperties, support passing flags in, add a flag to include conditional properties.
#AUTOMERGE using branch FNMain->DevNetworking of change#3908132 by ryan.gerleve on 2018/02/24 16:25:20.
Change 4024194 by Ryan.Gerleve
Change a cvar to GetValueOnAnyThread
#AUTOMERGE using branch FNMain->DevNetworking of change#3910273 by ryan.gerleve on 2018/02/26 16:34:44.
Change 4024197 by Ryan.Gerleve
Replication Graph v1. This is the new system for dedicated server performance in BR. It is currently disabled by default. Other changes to engine should have no practical impact on existing behavior.
#jira nojira
Engine Changes Summary
-------------------------------------------
UNetConnection::>ActorChannels no longer public. This is to prevent code from adding/removing actor channels from underneath the ReplicationDriver.
UActorChannel::Close() returns int64 for num bits written. int64 is used because that is what FBitWriter uses.
UNetconnection::DestroyedStartupOrDormantActorGUIDs now private. Add/Remove/Reset methods are exposed. This is so RepDriver can intercept these calls (when present).
Added USimulatedClientNetConnection. Use net.SimulateConnections command to add them.
New UNetDriver::ForceNetUpdate function. Notifies replication driver that force net update was called.
UNetDriver::DestroyedStartupOrDormantActors now wraps the FActorDestructionInfo in TUniquePtr. This is so pointers to destruct infos are stable within the map and rep driver can keep track of them in its own list.
UNetDriver::GetFunctionRepLayout exposed as ENGINE_API for RepDriver use.
UNetDriver::ProcessRemoteFunction changes a bit.
-Forwards to RepDriver if present. The intention is to give RepDriver the chance to change routing logic and do its own traffic bookkeeping on the RPC.
-A new function, ProcessRemoteFunctionForChannel exists for the meat of the RPC call which RepDriver probably doesn't want to change and is free to call.
-Removed FRepLayout::SendPropertiesForRPC first UObject parameter because it was not used.
New function UNetDriver::NotifyActorDormancyChange for when actor dormancy changes.
New Functions UNetDriver::AddNetworkActor/RemoveNetworkActor. These forward to the rep driver if present.
-Really want to get rid of public access to GetNetworkObjectList() outside of net code. Doesn't seem easy without breaking backcompat.
New Function UNetDriver::NotifyActorTearOff for when tear off happens.
-bTearOff is public though. RepGraph requires the explicit TearOff() call to notify the system about tear off actors. I'm not sure how to fix this with deprecation warnings. (Keep variable public but warn if accessed)
New UNetDriver::RemoveClientConnection function should be the only place that removes ClientConnections. Forwards to RepDriver.
-Again, would like to make ClientConnections private but it is used all over the place. (Thankfully only one place removes from it).
New UNetDriver::NotifyActorFullyDormantForConnection. So RepGraph can intercept and do its book keeping.
Made UNetDriver::IsLevelInitializedForActor public.
Made UNetDriver::FlushActorDormancyInternal to hold common code that happens when Dormancy is flushed or changes.
FNetworkObjectList::FindOrAdd has optional bool parameter for if actor info was actually added.
UWorld has new delegates for when all starting actors are initialized and registered with networking.
-TODO: NavSystem and AI system should make use of this. The currently has direct function calls into them.
Moved checks for bPendingDormancy/Dormant into UActorChannel::StartBecomingDormant rather than at the callsite(s).
Added GReplicationGatherPriortizeTimeSeconds, GServerReplicateActorTimeSeconds, GReplicateActorTimeSeconds, GNumReplicateActorCalls. These are for new Replication CSV stat group (disabled by default).
FObjectReplicator::QueueRemoteFunctionBunch drops MustBeMappedGUIDs if it suppresses the RPC call. This fixes a bug that exists in both systems.
UWorld::SpawnActor now adds network actor after PostSpawnInitialize rather than prior. This is so the initial location of the actor can be used.
-Deferred actor spawning can still make this not the case, but without this change there is no chance of the actor location being correct.
-In this case, I care about this for FN building actors who do not use deferred spawning.
Added STAT_NetServerGatherPrioritizeRepActorsTime which is the total Server Rep Actor time minus the time spent in ReplicateActor.
-Removed STAT_NumRelevantActors because it made no sense (set to whatever connection repped last).
-STAT_NumReplicatedActors now sum of replicated actors on all connections for the frame.
-STAT_NumReplicatedActorBytes now sum of replicated property bytes on all connections per frame. Does not track package map guid bytes.
-FRepLayout BuildSharedSerializationForRPC/ClearSharedSerializationForRPC exposed as ENGINE_API for RepGraph to use.
Non Networking Engine Changes:
Added optional RenderColor parameter to K2_DrawBox.
ULevel::HasVisibilityChangeRequestPending and ULevel::IsNetActor exposed as ENGINE_API so ReplicationGraph module can call it.
Added AHUD::OnHUDPostRender callback for easier debug huds that don't revolve around players or debug actor targets.
#AUTOMERGE using branch FNMain->DevNetworking of change#3914530 by david.ratti on 2018/02/28 10:53:10.
Change 4024210 by Ryan.Gerleve
DemoNetDriver properly unreadies level status in OnLevelRemovedFromWorld.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3919218 by ryan.gerleve on 2018/03/01 18:50:11.
Change 4024213 by Ryan.Gerleve
UDemoNetDriver now properly associates actor channel close bunches with the actor's level. Fixes ensures & asserts that were occurring during replay playback due to trying to handle these channel closes while the level was streamed out.
Moved the check for IsRecording in the ConditionallyCreatePacketManager functions to an if, since the check can now be triggered while the demo net driver is shutting down.
#jira FORT-71916
#AUTOMERGE using branch FNMain->DevNetworking of change#3919321 by ryan.gerleve on 2018/03/01 19:26:43.
Change 4024217 by Ryan.Gerleve
Fix for placed actors not respawning in some cases when scrubbing in a replay: don't add startup actors that are destroyed due to level streaming out to a replay checkpoint's destroyed actor list. Added some verbose (off by default) logging to help detect these cases.
#jira FORT-73939
#AUTOMERGE using branch FNMain->DevNetworking of change#3923164 by ryan.gerleve on 2018/03/03 11:19:37.
Change 4024310 by Ryan.Gerleve
Replication Graph:
* Fix issue with dormancy node not fully reseting when spatialization grid is rebuilt
* Improved some logging when failures do happen
* Added Net.RepGraph.Spatial.BiasCreep cvar to force spatial rebuild every frame
* Added blacklist of classes that can never cause a spatial rebuild.
* Fixed issue with dynamic actors changing cull distances dynamically.
* Removed unused rep graph node.
#jira none
#AUTOMERGE using branch FNMain->DevNetworking of change#3931497 by david.ratti on 2018/03/07 11:58:14.
Change 4024316 by Ryan.Gerleve
Replication Graph
-Fix issue where dependant actor channels could stay open
-Fix global actor channel timeout property to actually be used
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3933936 by david.ratti on 2018/03/08 08:22:35.
Change 4024365 by Ryan.Gerleve
Added some debug functions: Net.RepGraph.PrintAllActorInfo, FortRepGraph.PrintRouting
Minor cleanup, additional comments
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3936644 by David.Ratti on 2018/03/09 11:13:37.
Change 4024369 by Ryan.Gerleve
Fix repgraph crash with certain spawned actors
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3937302 by David.Ratti on 2018/03/09 15:03:02.
Change 4024382 by Ryan.Gerleve
Initial work for high priority RPCs. This will allow damage RPCs to be sent immediately at the top of a frame rather than at the end. Currently disabled while testing.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3944887 by David.Ratti on 2018/03/14 10:01:35.
Change 4024384 by Ryan.Gerleve
#UE4 Explicitly discarding the ReplicationDriver in UNetDriver::Shutdown. Fixes a crash when shutting down a net driver when the replication graph object is listening to delegates.
#jira nojira
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3946884 by Bob.Tellez on 2018/03/14 22:03:36.
Change 4024391 by Ryan.Gerleve
GameplayDebugger support for ReplicationGraph. AGameplayDebuggerCategoryReplicator will start replicating once a replication owner is set on it.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3949584 by David.Ratti on 2018/03/16 08:36:01.
Change 4024394 by Ryan.Gerleve
Fix crash in rep graph when spatialization gets rebuilt while dormancy actors were in a particular state.
Dormancy nodes still had delegates registered for their contained actors. Though they dumped the list of actors, they would still get notification when the actors' dormancy changed which would cause them to readd the actors some times. If these nodes overlapped between rebuilds, actors could get readded to the same node twice which ultimately leads to them not being fully removed when they do get destroyed, and garbage AActor* trying to replicate. Net.RepGraph.Verify can catch these problems.
To fix, we are going to MarkPendingKill the GridCell nodes rather than keeping them around and just reseting their actor lists. They will get recreated as needed.
They could have also manually unregistered each of their delegates but this is more complicated and probably performs worse overall (though spatial rebuild is rare/should never really happen in a real game). Just marking the uobject pending kill will suppress the delegate callbacks to the nodes.
#jira FORT-76555
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3952558 by David.Ratti on 2018/03/19 09:19:09.
Change 4024395 by Ryan.Gerleve
RepGraph was not "undormatizing" actors when streaming levels were reloaded like legacy was.
#jira FORT-76729
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3959632 by david.ratti on 2018/03/22 12:51:19.
Change 4024398 by Ryan.Gerleve
Fix for dormant actors not opening actor channel for multicast rpcs in some cases. Use the global cull distance rather than the per-connection which is cleaered for dormancy trickle.
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3960888 by david.ratti on 2018/03/22 19:23:00.
Change 4024402 by Ryan.Gerleve
Fix dormant actors being instant destroyed not playing their death gameplay cue
#jira FORT-76101
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3965842 by david.ratti on 2018/03/26 17:23:31.
Change 4024403 by Ryan.Gerleve
More robust fix for rep graph having multiple channels for the same actor open simulataneously. Guarded behind CVar_RepGraph_FixDuplicateChannels.
Add a replication driver hook for UActorChannel::CleanUp.
Don't replicate actors or RPCs if the channel is closing.
Don't clear the channel pointer on FConnectionReplicationActorInfo as soon as the channel closes, but wait until it's cleaned up to either clear the channel if the actor's dormant or remove the actor info from the map completely otherwise.
Fixed missing include in ReplicationGraphDebugging.
#jira FORT-77769
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3975732 by ryan.gerleve on 2018/03/30 16:03:25.
Change 4024415 by Ryan.Gerleve
Fix potential actor channel churning by making sure the close frame num is never lowered. This could happen for short-lived dependant actors.
Removed CVar_RepGraph_FixDuplicateChannels: we definitely need this behavior to always be on.
#jira FORT-79292
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3980479 by david.ratti on 2018/04/03 08:25:53.
Change 4024419 by Ryan.Gerleve
Enable Net.RepGraph.EnableRPCSendPolicy by default. This makes damage/weapon firing RPCs be flushed immediately rather than at the end of the frame, resulting in less latency between clients while shooting.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981390 by david.ratti on 2018/04/03 13:24:34.
Change 4024423 by Ryan.Gerleve
enable Replication csv category by default (when CSV profiling is enabled) on server builds
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3981553 by david.ratti on 2018/04/03 14:04:38.
Change 4024424 by Ryan.Gerleve
Replication Graph. These are mostly for engine related purposes/cleanup.
-Don't remove TornOff actors from rep graph when they are destroyed. They are removed when they are torn off already. Fixes benign log warnings.
-When an actor causes spatialization rebuild, set the bias such that the actor is in the middle of new cell. This mitigates the issue where spatialization would be rebuilt every frame once an actor moves "away from the grid".
-When rebuilding spatilization, force garbage collection after tearing down old nodes. This is to mitigate OOMs. You are already going to hitch because of the rebuild anyways.
-Removed some dead/debug code that isnt needed.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3984296 by David.Ratti on 2018/04/04 12:52:54.
Change 4024427 by Ryan.Gerleve
Allow setting thresholds for actor replication frequency buckets to help balance them out if too many actors end up in one bucket.
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3990318 by david.ratti on 2018/04/06 14:47:58.
Change 4024475 by Ryan.Gerleve
Const-corrected a few parameters
#jira none
#AUTOMERGE using branch FortniteMainEngine_to_DevNetworkingEngine of change#3904240 by Ryan.Gerleve on 2018/02/22 15:18:50.
Change 4030975 by Jake.Leonard
Fixing Linux configs to move the proper configs into the right files.
#Jira none
Change 4031710 by Jake.Leonard
Implementation #3 of Steam Auth:
Features:
----------------
* Most of stuff from Implementation #2
* Blocks users from progressing unless they pass valid keys to the auth system
* Overrides for licensees to change the behavior
* Requires little to no configs
* Has no P2P mesh support
#Jira UE-10686, UE-50441, UE-50444
Change 4034520 by David.Ratti
Spot edit rep graph fixes from FN
-Fix issue where actor channel is created to queue an unreliable rpc, but then times out before actor is returned from rep graph pull. (update time out frame when queueing the rpc)
-Fix issue where we weren't properly handling DORM_Never when trying to detect dormancy changes.
Change 4037513 by Jon.Nabozny
Fixup some misused clamps reported by users.
Change 4042569 by Brian.Bekich
Add sample repgraph implementation to ShooterGame
#jira UENET-879
Change 4046889 by Brian.Bekich
- Rep graph and nodes now share the graph globals
- Fix rep graph world not being updated when using seamless travel
- Set ShooterSpectatorPawn to not replicate by default to fix rep graph spam
- Move ShooterPickup actors to the static spatialized list
#jira UE-58540
Change 4048648 by Ryan.Gerleve
Change replication driver warning to log.
#jira UE-58578
Change 4048939 by Brian.Bekich
Adding null check for 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 ( Graph - > Connections . IsValidIndex ( ConnectionIdx ) = = false )
{
UE_LOG ( LogReplicationGraph , Warning , TEXT ( " Invalid ConnectionIdx %d " ) , ConnectionIdx ) ;
return ;
}
UNetReplicationGraphConnection * ConnectionManager = Graph - > Connections [ ConnectionIdx ] ;
TSharedPtr < FDelegateHandle > Handle = MakeShareable < FDelegateHandle > ( new FDelegateHandle ( ) ) ;
TSharedPtr < int32 > FrameCountPtr = MakeShareable < int32 > ( new int32 ) ;
* FrameCountPtr = FrameCount ;
DO_REPGRAPH_DETAILS ( ConnectionManager - > bEnableFullActorPrioritizationDetails = true ) ;
2018-06-07 22:39:07 -04:00
* Handle = ConnectionManager - > OnPostReplicatePrioritizeLists . AddLambda ( [ Handle , FrameCountPtr , Graph ] ( UNetReplicationGraphConnection * InConnectionManager , FPrioritizedRepList * 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
{
GLog - > Logf ( TEXT ( " " ) ) ;
GLog - > Logf ( TEXT ( " ==================================================== " ) ) ;
GLog - > Logf ( TEXT ( " Replication Frame %d " ) , Graph - > GetReplicationGraphFrame ( ) ) ;
GLog - > Logf ( TEXT ( " ==================================================== " ) ) ;
LogGraphHelper ( * GLog , Args ) ;
PrintPrioritizedList ( * GLog , InConnectionManager , List ) ;
if ( * FrameCountPtr > = 0 )
{
if ( - - * FrameCountPtr < = 0 )
{
DO_REPGRAPH_DETAILS ( InConnectionManager - > bEnableFullActorPrioritizationDetails = false ) ;
InConnectionManager - > OnPostReplicatePrioritizeLists . Remove ( * Handle ) ;
}
}
} ) ;
} ) ) ;
// --------------------------------------------------------------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------------------------------------------