NullReplicationWindow.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. #pragma once
  9. #include <Multiplayer/ReplicationWindows/IReplicationWindow.h>
  10. #include <AzNetworking/ConnectionLayer/IConnection.h>
  11. namespace Multiplayer
  12. {
  13. class NullReplicationWindow
  14. : public IReplicationWindow
  15. {
  16. public:
  17. NullReplicationWindow(AzNetworking::IConnection* connection);
  18. //! IReplicationWindow interface
  19. //! @{
  20. bool ReplicationSetUpdateReady() override;
  21. const ReplicationSet& GetReplicationSet() const override;
  22. uint32_t GetMaxProxyEntityReplicatorSendCount() const override;
  23. bool IsInWindow(const ConstNetworkEntityHandle& entityPtr, NetEntityRole& outNetworkRole) const override;
  24. bool AddEntity(AZ::Entity* entity) override;
  25. void RemoveEntity(AZ::Entity* entity) override;
  26. void UpdateWindow() override;
  27. AzNetworking::PacketId SendEntityUpdateMessages(NetworkEntityUpdateVector& entityUpdateVector) override;
  28. void SendEntityRpcs(NetworkEntityRpcVector& entityRpcVector, bool reliable) override;
  29. void SendEntityResets(const NetEntityIdSet& resetIds) override;
  30. void DebugDraw() const override;
  31. //! @}
  32. private:
  33. ReplicationSet m_emptySet;
  34. AzNetworking::IConnection* m_connection = nullptr;
  35. };
  36. }