Various local prediction and input processing related fixes

This commit is contained in:
karlberg
2021-05-15 15:10:17 -07:00
parent 61c24ee265
commit c6ea0c0a46
13 changed files with 78 additions and 74 deletions
@@ -102,7 +102,8 @@ namespace Multiplayer
AZ::TimeMs m_lastInputReceivedTimeMs = AZ::TimeMs{ 0 };
AZ::TimeMs m_lastCorrectionSentTimeMs = AZ::TimeMs{ 0 };
ClientInputId m_clientInputId = ClientInputId{ 0 };
ClientInputId m_clientInputId = ClientInputId{ 0 }; // Clients incrementing inputId
ClientInputId m_lastClientInputId = ClientInputId{ 0 }; // Last inputId processed by the server
ClientInputId m_lastCorrectionInputId = ClientInputId{ 0 };
ClientInputId m_lastMigratedInputId = ClientInputId{ 0 }; // Used to resend inputs that were queued during a migration event
HostFrameId m_serverMigrateFrameId = InvalidHostFrameId;
@@ -71,6 +71,7 @@ namespace Multiplayer
NetworkEntityHandle GetEntityHandle();
void MarkDirty();
virtual void SetOwningConnectionId(AzNetworking::ConnectionId connectionId) = 0;
virtual NetComponentId GetNetComponentId() const = 0;
virtual bool HandleRpcMessage(AzNetworking::IConnection* invokingConnection, NetEntityRole netEntityRole, NetworkEntityRpcMessage& rpcMessage) = 0;
@@ -72,6 +72,7 @@ namespace Multiplayer
ConstNetworkEntityHandle GetEntityHandle() const;
NetworkEntityHandle GetEntityHandle();
void SetOwningConnectionId(AzNetworking::ConnectionId connectionId);
void SetAllowAutonomy(bool value);
MultiplayerComponentInputVector AllocateComponentInputs();
bool IsProcessingInput() const;