|
|
|
@ -22,6 +22,9 @@
|
|
|
|
#include <AzCore/Serialization/EditContext.h>
|
|
|
|
#include <AzCore/Serialization/EditContext.h>
|
|
|
|
#include <AzCore/std/sort.h>
|
|
|
|
#include <AzCore/std/sort.h>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AZ_CVAR(bool, bg_AssertNetBindOnDeactivationWithoutMarkForRemoval, false, nullptr, AZ::ConsoleFunctorFlags::Null,
|
|
|
|
|
|
|
|
"If true, assert when a multiplayer entity is deactivated without first calling MarkForRemoval from NetworkEntityManager.");
|
|
|
|
|
|
|
|
|
|
|
|
namespace Multiplayer
|
|
|
|
namespace Multiplayer
|
|
|
|
{
|
|
|
|
{
|
|
|
|
void NetBindComponent::Reflect(AZ::ReflectContext* context)
|
|
|
|
void NetBindComponent::Reflect(AZ::ReflectContext* context)
|
|
|
|
@ -166,11 +169,14 @@ namespace Multiplayer
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NetBindComponent::Deactivate()
|
|
|
|
void NetBindComponent::Deactivate()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (bg_AssertNetBindOnDeactivationWithoutMarkForRemoval)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
AZ_Assert(
|
|
|
|
AZ_Assert(
|
|
|
|
m_needsToBeStopped == false,
|
|
|
|
m_needsToBeStopped == false,
|
|
|
|
"Entity (%s) appears to have been improperly deleted. Use MarkForRemoval to correctly clean up a networked entity.",
|
|
|
|
"Entity (%s) appears to have been improperly deleted. Use MarkForRemoval to correctly clean up a networked entity.",
|
|
|
|
GetEntity() ? GetEntity()->GetName().c_str() : "null");
|
|
|
|
GetEntity() ? GetEntity()->GetName().c_str() : "null");
|
|
|
|
|
|
|
|
}
|
|
|
|
m_handleLocalServerRpcMessageEventHandle.Disconnect();
|
|
|
|
m_handleLocalServerRpcMessageEventHandle.Disconnect();
|
|
|
|
if (NetworkRoleHasController(m_netEntityRole))
|
|
|
|
if (NetworkRoleHasController(m_netEntityRole))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|