Fixed removal of player's prefab on disconnect

This commit is contained in:
AMZN-Olex
2021-06-21 15:53:33 -04:00
parent 44d8e7b804
commit fcbec8c202
4 changed files with 18 additions and 17 deletions
@@ -11,6 +11,7 @@
*/
#include <Source/ConnectionData/ServerToClientConnectionData.h>
#include <Multiplayer/IMultiplayer.h>
namespace Multiplayer
{
@@ -44,6 +45,8 @@ namespace Multiplayer
ServerToClientConnectionData::~ServerToClientConnectionData()
{
AZ::Interface<IMultiplayer>::Get()->GetNetworkEntityManager()->MarkForRemoval(m_controlledEntity);
m_entityReplicationManager.Clear(false);
m_controlledEntityRemovedHandler.Disconnect();
}