Various bug fixes to get entity replication working

This commit is contained in:
karlberg
2021-04-13 20:24:08 -07:00
parent 7b3b1cd73e
commit ca3df5d6c8
29 changed files with 495 additions and 137 deletions
@@ -202,8 +202,7 @@ namespace Multiplayer
void ServerToClientReplicationWindow::OnEntityActivated(const AZ::EntityId& entityId)
{
AZ::Entity* entity = nullptr;
EBUS_EVENT_RESULT(entity, AZ::ComponentApplicationBus, FindEntity, entityId);
AZ::Entity* entity = AZ::Interface<AZ::ComponentApplicationRequests>::Get()->FindEntity(entityId);
ConstNetworkEntityHandle entityHandle(entity, GetNetworkEntityTracker());
NetBindComponent* netBindComponent = entityHandle.GetNetBindComponent();
@@ -234,8 +233,7 @@ namespace Multiplayer
void ServerToClientReplicationWindow::OnEntityDeactivated(const AZ::EntityId& entityId)
{
AZ::Entity* entity = nullptr;
EBUS_EVENT_RESULT(entity, AZ::ComponentApplicationBus, FindEntity, entityId);
AZ::Entity* entity = AZ::Interface<AZ::ComponentApplicationRequests>::Get()->FindEntity(entityId);
ConstNetworkEntityHandle entityHandle(entity, GetNetworkEntityTracker());
NetBindComponent* netBindComponent = entityHandle.GetNetBindComponent();