Several updates to complete rewind support and remove unneeded functionality

This commit is contained in:
karlberg
2021-05-19 13:27:24 -07:00
parent e0ea9e6224
commit 487e989e68
20 changed files with 267 additions and 270 deletions
@@ -154,12 +154,18 @@ namespace Multiplayer
void NetBindComponent::SetOwningConnectionId(AzNetworking::ConnectionId connectionId)
{
m_owningConnectionId = connectionId;
for (MultiplayerComponent* multiplayerComponent : m_multiplayerInputComponentVector)
{
multiplayerComponent->SetOwningConnectionId(connectionId);
}
}
AzNetworking::ConnectionId NetBindComponent::GetOwningConnectionId() const
{
return m_owningConnectionId;
}
void NetBindComponent::SetAllowAutonomy(bool value)
{
// This flag allows a player host to autonomously control their player entity, even though the entity is in an authority role
@@ -290,6 +296,11 @@ namespace Multiplayer
m_localNotificationRecord.Clear();
}
void NetBindComponent::NotifySyncRewindState()
{
m_syncRewindEvent.Signal();
}
void NetBindComponent::NotifyMigrationStart(ClientInputId migratedInputId)
{
m_entityMigrationStartEvent.Signal(migratedInputId);
@@ -315,6 +326,11 @@ namespace Multiplayer
eventHandler.Connect(m_dirtiedEvent);
}
void NetBindComponent::AddEntitySyncRewindEventHandler(EntitySyncRewindEvent::Handler& eventHandler)
{
eventHandler.Connect(m_syncRewindEvent);
}
void NetBindComponent::AddEntityMigrationStartEventHandler(EntityMigrationStartEvent::Handler& eventHandler)
{
eventHandler.Connect(m_entityMigrationStartEvent);