Fixes to sending entity updates and entity rpcs within an environment set up for cross host entity migration

Signed-off-by: kberg-amzn <karlberg@amazon.com>
This commit is contained in:
kberg-amzn
2021-09-28 19:25:04 -07:00
parent 0a829f9661
commit 02bc89cd92
21 changed files with 185 additions and 134 deletions
@@ -38,7 +38,7 @@ namespace Multiplayer
// we sort lowest priority first, so that we can easily keep the biggest N priorities
using ReplicationCandidateQueue = AZStd::priority_queue<PrioritizedReplicationCandidate>;
ServerToClientReplicationWindow(NetworkEntityHandle controlledEntity, const AzNetworking::IConnection* connection);
ServerToClientReplicationWindow(NetworkEntityHandle controlledEntity, AzNetworking::IConnection* connection);
//! IReplicationWindow interface
//! @{
@@ -47,6 +47,8 @@ namespace Multiplayer
uint32_t GetMaxProxyEntityReplicatorSendCount() const override;
bool IsInWindow(const ConstNetworkEntityHandle& entityPtr, NetEntityRole& outNetworkRole) const override;
void UpdateWindow() override;
AzNetworking::PacketId SendEntityUpdateMessages(NetworkEntityUpdateVector& entityUpdateVector) override;
void SendEntityRpcs(NetworkEntityRpcVector& entityRpcVector, bool reliable) override;
void DebugDraw() const override;
//! @}
@@ -75,7 +77,7 @@ namespace Multiplayer
//NetBindComponent* m_controlledNetBindComponent = nullptr;
const AzNetworking::IConnection* m_connection = nullptr;
AzNetworking::IConnection* m_connection = nullptr;
// Cached values to detect a poor network connection
uint32_t m_lastCheckedSentPackets = 0;