This repository has been archived by the owner on Aug 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 142
Fix player movement when on zoned servers #1235
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
improbable-prow-robot
added
jira/no-ticket
Indicates a PR has no corresponding JIRA ticket
size/M
Denotes a PR that changes 40-149 lines, ignoring generated files.
labels
Jul 29, 2019
m-samiec
reviewed
Jul 29, 2019
@@ -769,6 +769,13 @@ int32 USpatialNetDriver::ServerReplicateActors_PrepConnections(const float Delta | |||
|
|||
int32 USpatialNetDriver::ServerReplicateActors_PrioritizeActors(UNetConnection* InConnection, const TArray<FNetViewer>& ConnectionViewers, const TArray<FNetworkObjectInfo*> ConsiderList, const bool bCPUSaturated, FActorPriority*& OutPriorityList, FActorPriority**& OutPriorityActors) | |||
{ | |||
// Since this function signature is copied from NetworkDriver.cpp, I don't want to change the signature. But we expect |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
m-samiec
reviewed
Jul 29, 2019
m-samiec
approved these changes
Jul 29, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice cleanup!
yumnuska
commented
Jul 29, 2019
@@ -977,7 +991,7 @@ void USpatialNetDriver::ServerReplicateActors_ProcessPrioritizedActors(UNetConne | |||
continue; | |||
} | |||
|
|||
Channel = CreateSpatialActorChannel(Actor, Cast<USpatialNetConnection>(InConnection)); | |||
Channel = GetOrCreateSpatialActorChannel(Actor); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the change that fixes the root cause.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
jira/no-ticket
Indicates a PR has no corresponding JIRA ticket
size/M
Denotes a PR that changes 40-149 lines, ignoring generated files.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fix player movement on zoned servers (UNR-1820).
The symptom fixed by this PR was that, on a zoned deployment, one or more players would occasionally not have control of their player after joining a session. This was because the player movement component was not initialized, which is further caused by the client not processing the ClientRestart RPC.
The root cause is that the sending worker had two channels for the Actor for the RPC, and was checking the incorrect channel to determine if the channel is ready to receive RPCs.
Also made some changes to validate preconditions for private functions and avoid creation without first checking for existence of a channel.
Release note
In CHANGELOG.md
Tests
Run a deployment with multiple server workers and clients.