NullEntityDomain.cpp 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #include <Source/EntityDomains/NullEntityDomain.h>
  9. #include <Multiplayer/IMultiplayer.h>
  10. #include <AzCore/Console/ILogger.h>
  11. namespace Multiplayer
  12. {
  13. void NullEntityDomain::SetAabb([[maybe_unused]] const AZ::Aabb& aabb)
  14. {
  15. ; // Do nothing, by definition we own everything
  16. }
  17. const AZ::Aabb& NullEntityDomain::GetAabb() const
  18. {
  19. static AZ::Aabb nullAabb = AZ::Aabb::CreateNull();
  20. return nullAabb;
  21. }
  22. bool NullEntityDomain::IsInDomain([[maybe_unused]] const ConstNetworkEntityHandle& entityHandle) const
  23. {
  24. return false;
  25. }
  26. void NullEntityDomain::HandleLossOfAuthoritativeReplicator([[maybe_unused]] const ConstNetworkEntityHandle& entityHandle)
  27. {
  28. AZLOG_ERROR("Timed out entity id %llu during migration, marking for removal", aznumeric_cast<AZ::u64>(entityHandle.GetNetEntityId()));
  29. GetNetworkEntityManager()->MarkForRemoval(entityHandle);
  30. }
  31. void NullEntityDomain::DebugDraw() const
  32. {
  33. ;
  34. }
  35. }