Merge pull request #727 from aws-lumberyard-dev/MultiplayerComponents
Some cleanup to better support backward reconciliation as well as dynamic player spawning on connect
This commit is contained in:
@@ -1216,7 +1216,7 @@ bool CSystem::InitShine([[maybe_unused]] const SSystemInitParams& initParams)
|
||||
|
||||
if (!m_env.pLyShine)
|
||||
{
|
||||
AZ_Error(AZ_TRACE_SYSTEM_WINDOW, false, "LYShine System did not initialize correctly. Please check that the LyShine gem is enabled for this project in ProjectConfigurator.");
|
||||
AZ_Error(AZ_TRACE_SYSTEM_WINDOW, false, "LYShine System did not initialize correctly. Please check that the LyShine gem is enabled for this project in *_dependencies.cmake.");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Include/INetworkEntityManager.h>
|
||||
#include <Multiplayer/INetworkEntityManager.h>
|
||||
#include <AzNetworking/ConnectionLayer/IConnection.h>
|
||||
|
||||
namespace Multiplayer
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Include/INetworkEntityManager.h>
|
||||
#include <Multiplayer/INetworkEntityManager.h>
|
||||
|
||||
namespace Multiplayer
|
||||
{
|
||||
+75
-7
@@ -15,8 +15,9 @@
|
||||
#include <AzCore/RTTI/RTTI.h>
|
||||
#include <AzNetworking/ConnectionLayer/IConnection.h>
|
||||
#include <AzNetworking/DataStructures/ByteBuffer.h>
|
||||
#include <Include/INetworkTime.h>
|
||||
#include <Include/MultiplayerStats.h>
|
||||
#include <Multiplayer/INetworkEntityManager.h>
|
||||
#include <Multiplayer/INetworkTime.h>
|
||||
#include <Multiplayer/MultiplayerStats.h>
|
||||
|
||||
namespace AzNetworking
|
||||
{
|
||||
@@ -46,6 +47,7 @@ namespace Multiplayer
|
||||
using ConnectionAcquiredEvent = AZ::Event<MultiplayerAgentDatum>;
|
||||
using SessionInitEvent = AZ::Event<AzNetworking::INetworkInterface*>;
|
||||
using SessionShutdownEvent = AZ::Event<AzNetworking::INetworkInterface*>;
|
||||
using OnConnectFunctor = AZStd::function<NetworkEntityHandle(AzNetworking::IConnection*, MultiplayerAgentDatum)>;
|
||||
|
||||
//! IMultiplayer provides insight into the Multiplayer session and its Agents
|
||||
class IMultiplayer
|
||||
@@ -55,26 +57,30 @@ namespace Multiplayer
|
||||
|
||||
virtual ~IMultiplayer() = default;
|
||||
|
||||
//! Gets the type of Agent this IMultiplayer impl represents
|
||||
//! Gets the type of Agent this IMultiplayer impl represents.
|
||||
//! @return The type of agents represented
|
||||
virtual MultiplayerAgentType GetAgentType() const = 0;
|
||||
|
||||
//! Sets the type of this Multiplayer connection and calls any related callback
|
||||
//! Sets the type of this Multiplayer connection and calls any related callback.
|
||||
//! @param state The state of this connection
|
||||
virtual void InitializeMultiplayer(MultiplayerAgentType state) = 0;
|
||||
|
||||
//! Adds a ConnectionAcquiredEvent Handler which is invoked when a new endpoint connects to the session
|
||||
//! Adds a ConnectionAcquiredEvent Handler which is invoked when a new endpoint connects to the session.
|
||||
//! @param handler The SessionInitEvent Handler to add
|
||||
virtual void AddConnectionAcquiredHandler(ConnectionAcquiredEvent::Handler& handler) = 0;
|
||||
|
||||
//! Adds a SessionInitEvent Handler which is invoked when a new network session starts
|
||||
//! Adds a SessionInitEvent Handler which is invoked when a new network session starts.
|
||||
//! @param handler The SessionInitEvent Handler to add
|
||||
virtual void AddSessionInitHandler(SessionInitEvent::Handler& handler) = 0;
|
||||
|
||||
//! Adds a SessionShutdownEvent Handler which is invoked when the current network session ends
|
||||
//! Adds a SessionShutdownEvent Handler which is invoked when the current network session ends.
|
||||
//! @param handler The SessionShutdownEvent handler to add
|
||||
virtual void AddSessionShutdownHandler(SessionShutdownEvent::Handler& handler) = 0;
|
||||
|
||||
//! Overrides the default connect behaviour with the provided functor.
|
||||
//! @param functor the function to invoke during a new connection event
|
||||
virtual void SetOnConnectFunctor(const OnConnectFunctor& functor) = 0;
|
||||
|
||||
//! Sends a packet telling if entity update messages can be sent
|
||||
//! @param readyForEntityUpdates Ready for entity updates or not
|
||||
virtual void SendReadyForEntityUpdates(bool readyForEntityUpdates) = 0;
|
||||
@@ -87,6 +93,14 @@ namespace Multiplayer
|
||||
//! @return the current server time in milliseconds
|
||||
virtual AZ::TimeMs GetCurrentHostTimeMs() const = 0;
|
||||
|
||||
//! Returns the network time instance bound to this multiplayer instance.
|
||||
//! @return pointer to the network time instance bound to this multiplayer instance
|
||||
virtual INetworkTime* GetNetworkTime() = 0;
|
||||
|
||||
//! Returns the network entity manager instance bound to this multiplayer instance.
|
||||
//! @return pointer to the network entity manager instance bound to this multiplayer instance
|
||||
virtual INetworkEntityManager* GetNetworkEntityManager() = 0;
|
||||
|
||||
//! Returns the gem name associated with the provided component index.
|
||||
//! @param netComponentId the componentId to return the gem name of
|
||||
//! @return the name of the gem that contains the requested component
|
||||
@@ -117,6 +131,60 @@ namespace Multiplayer
|
||||
MultiplayerStats m_stats;
|
||||
};
|
||||
|
||||
// Convenience helpers
|
||||
inline IMultiplayer* GetMultiplayer()
|
||||
{
|
||||
return AZ::Interface<IMultiplayer>::Get();
|
||||
}
|
||||
|
||||
inline INetworkEntityManager* GetNetworkEntityManager()
|
||||
{
|
||||
IMultiplayer* multiplayer = GetMultiplayer();
|
||||
return (multiplayer != nullptr) ? multiplayer->GetNetworkEntityManager() : nullptr;
|
||||
}
|
||||
|
||||
inline NetworkEntityTracker* GetNetworkEntityTracker()
|
||||
{
|
||||
INetworkEntityManager* networkEntityManager = GetNetworkEntityManager();
|
||||
return (networkEntityManager != nullptr) ? networkEntityManager->GetNetworkEntityTracker() : nullptr;
|
||||
}
|
||||
|
||||
inline NetworkEntityAuthorityTracker* GetNetworkEntityAuthorityTracker()
|
||||
{
|
||||
INetworkEntityManager* networkEntityManager = GetNetworkEntityManager();
|
||||
return (networkEntityManager != nullptr) ? networkEntityManager->GetNetworkEntityAuthorityTracker() : nullptr;
|
||||
}
|
||||
|
||||
inline MultiplayerComponentRegistry* GetMultiplayerComponentRegistry()
|
||||
{
|
||||
INetworkEntityManager* networkEntityManager = GetNetworkEntityManager();
|
||||
return (networkEntityManager != nullptr) ? networkEntityManager->GetMultiplayerComponentRegistry() : nullptr;
|
||||
}
|
||||
|
||||
//! @class ScopedAlterTime
|
||||
//! @brief This is a wrapper that temporarily adjusts global program time for backward reconciliation purposes.
|
||||
class ScopedAlterTime final
|
||||
{
|
||||
public:
|
||||
inline ScopedAlterTime(HostFrameId frameId, AZ::TimeMs timeMs, AzNetworking::ConnectionId connectionId)
|
||||
{
|
||||
INetworkTime* time = GetNetworkTime();
|
||||
m_previousHostFrameId = time->GetHostFrameId();
|
||||
m_previousHostTimeMs = time->GetHostTimeMs();
|
||||
m_previousRewindConnectionId = time->GetRewindingConnectionId();
|
||||
time->AlterTime(frameId, timeMs, connectionId);
|
||||
}
|
||||
inline ~ScopedAlterTime()
|
||||
{
|
||||
INetworkTime* time = GetNetworkTime();
|
||||
time->AlterTime(m_previousHostFrameId, m_previousHostTimeMs, m_previousRewindConnectionId);
|
||||
}
|
||||
private:
|
||||
HostFrameId m_previousHostFrameId = InvalidHostFrameId;
|
||||
AZ::TimeMs m_previousHostTimeMs = AZ::TimeMs{ 0 };
|
||||
AzNetworking::ConnectionId m_previousRewindConnectionId = AzNetworking::InvalidConnectionId;
|
||||
};
|
||||
|
||||
inline const char* GetEnumString(MultiplayerAgentType value)
|
||||
{
|
||||
switch (value)
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Include/MultiplayerTypes.h>
|
||||
#include <Multiplayer/MultiplayerTypes.h>
|
||||
#include <AzNetworking/DataStructures/FixedSizeBitset.h>
|
||||
#include <AzCore/std/containers/vector.h>
|
||||
#include <AzCore/std/smart_ptr/unique_ptr.h>
|
||||
+20
-26
@@ -12,8 +12,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Include/MultiplayerTypes.h>
|
||||
#include <Include/NetworkEntityHandle.h>
|
||||
#include <Multiplayer/MultiplayerTypes.h>
|
||||
#include <Multiplayer/NetworkEntityHandle.h>
|
||||
#include <AzCore/Component/Entity.h>
|
||||
#include <AzCore/EBus/Event.h>
|
||||
#include <AzCore/Asset/AssetCommon.h>
|
||||
@@ -59,9 +59,24 @@ namespace Multiplayer
|
||||
|
||||
//! Creates new entities of the given archetype
|
||||
//! @param prefabEntryId the name of the spawnable to spawn
|
||||
virtual EntityList CreateEntitiesImmediate(
|
||||
const PrefabEntityId& prefabEntryId, NetEntityId netEntityId, NetEntityRole netEntityRole, AutoActivate autoActivate,
|
||||
const AZ::Transform& transform) = 0;
|
||||
virtual EntityList CreateEntitiesImmediate
|
||||
(
|
||||
const PrefabEntityId& prefabEntryId,
|
||||
NetEntityRole netEntityRole,
|
||||
const AZ::Transform& transform
|
||||
) = 0;
|
||||
|
||||
//! Creates new entities of the given archetype
|
||||
//! This interface is internally used to spawn replicated entities
|
||||
//! @param prefabEntryId the name of the spawnable to spawn
|
||||
virtual EntityList CreateEntitiesImmediate
|
||||
(
|
||||
const PrefabEntityId& prefabEntryId,
|
||||
NetEntityId netEntityId,
|
||||
NetEntityRole netEntityRole,
|
||||
AutoActivate autoActivate,
|
||||
const AZ::Transform& transform
|
||||
) = 0;
|
||||
|
||||
//! Returns an ConstEntityPtr for the provided entityId.
|
||||
//! @param netEntityId the netEntityId to get an ConstEntityPtr for
|
||||
@@ -134,25 +149,4 @@ namespace Multiplayer
|
||||
//! @param entityRpcMessage the local rpc message to handle
|
||||
virtual void HandleLocalRpcMessage(NetworkEntityRpcMessage& message) = 0;
|
||||
};
|
||||
|
||||
// Convenience helpers
|
||||
inline INetworkEntityManager* GetNetworkEntityManager()
|
||||
{
|
||||
return AZ::Interface<INetworkEntityManager>::Get();
|
||||
}
|
||||
|
||||
inline NetworkEntityTracker* GetNetworkEntityTracker()
|
||||
{
|
||||
return GetNetworkEntityManager()->GetNetworkEntityTracker();
|
||||
}
|
||||
|
||||
inline NetworkEntityAuthorityTracker* GetNetworkEntityAuthorityTracker()
|
||||
{
|
||||
return GetNetworkEntityManager()->GetNetworkEntityAuthorityTracker();
|
||||
}
|
||||
|
||||
inline MultiplayerComponentRegistry* GetMultiplayerComponentRegistry()
|
||||
{
|
||||
return GetNetworkEntityManager()->GetMultiplayerComponentRegistry();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace Multiplayer
|
||||
{
|
||||
|
||||
}
|
||||
+12
-26
@@ -14,7 +14,7 @@
|
||||
|
||||
#include <AzCore/Time/ITime.h>
|
||||
#include <AzNetworking/ConnectionLayer/IConnection.h>
|
||||
#include <Include/MultiplayerTypes.h>
|
||||
#include <Multiplayer/MultiplayerTypes.h>
|
||||
|
||||
namespace Multiplayer
|
||||
{
|
||||
@@ -47,9 +47,6 @@ namespace Multiplayer
|
||||
//! @return the hosts current timeMs
|
||||
virtual AZ::TimeMs GetHostTimeMs() const = 0;
|
||||
|
||||
//! Synchronizes rewindable entity state for the current application time.
|
||||
virtual void SyncRewindableEntityState() = 0;
|
||||
|
||||
//! Get the controlling connection that may be currently altering global game time.
|
||||
//! Note this abstraction is required at a relatively high level to allow for 'don't rewind the shooter' semantics
|
||||
//! @return the ConnectionId of the connection requesting the rewind operation
|
||||
@@ -67,6 +64,13 @@ namespace Multiplayer
|
||||
//! @param rewindConnectionId the rewinding ConnectionId
|
||||
virtual void AlterTime(HostFrameId frameId, AZ::TimeMs timeMs, AzNetworking::ConnectionId rewindConnectionId) = 0;
|
||||
|
||||
//! Syncs all entities contained within a volume to the current rewind state.
|
||||
//! @param rewindVolume the volume to rewind entities within (needed for physics entities)
|
||||
virtual void SyncEntitiesToRewindState(const AZ::Aabb& rewindVolume) = 0;
|
||||
|
||||
//! Restores all rewound entities to the current application time.
|
||||
virtual void ClearRewoundEntities() = 0;
|
||||
|
||||
AZ_DISABLE_COPY_MOVE(INetworkTime);
|
||||
};
|
||||
|
||||
@@ -80,27 +84,9 @@ namespace Multiplayer
|
||||
};
|
||||
using INetworkTimeRequestBus = AZ::EBus<INetworkTime, INetworkTimeRequests>;
|
||||
|
||||
//! @class ScopedAlterTime
|
||||
//! @brief This is a wrapper that temporarily adjusts global program time for backward reconciliation purposes.
|
||||
class ScopedAlterTime final
|
||||
// Convenience helpers
|
||||
inline INetworkTime* GetNetworkTime()
|
||||
{
|
||||
public:
|
||||
inline ScopedAlterTime(HostFrameId frameId, AZ::TimeMs timeMs, AzNetworking::ConnectionId connectionId)
|
||||
{
|
||||
INetworkTime* time = AZ::Interface<INetworkTime>::Get();
|
||||
m_previousHostFrameId = time->GetHostFrameId();
|
||||
m_previousHostTimeMs = time->GetHostTimeMs();
|
||||
m_previousRewindConnectionId = time->GetRewindingConnectionId();
|
||||
time->AlterTime(frameId, timeMs, connectionId);
|
||||
}
|
||||
inline ~ScopedAlterTime()
|
||||
{
|
||||
INetworkTime* time = AZ::Interface<INetworkTime>::Get();
|
||||
time->AlterTime(m_previousHostFrameId, m_previousHostTimeMs, m_previousRewindConnectionId);
|
||||
}
|
||||
private:
|
||||
HostFrameId m_previousHostFrameId = InvalidHostFrameId;
|
||||
AZ::TimeMs m_previousHostTimeMs = AZ::TimeMs{ 0 };
|
||||
AzNetworking::ConnectionId m_previousRewindConnectionId = AzNetworking::InvalidConnectionId;
|
||||
};
|
||||
return AZ::Interface<INetworkTime>::Get();
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -12,8 +12,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Include/MultiplayerTypes.h>
|
||||
#include <Include/NetworkEntityHandle.h>
|
||||
#include <Multiplayer/MultiplayerTypes.h>
|
||||
#include <Multiplayer/NetworkEntityHandle.h>
|
||||
#include <AzCore/std/containers/unordered_map.h>
|
||||
|
||||
namespace Multiplayer
|
||||
+3
-3
@@ -15,9 +15,9 @@
|
||||
#include <AzCore/Component/Component.h>
|
||||
#include <AzNetworking/Serialization/ISerializer.h>
|
||||
#include <AzNetworking/DataStructures/FixedSizeBitsetView.h>
|
||||
#include <Include/NetworkEntityHandle.h>
|
||||
#include <Include/MultiplayerTypes.h>
|
||||
#include <Include/IMultiplayer.h>
|
||||
#include <Multiplayer/NetworkEntityHandle.h>
|
||||
#include <Multiplayer/MultiplayerTypes.h>
|
||||
#include <Multiplayer/IMultiplayer.h>
|
||||
|
||||
//! Macro to declare bindings for a multiplayer component inheriting from MultiplayerComponent
|
||||
#define AZ_MULTIPLAYER_COMPONENT(ComponentClass, Guid, Base) \
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
|
||||
#include <AzCore/Name/Name.h>
|
||||
#include <AzCore/std/containers/unordered_map.h>
|
||||
#include <Source/Components/MultiplayerComponent.h>
|
||||
#include <Multiplayer/MultiplayerComponent.h>
|
||||
|
||||
namespace Multiplayer
|
||||
{
|
||||
+1
-7
@@ -12,7 +12,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Include/NetworkEntityHandle.h>
|
||||
#include <Multiplayer/NetworkEntityHandle.h>
|
||||
#include <AzCore/Math/Aabb.h>
|
||||
|
||||
namespace Multiplayer
|
||||
@@ -84,12 +84,6 @@ namespace Multiplayer
|
||||
//! Returns the input priority ordering for determining the order of ProcessInput or CreateInput functions.
|
||||
virtual InputPriorityOrder GetInputOrder() const = 0;
|
||||
|
||||
//! Queries the rewind system to determine what volume is relevent for a given input, this is very important for performance at scale.
|
||||
//! @param networkInput input structure to process
|
||||
//! @param deltaTime amount of time the provided input would be integrated over
|
||||
//! @return a world-space aabb representing the volume relevent to the provided input
|
||||
virtual AZ::Aabb GetRewindBoundsForInput(const NetworkInput& networkInput, float deltaTime) const = 0;
|
||||
|
||||
//! Base execution for ProcessInput packet, do not call directly.
|
||||
//! @param networkInput input structure to process
|
||||
//! @param deltaTime amount of time to integrate the provided inputs over
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <Include/MultiplayerStats.h>
|
||||
#include <Multiplayer/MultiplayerStats.h>
|
||||
|
||||
namespace Multiplayer
|
||||
{
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
#include <AzCore/Time/ITime.h>
|
||||
#include <AzCore/std/containers/vector.h>
|
||||
#include <AzCore/std/containers/array.h>
|
||||
#include <Include/MultiplayerTypes.h>
|
||||
#include <Multiplayer/MultiplayerTypes.h>
|
||||
|
||||
namespace AzNetworking
|
||||
{
|
||||
+5
-6
@@ -20,11 +20,11 @@
|
||||
#include <AzCore/std/smart_ptr/unique_ptr.h>
|
||||
#include <AzNetworking/Serialization/ISerializer.h>
|
||||
#include <AzNetworking/ConnectionLayer/IConnection.h>
|
||||
#include <Source/NetworkEntity/EntityReplication/ReplicationRecord.h>
|
||||
#include <Include/NetworkEntityHandle.h>
|
||||
#include <Include/IMultiplayerComponentInput.h>
|
||||
#include <Include/INetworkTime.h>
|
||||
#include <Include/MultiplayerTypes.h>
|
||||
#include <Multiplayer/ReplicationRecord.h>
|
||||
#include <Multiplayer/NetworkEntityHandle.h>
|
||||
#include <Multiplayer/IMultiplayerComponentInput.h>
|
||||
#include <Multiplayer/INetworkTime.h>
|
||||
#include <Multiplayer/MultiplayerTypes.h>
|
||||
#include <AzCore/EBus/Event.h>
|
||||
|
||||
namespace Multiplayer
|
||||
@@ -73,7 +73,6 @@ namespace Multiplayer
|
||||
bool IsProcessingInput() const;
|
||||
void CreateInput(NetworkInput& networkInput, float deltaTime);
|
||||
void ProcessInput(NetworkInput& networkInput, float deltaTime);
|
||||
AZ::Aabb GetRewindBoundsForInput(const NetworkInput& networkInput, float deltaTime) const;
|
||||
|
||||
bool HandleRpcMessage(AzNetworking::IConnection* invokingConnection, NetEntityRole remoteRole, NetworkEntityRpcMessage& message);
|
||||
bool HandlePropertyChangeMessage(AzNetworking::ISerializer& serializer, bool notifyChanges = true);
|
||||
+2
-2
@@ -13,7 +13,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <AzCore/Component/Entity.h>
|
||||
#include <Include/MultiplayerTypes.h>
|
||||
#include <Multiplayer/MultiplayerTypes.h>
|
||||
|
||||
namespace Multiplayer
|
||||
{
|
||||
@@ -138,4 +138,4 @@ namespace Multiplayer
|
||||
};
|
||||
}
|
||||
|
||||
#include <Include/NetworkEntityHandle.inl>
|
||||
#include <Multiplayer/NetworkEntityHandle.inl>
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
|
||||
#include <AzNetworking/Serialization/ISerializer.h>
|
||||
#include <AzNetworking/DataStructures/ByteBuffer.h>
|
||||
#include <Include/MultiplayerTypes.h>
|
||||
#include <Multiplayer/MultiplayerTypes.h>
|
||||
|
||||
namespace Multiplayer
|
||||
{
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
#include <AzNetworking/Serialization/ISerializer.h>
|
||||
#include <AzNetworking/DataStructures/ByteBuffer.h>
|
||||
#include <AzCore/Name/Name.h>
|
||||
#include <Include/MultiplayerTypes.h>
|
||||
#include <Multiplayer/MultiplayerTypes.h>
|
||||
|
||||
namespace Multiplayer
|
||||
{
|
||||
+3
-3
@@ -12,9 +12,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Include/IMultiplayerComponentInput.h>
|
||||
#include <Include/INetworkTime.h>
|
||||
#include <Include/NetworkEntityHandle.h>
|
||||
#include <Multiplayer/IMultiplayerComponentInput.h>
|
||||
#include <Multiplayer/INetworkTime.h>
|
||||
#include <Multiplayer/NetworkEntityHandle.h>
|
||||
#include <AzCore/RTTI/TypeSafeIntegral.h>
|
||||
|
||||
namespace Multiplayer
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
#include <AzNetworking/DataStructures/FixedSizeVectorBitset.h>
|
||||
#include <AzNetworking/Serialization/ISerializer.h>
|
||||
#include <AzNetworking/Utilities/NetworkCommon.h>
|
||||
#include <Include/MultiplayerTypes.h>
|
||||
#include <Multiplayer/MultiplayerTypes.h>
|
||||
|
||||
namespace Multiplayer
|
||||
{
|
||||
+2
-2
@@ -12,7 +12,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Include/INetworkTime.h>
|
||||
#include <Multiplayer/INetworkTime.h>
|
||||
#include <AzNetworking/Serialization/ISerializer.h>
|
||||
#include <AzNetworking/ConnectionLayer/IConnection.h>
|
||||
#include <AzNetworking/Utilities/NetworkCommon.h>
|
||||
@@ -115,4 +115,4 @@ namespace AZ
|
||||
AZ_TYPE_INFO_TEMPLATE(Multiplayer::RewindableObject, "{B2937B44-FEE1-4277-B1E0-863DE76D363F}", AZ_TYPE_INFO_TYPENAME, AZ_TYPE_INFO_AUTO);
|
||||
}
|
||||
|
||||
#include <Source/NetworkTime/RewindableObject.inl>
|
||||
#include <Multiplayer/RewindableObject.inl>
|
||||
+2
-2
@@ -47,7 +47,7 @@ namespace Multiplayer
|
||||
template <typename BASE_TYPE, AZStd::size_t REWIND_SIZE>
|
||||
inline RewindableObject<BASE_TYPE, REWIND_SIZE> &RewindableObject<BASE_TYPE, REWIND_SIZE>::operator =(const RewindableObject<BASE_TYPE, REWIND_SIZE>& rhs)
|
||||
{
|
||||
INetworkTime* networkTime = AZ::Interface<INetworkTime>::Get();
|
||||
INetworkTime* networkTime = Multiplayer::GetNetworkTime();
|
||||
SetValueForTime(rhs.GetValueForTime(networkTime->GetHostFrameId()), GetCurrentTimeForProperty());
|
||||
return *this;
|
||||
}
|
||||
@@ -115,7 +115,7 @@ namespace Multiplayer
|
||||
template <typename BASE_TYPE, AZStd::size_t REWIND_SIZE>
|
||||
inline HostFrameId RewindableObject<BASE_TYPE, REWIND_SIZE>::GetCurrentTimeForProperty() const
|
||||
{
|
||||
INetworkTime* networkTime = AZ::Interface<INetworkTime>::Get();
|
||||
INetworkTime* networkTime = Multiplayer::GetNetworkTime();
|
||||
return networkTime->GetHostFrameIdForRewindingConnection(m_owningConnectionId);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <AzCore/std/containers/list.h>
|
||||
#include <Include/MultiplayerTypes.h>
|
||||
#include <Multiplayer/MultiplayerTypes.h>
|
||||
|
||||
namespace AZ
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <AzCore/Component/Component.h>
|
||||
#include <Source/Components/MultiplayerComponentRegistry.h>
|
||||
#include <Include/INetworkEntityManager.h>
|
||||
#include <Multiplayer/MultiplayerComponentRegistry.h>
|
||||
#include <Multiplayer/INetworkEntityManager.h>
|
||||
{% for Component in dataFiles %}
|
||||
{% set ComponentDerived = Component.attrib['OverrideComponent']|booleanTrue %}
|
||||
{% set ControllerDerived = Component.attrib['OverrideController']|booleanTrue %}
|
||||
@@ -21,8 +21,8 @@ namespace {{ Namespace }}
|
||||
{
|
||||
void RegisterMultiplayerComponents()
|
||||
{
|
||||
Multiplayer::MultiplayerComponentRegistry* multiplayerComponentRegistry = GetMultiplayerComponentRegistry();
|
||||
Multiplayer::MultiplayerStats& stats = AZ::Interface<Multiplayer::IMultiplayer>::Get()->GetStats();
|
||||
Multiplayer::MultiplayerComponentRegistry* multiplayerComponentRegistry = Multiplayer::GetMultiplayerComponentRegistry();
|
||||
Multiplayer::MultiplayerStats& stats = Multiplayer::GetMultiplayer()->GetStats();
|
||||
{% for Component in dataFiles %}
|
||||
{% set ComponentName = Component.attrib['Name'] %}
|
||||
{% set ComponentBaseName = ComponentName %}
|
||||
|
||||
@@ -221,13 +221,14 @@ AZStd::fixed_vector<{{ Property.attrib['Type'] }}, {{ Property.attrib['Count'] }
|
||||
#include <AzCore/EBus/Event.h>
|
||||
#include <AzCore/EBus/ScheduledEvent.h>
|
||||
#include <AzNetworking/DataStructures/FixedSizeBitsetView.h>
|
||||
#include <Include/IMultiplayerComponentInput.h>
|
||||
#include <Include/NetworkEntityHandle.h>
|
||||
#include <Source/NetworkEntity/EntityReplication/ReplicationRecord.h>
|
||||
#include <Source/Components/MultiplayerComponent.h>
|
||||
#include <Source/Components/MultiplayerController.h>
|
||||
#include <Source/NetworkTime/RewindableObject.h>
|
||||
#include <Include/MultiplayerTypes.h>
|
||||
#include <Multiplayer/IMultiplayerComponentInput.h>
|
||||
#include <Multiplayer/NetworkEntityHandle.h>
|
||||
#include <Multiplayer/MultiplayerComponent.h>
|
||||
#include <Multiplayer/MultiplayerController.h>
|
||||
#include <Multiplayer/NetworkInput.h>
|
||||
#include <Multiplayer/ReplicationRecord.h>
|
||||
#include <Multiplayer/RewindableObject.h>
|
||||
#include <Multiplayer/MultiplayerTypes.h>
|
||||
{% call(Include) AutoComponentMacros.ParseIncludes(Component) %}
|
||||
#include <{{ Include.attrib['File'] }}>
|
||||
{% endcall %}
|
||||
@@ -359,7 +360,6 @@ namespace {{ Component.attrib['Namespace'] }}
|
||||
//! MultiplayerController interface
|
||||
//! @{
|
||||
Multiplayer::MultiplayerController::InputPriorityOrder GetInputOrder() const override { return Multiplayer::MultiplayerController::InputPriorityOrder::Default; }
|
||||
AZ::Aabb GetRewindBoundsForInput([[maybe_unused]] const NetworkInput& networkInput, [[maybe_unused]] float deltaTime) const override { return AZ::Aabb::CreateNull(); }
|
||||
void CreateInput([[maybe_unused]] Multiplayer::NetworkInput& input, [[maybe_unused]] float deltaTime) override {}
|
||||
void ProcessInput([[maybe_unused]] Multiplayer::NetworkInput& input, [[maybe_unused]] float deltaTime) override {}
|
||||
//! @}
|
||||
@@ -434,12 +434,12 @@ namespace {{ Component.attrib['Namespace'] }}
|
||||
|
||||
//! MultiplayerComponent interface
|
||||
//! @{
|
||||
NetComponentId GetNetComponentId() const override;
|
||||
Multiplayer::NetComponentId GetNetComponentId() const override;
|
||||
bool HandleRpcMessage(AzNetworking::IConnection* invokingConnection, Multiplayer::NetEntityRole remoteRole, Multiplayer::NetworkEntityRpcMessage& rpcMessage) override;
|
||||
bool SerializeStateDeltaMessage(Multiplayer::ReplicationRecord& replicationRecord, AzNetworking::ISerializer& serializer) override;
|
||||
void NotifyStateDeltaChanges(Multiplayer::ReplicationRecord& replicationRecord) override;
|
||||
bool HasController() const override;
|
||||
MultiplayerController* GetController() override;
|
||||
Multiplayer::MultiplayerController* GetController() override;
|
||||
|
||||
protected:
|
||||
void ConstructController() override;
|
||||
@@ -484,8 +484,8 @@ namespace {{ Component.attrib['Namespace'] }}
|
||||
void NotifyChangesAutonomousToAuthorityProperties(const {{ RecordName }}& replicationRecord) const;
|
||||
|
||||
//! Debug name helpers
|
||||
static const char* GetNetworkPropertyName(PropertyIndex propertyIndex);
|
||||
static const char* GetRpcName(RpcIndex rpcIndex);
|
||||
static const char* GetNetworkPropertyName(Multiplayer::PropertyIndex propertyIndex);
|
||||
static const char* GetRpcName(Multiplayer::RpcIndex rpcIndex);
|
||||
|
||||
AZStd::unique_ptr<{{ RecordName }}> m_currentRecord;
|
||||
AZStd::unique_ptr<{{ ControllerName }}> m_controller;
|
||||
@@ -517,7 +517,7 @@ namespace {{ Component.attrib['Namespace'] }}
|
||||
{{ Type }}* {{ Name }} = nullptr;
|
||||
{% endcall %}
|
||||
|
||||
static NetComponentId s_netComponentId;
|
||||
static Multiplayer::NetComponentId s_netComponentId;
|
||||
friend void RegisterMultiplayerComponents();
|
||||
};
|
||||
}
|
||||
|
||||
@@ -476,7 +476,7 @@ bool {{ ClassName }}::Serialize{{ AutoComponentMacros.GetNetPropertiesSetName(Re
|
||||
{%- if networkPropertyCount.update({'value': networkPropertyCount.value + 1}) %}{% endif -%}
|
||||
{% endcall %}
|
||||
{% if networkPropertyCount.value > 0 %}
|
||||
MultiplayerStats& stats = AZ::Interface<IMultiplayer>::Get()->GetStats();
|
||||
MultiplayerStats& stats = GetMultiplayer()->GetStats();
|
||||
// We modify the record if we are writing an update so that we don't notify for a change that really didn't change the value (just a duplicated send from the server)
|
||||
[[maybe_unused]] bool modifyRecord = serializer.GetSerializerMode() == AzNetworking::SerializerMode::WriteToObject;
|
||||
{% call(Property) AutoComponentMacros.ParseNetworkProperties(Component, ReplicateFrom, ReplicateTo) %}
|
||||
@@ -902,8 +902,8 @@ m_{{ LowerFirst(Property.attrib['Name']) }} = m_{{ LowerFirst(Property.attrib['N
|
||||
#include <AzCore/Serialization/EditContext.h>
|
||||
#include <AzCore/RTTI/BehaviorContext.h>
|
||||
#include <AzCore/Component/Entity.h>
|
||||
#include <Source/Components/NetBindComponent.h>
|
||||
#include <Source/NetworkEntity/NetworkEntityRpcMessage.h>
|
||||
#include <Multiplayer/NetBindComponent.h>
|
||||
#include <Multiplayer/NetworkEntityRpcMessage.h>
|
||||
{% if ComponentDerived or ControllerDerived %}
|
||||
#include <{{ Component.attrib['OverrideInclude'] }}>
|
||||
{% endif %}
|
||||
@@ -915,7 +915,7 @@ m_{{ LowerFirst(Property.attrib['Name']) }} = m_{{ LowerFirst(Property.attrib['N
|
||||
|
||||
namespace {{ Component.attrib['Namespace'] }}
|
||||
{
|
||||
NetComponentId {{ UpperFirst(ComponentBaseName) }}::s_netComponentId = InvalidNetComponentId;
|
||||
Multiplayer::NetComponentId {{ UpperFirst(ComponentBaseName) }}::s_netComponentId = Multiplayer::InvalidNetComponentId;
|
||||
|
||||
namespace {{ UpperFirst(Component.attrib['Name']) }}Internal
|
||||
{
|
||||
@@ -1141,16 +1141,23 @@ namespace {{ Component.attrib['Namespace'] }}
|
||||
AZ::EditContext* editContext = serializeContext->GetEditContext();
|
||||
if (editContext)
|
||||
{
|
||||
editContext->Class<{{ ComponentBaseName }}>("{{ ComponentBaseName }}", "{{ Component.attrib['Description'] }}")
|
||||
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
|
||||
->Attribute(AZ::Edit::Attributes::Category, "{{ Component.attrib['Namespace'] }}")
|
||||
->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC_CE("Game"))
|
||||
{{ DefineNetworkPropertyEditReflection(Component, 'Authority', 'Authority', ComponentBaseName)|indent(20) -}}
|
||||
{{ DefineNetworkPropertyEditReflection(Component, 'Authority', 'Server', ComponentBaseName)|indent(20) -}}
|
||||
{{ DefineNetworkPropertyEditReflection(Component, 'Authority', 'Client', ComponentBaseName)|indent(20) -}}
|
||||
{{ DefineNetworkPropertyEditReflection(Component, 'Authority', 'Autonomous', ComponentBaseName)|indent(20) -}}
|
||||
{{ DefineNetworkPropertyEditReflection(Component, 'Autonomous', 'Authority', ComponentBaseName)|indent(20) }}
|
||||
{{ DefineArchetypePropertyEditReflection(Component, ComponentBaseName)|indent(20) }};
|
||||
{% if ComponentDerived %}
|
||||
|
||||
editContext->Class<{{ ComponentName }}>("{{ ComponentName }}", "{{ Component.attrib['Description'] }}")
|
||||
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
|
||||
->Attribute(AZ::Edit::Attributes::Category, "Multiplayer")
|
||||
->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC_CE("Game"))
|
||||
{{ DefineNetworkPropertyEditReflection(Component, 'Authority', 'Authority', ComponentName)|indent(20) -}}
|
||||
{{ DefineNetworkPropertyEditReflection(Component, 'Authority', 'Server', ComponentName)|indent(20) -}}
|
||||
{{ DefineNetworkPropertyEditReflection(Component, 'Authority', 'Client', ComponentName)|indent(20) -}}
|
||||
{{ DefineNetworkPropertyEditReflection(Component, 'Authority', 'Autonomous', ComponentName)|indent(20) -}}
|
||||
{{ DefineNetworkPropertyEditReflection(Component, 'Autonomous', 'Authority', ComponentName)|indent(20) }}
|
||||
{{ DefineArchetypePropertyEditReflection(Component, ComponentName)|indent(20) }};
|
||||
->Attribute(AZ::Edit::Attributes::Category, "{{ Component.attrib['Namespace'] }}")
|
||||
->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC_CE("Game"));
|
||||
{% endif %}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1401,7 +1408,7 @@ namespace {{ Component.attrib['Namespace'] }}
|
||||
}
|
||||
|
||||
{% endif %}
|
||||
const char* {{ ComponentBaseName }}::GetNetworkPropertyName([[maybe_unused]] PropertyIndex propertyIndex)
|
||||
const char* {{ ComponentBaseName }}::GetNetworkPropertyName([[maybe_unused]] Multiplayer::PropertyIndex propertyIndex)
|
||||
{
|
||||
{% if NetworkPropertyCount > 0 %}
|
||||
const {{ UpperFirst(Component.attrib['Name']) }}Internal::NetworkProperties propertyId = static_cast<{{ UpperFirst(Component.attrib['Name']) }}Internal::NetworkProperties>(propertyIndex);
|
||||
@@ -1416,7 +1423,7 @@ namespace {{ Component.attrib['Namespace'] }}
|
||||
return "Unknown network property";
|
||||
}
|
||||
|
||||
const char* {{ ComponentBaseName }}::GetRpcName([[maybe_unused]] RpcIndex rpcIndex)
|
||||
const char* {{ ComponentBaseName }}::GetRpcName([[maybe_unused]] Multiplayer::RpcIndex rpcIndex)
|
||||
{
|
||||
{% if RpcCount > 0 %}
|
||||
const {{ UpperFirst(Component.attrib['Name']) }}Internal::RemoteProcedure rpcId = static_cast<{{ UpperFirst(Component.attrib['Name']) }}Internal::RemoteProcedure>(rpcIndex);
|
||||
|
||||
+2
-2
@@ -10,8 +10,8 @@
|
||||
|
||||
<ComponentRelation Constraint="Weak" HasController="true" Name="NetworkTransformComponent" Namespace="Multiplayer" Include="Source/Components/NetworkTransformComponent.h" />
|
||||
|
||||
<Include File="Include/MultiplayerTypes.h"/>
|
||||
<Include File="Source/NetworkInput/NetworkInput.h"/>
|
||||
<Include File="Multiplayer/MultiplayerTypes.h"/>
|
||||
<Include File="Multiplayer/NetworkInput.h"/>
|
||||
<Include File="Source/NetworkInput/NetworkInputArray.h"/>
|
||||
<Include File="Source/NetworkInput/NetworkInputHistory.h"/>
|
||||
<Include File="Source/NetworkInput/NetworkInputMigrationVector.h"/>
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
<PacketGroup Name="MultiplayerPackets" PacketStart="CorePackets::PacketType::MAX">
|
||||
<Include File="AzNetworking/AutoGen/CorePackets.AutoPackets.h" />
|
||||
<Include File="Include/MultiplayerTypes.h" />
|
||||
<Include File="Include/INetworkTime.h" />
|
||||
<Include File="Source/NetworkEntity/NetworkEntityRpcMessage.h" />
|
||||
<Include File="Source/NetworkEntity/NetworkEntityUpdateMessage.h" />
|
||||
<Include File="Multiplayer/MultiplayerTypes.h" />
|
||||
<Include File="Multiplayer/INetworkTime.h" />
|
||||
<Include File="Multiplayer/NetworkEntityRpcMessage.h" />
|
||||
<Include File="Multiplayer/NetworkEntityUpdateMessage.h" />
|
||||
|
||||
<Packet Name="Connect" Desc="Client connection packet, on success the server will reply with an Accept">
|
||||
<Member Type="uint16_t" Name="networkProtocolVersion" Init="0" />
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
<ComponentRelation Constraint="Weak" HasController="false" Name="TransformComponent" Namespace="AzFramework" Include="AzFramework/Components/TransformComponent.h" />
|
||||
|
||||
<Include File="Include/MultiplayerTypes.h"/>
|
||||
<Include File="Multiplayer/MultiplayerTypes.h"/>
|
||||
|
||||
<NetworkProperty Type="AZ::Quaternion" Name="rotation" Init="AZ::Quaternion::CreateIdentity()" ReplicateFrom="Authority" ReplicateTo="Client" IsRewindable="true" IsPredictable="true" IsPublic="true" Container="Object" ExposeToEditor="false" GenerateEventBindings="true" />
|
||||
<NetworkProperty Type="AZ::Vector3" Name="translation" Init="AZ::Vector3::CreateZero()" ReplicateFrom="Authority" ReplicateTo="Client" IsRewindable="true" IsPredictable="true" IsPublic="true" Container="Object" ExposeToEditor="false" GenerateEventBindings="true" />
|
||||
|
||||
@@ -94,7 +94,7 @@ namespace Multiplayer
|
||||
if (entityIsMigrating == EntityIsMigrating::True)
|
||||
{
|
||||
m_allowMigrateClientInput = true;
|
||||
m_serverMigrateFrameId = AZ::Interface<INetworkTime>::Get()->GetHostFrameId();
|
||||
m_serverMigrateFrameId = GetNetworkTime()->GetHostFrameId();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -492,8 +492,8 @@ namespace Multiplayer
|
||||
|
||||
const uint32_t maxClientInputs = inputRate > 0.0 ? static_cast<uint32_t>(maxRewindHistory / inputRate) : 0;
|
||||
|
||||
INetworkTime* networkTime = AZ::Interface<INetworkTime>::Get();
|
||||
IMultiplayer* multiplayer = AZ::Interface<IMultiplayer>::Get();
|
||||
IMultiplayer* multiplayer = GetMultiplayer();
|
||||
INetworkTime* networkTime = GetNetworkTime();
|
||||
while (m_moveAccumulator >= inputRate)
|
||||
{
|
||||
m_moveAccumulator -= inputRate;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <Source/AutoGen/LocalPredictionPlayerInputComponent.AutoComponent.h>
|
||||
#include <Source/Components/NetBindComponent.h>
|
||||
#include <Multiplayer/NetBindComponent.h>
|
||||
|
||||
namespace Multiplayer
|
||||
{
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <Source/Components/MultiplayerComponent.h>
|
||||
#include <Source/Components/NetBindComponent.h>
|
||||
#include <Multiplayer/MultiplayerComponent.h>
|
||||
#include <Multiplayer/NetBindComponent.h>
|
||||
#include <AzCore/Serialization/SerializeContext.h>
|
||||
|
||||
namespace Multiplayer
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <Source/Components/MultiplayerComponentRegistry.h>
|
||||
#include <Multiplayer/MultiplayerComponentRegistry.h>
|
||||
|
||||
namespace Multiplayer
|
||||
{
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <Source/Components/MultiplayerController.h>
|
||||
#include <Source/Components/MultiplayerComponent.h>
|
||||
#include <Source/Components/NetBindComponent.h>
|
||||
#include <Multiplayer/MultiplayerController.h>
|
||||
#include <Multiplayer/MultiplayerComponent.h>
|
||||
#include <Multiplayer/NetBindComponent.h>
|
||||
|
||||
namespace Multiplayer
|
||||
{
|
||||
|
||||
@@ -10,13 +10,13 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <Source/Components/NetBindComponent.h>
|
||||
#include <Source/Components/MultiplayerComponent.h>
|
||||
#include <Source/Components/MultiplayerController.h>
|
||||
#include <Source/NetworkEntity/NetworkEntityRpcMessage.h>
|
||||
#include <Source/NetworkEntity/NetworkEntityUpdateMessage.h>
|
||||
#include <Source/NetworkInput/NetworkInput.h>
|
||||
#include <Include/INetworkEntityManager.h>
|
||||
#include <Multiplayer/NetBindComponent.h>
|
||||
#include <Multiplayer/NetworkEntityRpcMessage.h>
|
||||
#include <Multiplayer/NetworkEntityUpdateMessage.h>
|
||||
#include <Multiplayer/NetworkInput.h>
|
||||
#include <Multiplayer/INetworkEntityManager.h>
|
||||
#include <Multiplayer/MultiplayerComponent.h>
|
||||
#include <Multiplayer/MultiplayerController.h>
|
||||
#include <AzCore/Console/IConsole.h>
|
||||
#include <AzCore/Console/ILogger.h>
|
||||
#include <AzCore/Interface/Interface.h>
|
||||
@@ -177,21 +177,6 @@ namespace Multiplayer
|
||||
}
|
||||
}
|
||||
|
||||
AZ::Aabb NetBindComponent::GetRewindBoundsForInput(const NetworkInput& networkInput, float deltaTime) const
|
||||
{
|
||||
AZ_Assert(m_netEntityRole == NetEntityRole::Authority, "Incorrect network role for computing rewind bounds");
|
||||
AZ::Aabb bounds = AZ::Aabb::CreateNull();
|
||||
for (MultiplayerComponent* multiplayerComponent : m_multiplayerInputComponentVector)
|
||||
{
|
||||
const AZ::Aabb componentBounds = multiplayerComponent->GetController()->GetRewindBoundsForInput(networkInput, deltaTime);
|
||||
if (componentBounds.IsValid())
|
||||
{
|
||||
bounds.AddAabb(componentBounds);
|
||||
}
|
||||
}
|
||||
return bounds;
|
||||
}
|
||||
|
||||
bool NetBindComponent::HandleRpcMessage(AzNetworking::IConnection* invokingConnection, NetEntityRole remoteRole, NetworkEntityRpcMessage& message)
|
||||
{
|
||||
auto findIt = m_multiplayerComponentMap.find(message.GetComponentId());
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Include/IConnectionData.h>
|
||||
#include <Multiplayer/IConnectionData.h>
|
||||
#include <Source/NetworkEntity/EntityReplication/EntityReplicationManager.h>
|
||||
|
||||
namespace Multiplayer
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Include/IConnectionData.h>
|
||||
#include <Multiplayer/IConnectionData.h>
|
||||
#include <Source/NetworkEntity/EntityReplication/EntityReplicationManager.h>
|
||||
|
||||
namespace Multiplayer
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <Source/Debug/MultiplayerDebugSystemComponent.h>
|
||||
#include <AzCore/Serialization/SerializeContext.h>
|
||||
#include <AzCore/Interface/Interface.h>
|
||||
#include <Include/IMultiplayer.h>
|
||||
#include <Multiplayer/IMultiplayer.h>
|
||||
|
||||
namespace Multiplayer
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Include/IEntityDomain.h>
|
||||
#include <Multiplayer/IEntityDomain.h>
|
||||
|
||||
namespace Multiplayer
|
||||
{
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
#include <Source/Multiplayer_precompiled.h>
|
||||
#include <Source/MultiplayerGem.h>
|
||||
#include <Source/MultiplayerSystemComponent.h>
|
||||
#include <Source/Components/NetBindComponent.h>
|
||||
#include <Source/AutoGen/AutoComponentTypes.h>
|
||||
#include <Source/Pipeline/NetBindMarkerComponent.h>
|
||||
#include <Source/Pipeline/NetworkSpawnableHolderComponent.h>
|
||||
#include <Multiplayer/NetBindComponent.h>
|
||||
#include <AzNetworking/Framework/NetworkingSystemComponent.h>
|
||||
|
||||
namespace Multiplayer
|
||||
|
||||
@@ -11,18 +11,21 @@
|
||||
*/
|
||||
|
||||
#include <Source/MultiplayerSystemComponent.h>
|
||||
#include <Source/Components/MultiplayerComponent.h>
|
||||
#include <Source/AutoGen/AutoComponentTypes.h>
|
||||
#include <Source/ConnectionData/ClientToServerConnectionData.h>
|
||||
#include <Source/ConnectionData/ServerToClientConnectionData.h>
|
||||
#include <Source/ReplicationWindows/NullReplicationWindow.h>
|
||||
#include <Source/ReplicationWindows/ServerToClientReplicationWindow.h>
|
||||
#include <Source/EntityDomains/FullOwnershipEntityDomain.h>
|
||||
#include <Multiplayer/MultiplayerComponent.h>
|
||||
#include <AzNetworking/Framework/INetworking.h>
|
||||
#include <AzCore/Serialization/SerializeContext.h>
|
||||
#include <AzCore/Interface/Interface.h>
|
||||
#include <AzCore/Console/IConsole.h>
|
||||
#include <AzCore/Console/ILogger.h>
|
||||
#include <AzCore/Asset/AssetCommon.h>
|
||||
#include <AzCore/Asset/AssetManagerBus.h>
|
||||
#include <AzFramework/Spawnable/Spawnable.h>
|
||||
|
||||
namespace AZ::ConsoleTypeHelpers
|
||||
{
|
||||
@@ -69,6 +72,7 @@ namespace Multiplayer
|
||||
AZ_CVAR(ProtocolType, sv_protocol, ProtocolType::Udp, nullptr, AZ::ConsoleFunctorFlags::DontReplicate, "This flag controls whether we use TCP or UDP for game networking");
|
||||
AZ_CVAR(bool, sv_isDedicated, true, nullptr, AZ::ConsoleFunctorFlags::DontReplicate, "Whether the host command creates an independent or client hosted server");
|
||||
AZ_CVAR(AZ::TimeMs, cl_defaultNetworkEntityActivationTimeSliceMs, AZ::TimeMs{ 0 }, nullptr, AZ::ConsoleFunctorFlags::DontReplicate, "Max Ms to use to activate entities coming from the network, 0 means instantiate everything");
|
||||
AZ_CVAR(AZ::CVarFixedString, sv_defaultPlayerSpawnAsset, "prefabs/player.network.spawnable", nullptr, AZ::ConsoleFunctorFlags::DontReplicate, "The default spawnable to use when a new player connects");
|
||||
|
||||
void MultiplayerSystemComponent::Reflect(AZ::ReflectContext* context)
|
||||
{
|
||||
@@ -411,6 +415,11 @@ namespace Multiplayer
|
||||
|
||||
void MultiplayerSystemComponent::OnConnect(AzNetworking::IConnection* connection)
|
||||
{
|
||||
MultiplayerAgentDatum datum;
|
||||
datum.m_id = connection->GetConnectionId();
|
||||
datum.m_isInvited = false;
|
||||
datum.m_agentType = MultiplayerAgentType::Client;
|
||||
|
||||
if (connection->GetConnectionRole() == ConnectionRole::Connector)
|
||||
{
|
||||
AZLOG_INFO("New outgoing connection to remote address: %s", connection->GetRemoteAddress().GetString().c_str());
|
||||
@@ -419,36 +428,46 @@ namespace Multiplayer
|
||||
else
|
||||
{
|
||||
AZLOG_INFO("New incoming connection from remote address: %s", connection->GetRemoteAddress().GetString().c_str());
|
||||
MultiplayerAgentDatum datum;
|
||||
datum.m_id = connection->GetConnectionId();
|
||||
datum.m_isInvited = false;
|
||||
datum.m_agentType = MultiplayerAgentType::Client;
|
||||
m_connAcquiredEvent.Signal(datum);
|
||||
}
|
||||
|
||||
if (GetAgentType() == MultiplayerAgentType::ClientServer
|
||||
|| GetAgentType() == MultiplayerAgentType::DedicatedServer)
|
||||
if (m_onConnectFunctor)
|
||||
{
|
||||
// TODO: This needs to be set to the players autonomous proxy ------------v
|
||||
NetworkEntityHandle controlledEntity = GetNetworkEntityTracker()->Get(NetEntityId{ 0 });
|
||||
|
||||
if (connection->GetUserData() == nullptr) // Only add user data if the connect event handler has not already done so
|
||||
{
|
||||
connection->SetUserData(new ServerToClientConnectionData(connection, *this, controlledEntity));
|
||||
}
|
||||
|
||||
AZStd::unique_ptr<IReplicationWindow> window = AZStd::make_unique<ServerToClientReplicationWindow>(controlledEntity, connection);
|
||||
reinterpret_cast<ServerToClientConnectionData*>(connection->GetUserData())->GetReplicationManager().SetReplicationWindow(AZStd::move(window));
|
||||
// Default OnConnect behaviour has been overridden
|
||||
m_onConnectFunctor(connection, datum);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (connection->GetUserData() == nullptr) // Only add user data if the connect event handler has not already done so
|
||||
if (GetAgentType() == MultiplayerAgentType::ClientServer
|
||||
|| GetAgentType() == MultiplayerAgentType::DedicatedServer)
|
||||
{
|
||||
connection->SetUserData(new ClientToServerConnectionData(connection, *this));
|
||||
}
|
||||
PrefabEntityId playerPrefabEntityId(AZ::Name(static_cast<AZ::CVarFixedString>(sv_defaultPlayerSpawnAsset).c_str()), 1);
|
||||
INetworkEntityManager::EntityList entityList = m_networkEntityManager.CreateEntitiesImmediate(playerPrefabEntityId, NetEntityRole::Authority, AZ::Transform::CreateIdentity());
|
||||
|
||||
AZStd::unique_ptr<IReplicationWindow> window = AZStd::make_unique<NullReplicationWindow>();
|
||||
reinterpret_cast<ServerToClientConnectionData*>(connection->GetUserData())->GetReplicationManager().SetEntityActivationTimeSliceMs(cl_defaultNetworkEntityActivationTimeSliceMs);
|
||||
NetworkEntityHandle controlledEntity;
|
||||
if (entityList.size() > 0)
|
||||
{
|
||||
controlledEntity = entityList[0];
|
||||
}
|
||||
|
||||
if (connection->GetUserData() == nullptr) // Only add user data if the connect event handler has not already done so
|
||||
{
|
||||
connection->SetUserData(new ServerToClientConnectionData(connection, *this, controlledEntity));
|
||||
}
|
||||
|
||||
AZStd::unique_ptr<IReplicationWindow> window = AZStd::make_unique<ServerToClientReplicationWindow>(controlledEntity, connection);
|
||||
reinterpret_cast<ServerToClientConnectionData*>(connection->GetUserData())->GetReplicationManager().SetReplicationWindow(AZStd::move(window));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (connection->GetUserData() == nullptr) // Only add user data if the connect event handler has not already done so
|
||||
{
|
||||
connection->SetUserData(new ClientToServerConnectionData(connection, *this));
|
||||
}
|
||||
|
||||
AZStd::unique_ptr<IReplicationWindow> window = AZStd::make_unique<NullReplicationWindow>();
|
||||
reinterpret_cast<ClientToServerConnectionData*>(connection->GetUserData())->GetReplicationManager().SetEntityActivationTimeSliceMs(cl_defaultNetworkEntityActivationTimeSliceMs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -521,6 +540,11 @@ namespace Multiplayer
|
||||
handler.Connect(m_shutdownEvent);
|
||||
}
|
||||
|
||||
void MultiplayerSystemComponent::SetOnConnectFunctor(const OnConnectFunctor& functor)
|
||||
{
|
||||
m_onConnectFunctor = functor;
|
||||
}
|
||||
|
||||
void MultiplayerSystemComponent::SendReadyForEntityUpdates(bool readyForEntityUpdates)
|
||||
{
|
||||
IConnectionSet& connectionSet = m_networkInterface->GetConnectionSet();
|
||||
@@ -542,6 +566,16 @@ namespace Multiplayer
|
||||
}
|
||||
}
|
||||
|
||||
INetworkTime* MultiplayerSystemComponent::GetNetworkTime()
|
||||
{
|
||||
return &m_networkTime;
|
||||
}
|
||||
|
||||
INetworkEntityManager* MultiplayerSystemComponent::GetNetworkEntityManager()
|
||||
{
|
||||
return &m_networkEntityManager;
|
||||
}
|
||||
|
||||
const char* MultiplayerSystemComponent::GetComponentGemName(NetComponentId netComponentId) const
|
||||
{
|
||||
return GetMultiplayerComponentRegistry()->GetComponentGemName(netComponentId);
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <AzCore/Threading/ThreadSafeDeque.h>
|
||||
#include <AzCore/std/string/string.h>
|
||||
#include <AzNetworking/ConnectionLayer/IConnectionListener.h>
|
||||
#include <Include/IMultiplayer.h>
|
||||
#include <Multiplayer/IMultiplayer.h>
|
||||
#include <Source/NetworkTime/NetworkTime.h>
|
||||
#include <Source/NetworkEntity/NetworkEntityManager.h>
|
||||
#include <Source/AutoGen/Multiplayer.AutoPacketDispatcher.h>
|
||||
@@ -89,8 +89,11 @@ namespace Multiplayer
|
||||
void AddConnectionAcquiredHandler(ConnectionAcquiredEvent::Handler& handler) override;
|
||||
void AddSessionInitHandler(SessionInitEvent::Handler& handler) override;
|
||||
void AddSessionShutdownHandler(SessionShutdownEvent::Handler& handler) override;
|
||||
void SetOnConnectFunctor(const OnConnectFunctor& functor) override;
|
||||
void SendReadyForEntityUpdates(bool readyForEntityUpdates) override;
|
||||
AZ::TimeMs GetCurrentHostTimeMs() const override;
|
||||
INetworkTime* GetNetworkTime() override;
|
||||
INetworkEntityManager* GetNetworkEntityManager() override;
|
||||
const char* GetComponentGemName(NetComponentId netComponentId) const override;
|
||||
const char* GetComponentName(NetComponentId netComponentId) const override;
|
||||
const char* GetComponentPropertyName(NetComponentId netComponentId, PropertyIndex propertyIndex) const override;
|
||||
@@ -121,6 +124,8 @@ namespace Multiplayer
|
||||
SessionShutdownEvent m_shutdownEvent;
|
||||
ConnectionAcquiredEvent m_connAcquiredEvent;
|
||||
|
||||
OnConnectFunctor m_onConnectFunctor = nullptr;
|
||||
|
||||
AZ::TimeMs m_lastReplicatedHostTimeMs = AZ::TimeMs{ 0 };
|
||||
HostFrameId m_lastReplicatedHostFrameId = InvalidHostFrameId;
|
||||
};
|
||||
|
||||
+13
-9
@@ -14,14 +14,14 @@
|
||||
#include <Source/NetworkEntity/EntityReplication/EntityReplicator.h>
|
||||
#include <Source/NetworkEntity/EntityReplication/PropertyPublisher.h>
|
||||
#include <Source/NetworkEntity/EntityReplication/PropertySubscriber.h>
|
||||
#include <Source/NetworkEntity/NetworkEntityUpdateMessage.h>
|
||||
#include <Source/NetworkEntity/NetworkEntityRpcMessage.h>
|
||||
#include <Source/Components/NetBindComponent.h>
|
||||
#include <Source/AutoGen/Multiplayer.AutoPackets.h>
|
||||
#include <Include/IEntityDomain.h>
|
||||
#include <Include/IMultiplayer.h>
|
||||
#include <Include/INetworkEntityManager.h>
|
||||
#include <Include/IReplicationWindow.h>
|
||||
#include <Multiplayer/NetworkEntityUpdateMessage.h>
|
||||
#include <Multiplayer/NetworkEntityRpcMessage.h>
|
||||
#include <Multiplayer/NetBindComponent.h>
|
||||
#include <Multiplayer/IEntityDomain.h>
|
||||
#include <Multiplayer/IMultiplayer.h>
|
||||
#include <Multiplayer/INetworkEntityManager.h>
|
||||
#include <Multiplayer/IReplicationWindow.h>
|
||||
#include <AzNetworking/ConnectionLayer/IConnection.h>
|
||||
#include <AzNetworking/ConnectionLayer/IConnectionListener.h>
|
||||
#include <AzNetworking/PacketLayer/IPacketHeader.h>
|
||||
@@ -60,7 +60,11 @@ namespace Multiplayer
|
||||
// Start window update events
|
||||
m_updateWindow.Enqueue(AZ::TimeMs{ 0 }, true);
|
||||
|
||||
GetNetworkEntityManager()->AddEntityExitDomainHandler(m_entityExitDomainEventHandler);
|
||||
INetworkEntityManager* networkEntityManager = GetNetworkEntityManager();
|
||||
if (networkEntityManager != nullptr)
|
||||
{
|
||||
networkEntityManager->AddEntityExitDomainHandler(m_entityExitDomainEventHandler);
|
||||
}
|
||||
}
|
||||
|
||||
void EntityReplicationManager::SetRemoteHostId(HostId hostId)
|
||||
@@ -824,7 +828,7 @@ namespace Multiplayer
|
||||
{
|
||||
if (entityReplicator == nullptr)
|
||||
{
|
||||
IMultiplayer* multiplayer = AZ::Interface<IMultiplayer>::Get();
|
||||
IMultiplayer* multiplayer = GetMultiplayer();
|
||||
AZLOG_INFO
|
||||
(
|
||||
"EntityReplicationManager: Dropping remote RPC message for component %s of rpc index %s, entityId %u has already been deleted",
|
||||
|
||||
+5
-5
@@ -13,11 +13,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <Source/NetworkEntity/EntityReplication/EntityReplicator.h>
|
||||
#include <Source/Components/NetBindComponent.h>
|
||||
#include <Include/INetworkEntityManager.h>
|
||||
#include <Include/IReplicationWindow.h>
|
||||
#include <Include/IEntityDomain.h>
|
||||
#include <Include/NetworkEntityHandle.h>
|
||||
#include <Multiplayer/NetBindComponent.h>
|
||||
#include <Multiplayer/INetworkEntityManager.h>
|
||||
#include <Multiplayer/IReplicationWindow.h>
|
||||
#include <Multiplayer/IEntityDomain.h>
|
||||
#include <Multiplayer/NetworkEntityHandle.h>
|
||||
#include <AzNetworking/DataStructures/TimeoutQueue.h>
|
||||
#include <AzNetworking/PacketLayer/IPacketHeader.h>
|
||||
#include <AzCore/std/containers/map.h>
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
#include <Source/NetworkEntity/EntityReplication/PropertySubscriber.h>
|
||||
#include <Source/NetworkEntity/NetworkEntityAuthorityTracker.h>
|
||||
#include <Source/NetworkEntity/NetworkEntityTracker.h>
|
||||
#include <Source/NetworkEntity/NetworkEntityRpcMessage.h>
|
||||
#include <Source/Components/NetBindComponent.h>
|
||||
#include <Source/Components/NetworkTransformComponent.h>
|
||||
#include <Source/AutoGen/Multiplayer.AutoPackets.h>
|
||||
#include <Include/IMultiplayer.h>
|
||||
#include <Multiplayer/IMultiplayer.h>
|
||||
#include <Multiplayer/NetworkEntityRpcMessage.h>
|
||||
#include <Multiplayer/NetBindComponent.h>
|
||||
|
||||
#include <AzNetworking/PacketLayer/IPacket.h>
|
||||
#include <AzNetworking/Serialization/ISerializer.h>
|
||||
@@ -448,7 +448,7 @@ namespace Multiplayer
|
||||
void EntityReplicator::DeferRpcMessage(NetworkEntityRpcMessage& entityRpcMessage)
|
||||
{
|
||||
// Received rpc metrics, log rpc sent, number of bytes, and the componentId/rpcId for bandwidth metrics
|
||||
MultiplayerStats& stats = AZ::Interface<IMultiplayer>::Get()->GetStats();
|
||||
MultiplayerStats& stats = GetMultiplayer()->GetStats();
|
||||
stats.RecordRpcSent(entityRpcMessage.GetComponentId(), entityRpcMessage.GetRpcIndex(), entityRpcMessage.GetEstimatedSerializeSize());
|
||||
|
||||
m_replicationManager.AddDeferredRpcMessage(entityRpcMessage);
|
||||
@@ -631,7 +631,7 @@ namespace Multiplayer
|
||||
bool EntityReplicator::HandleRpcMessage(AzNetworking::IConnection* invokingConnection, NetworkEntityRpcMessage& entityRpcMessage)
|
||||
{
|
||||
// Received rpc metrics, log rpc received, time spent, number of bytes, and the componentId/rpcId for bandwidth metrics
|
||||
MultiplayerStats& stats = AZ::Interface<IMultiplayer>::Get()->GetStats();
|
||||
MultiplayerStats& stats = GetMultiplayer()->GetStats();
|
||||
stats.RecordRpcReceived(entityRpcMessage.GetComponentId(), entityRpcMessage.GetRpcIndex(), entityRpcMessage.GetEstimatedSerializeSize());
|
||||
|
||||
if (!m_netBindComponent)
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
#include <AzCore/Component/EntityBus.h>
|
||||
#include <AzCore/std/smart_ptr/unique_ptr.h>
|
||||
#include <AzCore/std/containers/ring_buffer.h>
|
||||
#include <Source/Components/NetBindComponent.h>
|
||||
#include <Source/NetworkEntity/NetworkEntityUpdateMessage.h>
|
||||
#include <Multiplayer/NetBindComponent.h>
|
||||
#include <Multiplayer/NetworkEntityUpdateMessage.h>
|
||||
|
||||
namespace AzNetworking
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Source/Components/NetBindComponent.h>
|
||||
#include <Multiplayer/NetBindComponent.h>
|
||||
#include <AzCore/std/containers/ring_buffer.h>
|
||||
|
||||
namespace AzNetworking
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
#include <Source/NetworkEntity/EntityReplication/PropertySubscriber.h>
|
||||
#include <Source/NetworkEntity/EntityReplication/EntityReplicationManager.h>
|
||||
#include <Source/Components/NetBindComponent.h>
|
||||
#include <Multiplayer/NetBindComponent.h>
|
||||
|
||||
namespace Multiplayer
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <Source/NetworkEntity/EntityReplication/ReplicationRecord.h>
|
||||
#include <Multiplayer/ReplicationRecord.h>
|
||||
|
||||
namespace Multiplayer
|
||||
{
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
*/
|
||||
|
||||
#include <Source/NetworkEntity/NetworkEntityAuthorityTracker.h>
|
||||
#include <Source/Components/NetBindComponent.h>
|
||||
#include <Include/INetworkEntityManager.h>
|
||||
#include <Multiplayer/NetBindComponent.h>
|
||||
#include <Multiplayer/INetworkEntityManager.h>
|
||||
#include <AzCore/Console/IConsole.h>
|
||||
#include <AzCore/Console/ILogger.h>
|
||||
#include <AzNetworking/Utilities/NetworkCommon.h>
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <Include/NetworkEntityHandle.h>
|
||||
#include <Multiplayer/NetworkEntityHandle.h>
|
||||
#include <Multiplayer/MultiplayerController.h>
|
||||
#include <Multiplayer/MultiplayerComponent.h>
|
||||
#include <Multiplayer/NetBindComponent.h>
|
||||
#include <Source/NetworkEntity/NetworkEntityTracker.h>
|
||||
#include <Source/Components/NetBindComponent.h>
|
||||
#include <Source/Components/MultiplayerController.h>
|
||||
#include <Source/Components/MultiplayerComponent.h>
|
||||
#include <AzCore/Console/IConsole.h>
|
||||
#include <AzCore/Console/ILogger.h>
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
*/
|
||||
|
||||
#include <Source/NetworkEntity/NetworkEntityManager.h>
|
||||
|
||||
#include <AzCore/Asset/AssetManager.h>
|
||||
#include <AzCore/Console/IConsole.h>
|
||||
#include <AzCore/Console/ILogger.h>
|
||||
@@ -22,9 +21,9 @@
|
||||
#include <AzFramework/Entity/EntityContextBus.h>
|
||||
#include <AzFramework/Entity/GameEntityContextBus.h>
|
||||
#include <AzFramework/Spawnable/SpawnableEntitiesInterface.h>
|
||||
#include <Include/IMultiplayer.h>
|
||||
#include <Multiplayer/IMultiplayer.h>
|
||||
#include <Multiplayer/NetBindComponent.h>
|
||||
#include <Pipeline/NetworkSpawnableHolderComponent.h>
|
||||
#include <Source/Components/NetBindComponent.h>
|
||||
|
||||
namespace Multiplayer
|
||||
{
|
||||
@@ -38,7 +37,6 @@ namespace Multiplayer
|
||||
, m_onSpawnedHandler([this](AZ::Data::Asset<AzFramework::Spawnable> spawnable) { this->OnSpawned(spawnable); })
|
||||
, m_onDespawnedHandler([this](AZ::Data::Asset<AzFramework::Spawnable> spawnable) { this->OnDespawned(spawnable); })
|
||||
{
|
||||
AZ::Interface<INetworkEntityManager>::Register(this);
|
||||
AzFramework::RootSpawnableNotificationBus::Handler::BusConnect();
|
||||
|
||||
AzFramework::SpawnableEntitiesInterface::Get()->AddOnSpawnedHandler(m_onSpawnedHandler);
|
||||
@@ -48,7 +46,6 @@ namespace Multiplayer
|
||||
NetworkEntityManager::~NetworkEntityManager()
|
||||
{
|
||||
AzFramework::RootSpawnableNotificationBus::Handler::BusDisconnect();
|
||||
AZ::Interface<INetworkEntityManager>::Unregister(this);
|
||||
}
|
||||
|
||||
void NetworkEntityManager::Initialize(HostId hostId, AZStd::unique_ptr<IEntityDomain> entityDomain)
|
||||
@@ -365,9 +362,24 @@ namespace Multiplayer
|
||||
return returnList;
|
||||
}
|
||||
|
||||
INetworkEntityManager::EntityList NetworkEntityManager::CreateEntitiesImmediate(
|
||||
const PrefabEntityId& prefabEntryId, NetEntityId netEntityId, NetEntityRole netEntityRole,
|
||||
AutoActivate autoActivate, const AZ::Transform& transform)
|
||||
INetworkEntityManager::EntityList NetworkEntityManager::CreateEntitiesImmediate
|
||||
(
|
||||
const PrefabEntityId& prefabEntryId,
|
||||
NetEntityRole netEntityRole,
|
||||
const AZ::Transform& transform
|
||||
)
|
||||
{
|
||||
return CreateEntitiesImmediate(prefabEntryId, NextId(), netEntityRole, AutoActivate::Activate, transform);
|
||||
}
|
||||
|
||||
INetworkEntityManager::EntityList NetworkEntityManager::CreateEntitiesImmediate
|
||||
(
|
||||
const PrefabEntityId& prefabEntryId,
|
||||
NetEntityId netEntityId,
|
||||
NetEntityRole netEntityRole,
|
||||
AutoActivate autoActivate,
|
||||
const AZ::Transform& transform
|
||||
)
|
||||
{
|
||||
INetworkEntityManager::EntityList returnList;
|
||||
|
||||
@@ -436,7 +448,7 @@ namespace Multiplayer
|
||||
void NetworkEntityManager::OnRootSpawnableAssigned(
|
||||
[[maybe_unused]] AZ::Data::Asset<AzFramework::Spawnable> rootSpawnable, [[maybe_unused]] uint32_t generation)
|
||||
{
|
||||
auto* multiplayer = AZ::Interface<IMultiplayer>::Get();
|
||||
auto* multiplayer = GetMultiplayer();
|
||||
const auto agentType = multiplayer->GetAgentType();
|
||||
|
||||
if (agentType == MultiplayerAgentType::Client)
|
||||
@@ -448,7 +460,7 @@ namespace Multiplayer
|
||||
void NetworkEntityManager::OnRootSpawnableReleased([[maybe_unused]] uint32_t generation)
|
||||
{
|
||||
// TODO: Do we need to clear all entities here?
|
||||
auto* multiplayer = AZ::Interface<IMultiplayer>::Get();
|
||||
auto* multiplayer = GetMultiplayer();
|
||||
const auto agentType = multiplayer->GetAgentType();
|
||||
|
||||
if (agentType == MultiplayerAgentType::Client)
|
||||
@@ -494,7 +506,7 @@ namespace Multiplayer
|
||||
return;
|
||||
}
|
||||
|
||||
auto* multiplayer = AZ::Interface<IMultiplayer>::Get();
|
||||
auto* multiplayer = GetMultiplayer();
|
||||
|
||||
const auto agentType = multiplayer->GetAgentType();
|
||||
const bool spawnImmediately =
|
||||
|
||||
@@ -17,11 +17,11 @@
|
||||
#include <AzFramework/Spawnable/RootSpawnableInterface.h>
|
||||
#include <Source/NetworkEntity/NetworkEntityAuthorityTracker.h>
|
||||
#include <Source/NetworkEntity/NetworkEntityTracker.h>
|
||||
#include <Source/NetworkEntity/NetworkEntityRpcMessage.h>
|
||||
#include <Include/IEntityDomain.h>
|
||||
#include <Include/INetworkEntityManager.h>
|
||||
#include <Source/NetworkEntity/NetworkSpawnableLibrary.h>
|
||||
#include <Source/Components/MultiplayerComponentRegistry.h>
|
||||
#include <Multiplayer/IEntityDomain.h>
|
||||
#include <Multiplayer/INetworkEntityManager.h>
|
||||
#include <Multiplayer/MultiplayerComponentRegistry.h>
|
||||
#include <Multiplayer/NetworkEntityRpcMessage.h>
|
||||
|
||||
namespace Multiplayer
|
||||
{
|
||||
@@ -47,10 +47,20 @@ namespace Multiplayer
|
||||
ConstNetworkEntityHandle GetEntity(NetEntityId netEntityId) const override;
|
||||
|
||||
EntityList CreateEntitiesImmediate(const AzFramework::Spawnable& spawnable, NetEntityRole netEntityRole);
|
||||
|
||||
EntityList CreateEntitiesImmediate(
|
||||
const PrefabEntityId& prefabEntryId, NetEntityId netEntityId, NetEntityRole netEntityRole,
|
||||
AutoActivate autoActivate, const AZ::Transform& transform) override;
|
||||
EntityList CreateEntitiesImmediate
|
||||
(
|
||||
const PrefabEntityId& prefabEntryId,
|
||||
NetEntityRole netEntityRole,
|
||||
const AZ::Transform& transform
|
||||
) override;
|
||||
EntityList CreateEntitiesImmediate
|
||||
(
|
||||
const PrefabEntityId& prefabEntryId,
|
||||
NetEntityId netEntityId,
|
||||
NetEntityRole netEntityRole,
|
||||
AutoActivate autoActivate,
|
||||
const AZ::Transform& transform
|
||||
) override;
|
||||
|
||||
uint32_t GetEntityCount() const override;
|
||||
NetworkEntityHandle AddEntityToEntityMap(NetEntityId netEntityId, AZ::Entity* entity) override;
|
||||
@@ -81,7 +91,6 @@ namespace Multiplayer
|
||||
|
||||
private:
|
||||
void RemoveEntities();
|
||||
|
||||
NetEntityId NextId();
|
||||
|
||||
void OnSpawned(AZ::Data::Asset<AzFramework::Spawnable> spawnable);
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <Source/NetworkEntity/NetworkEntityRpcMessage.h>
|
||||
#include <Multiplayer/NetworkEntityRpcMessage.h>
|
||||
#include <AzNetworking/Serialization/NetworkInputSerializer.h>
|
||||
#include <AzNetworking/Serialization/NetworkOutputSerializer.h>
|
||||
#include <AzCore/Console/ILogger.h>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
#include <Source/NetworkEntity/NetworkEntityTracker.h>
|
||||
#include <Include/NetworkEntityHandle.h>
|
||||
#include <Multiplayer/NetworkEntityHandle.h>
|
||||
#include <AzCore/Console/IConsole.h>
|
||||
#include <AzCore/Console/ILogger.h>
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Include/MultiplayerTypes.h>
|
||||
#include <Include/NetworkEntityHandle.h>
|
||||
#include <Multiplayer/MultiplayerTypes.h>
|
||||
#include <Multiplayer/NetworkEntityHandle.h>
|
||||
#include <AzCore/std/containers/unordered_map.h>
|
||||
#include <AzCore/Component/Entity.h>
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <Source/NetworkEntity/NetworkEntityUpdateMessage.h>
|
||||
#include <Multiplayer/NetworkEntityUpdateMessage.h>
|
||||
#include <AzNetworking/Serialization/NetworkInputSerializer.h>
|
||||
#include <AzNetworking/Serialization/NetworkOutputSerializer.h>
|
||||
#include <AzCore/Console/ILogger.h>
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <Source/NetworkInput/NetworkInput.h>
|
||||
#include <Source/Components/NetBindComponent.h>
|
||||
#include <Multiplayer/NetworkInput.h>
|
||||
#include <Multiplayer/NetBindComponent.h>
|
||||
#include <AzCore/Console/IConsole.h>
|
||||
#include <AzCore/Console/ILogger.h>
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
#include <Source/NetworkInput/NetworkInputArray.h>
|
||||
#include <Include/INetworkEntityManager.h>
|
||||
#include <Multiplayer/INetworkEntityManager.h>
|
||||
#include <AzNetworking/Serialization/ISerializer.h>
|
||||
#include <AzNetworking/Serialization/DeltaSerializer.h>
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Source/NetworkInput/NetworkInput.h>
|
||||
#include <Include/NetworkEntityHandle.h>
|
||||
#include <Multiplayer/NetworkInput.h>
|
||||
#include <Multiplayer/NetworkEntityHandle.h>
|
||||
#include <AzCore/std/containers/array.h>
|
||||
#include <AzCore/std/containers/fixed_vector.h>
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
#include <Source/NetworkInput/NetworkInputChild.h>
|
||||
#include <Include/INetworkEntityManager.h>
|
||||
#include <Multiplayer/IMultiplayer.h>
|
||||
#include <AzNetworking/Serialization/ISerializer.h>
|
||||
|
||||
namespace Multiplayer
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Source/NetworkInput/NetworkInput.h>
|
||||
#include <Multiplayer/NetworkInput.h>
|
||||
|
||||
namespace Multiplayer
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Source/NetworkInput/NetworkInput.h>
|
||||
#include <Multiplayer/NetworkInput.h>
|
||||
#include <AzCore/std/containers/deque.h>
|
||||
|
||||
namespace Multiplayer
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
#include <Source/NetworkInput/NetworkInputMigrationVector.h>
|
||||
#include <Include/INetworkEntityManager.h>
|
||||
#include <Multiplayer/IMultiplayer.h>
|
||||
#include <AzNetworking/Serialization/ISerializer.h>
|
||||
|
||||
namespace Multiplayer
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Source/NetworkInput/NetworkInput.h>
|
||||
#include <Include/NetworkEntityHandle.h>
|
||||
#include <Multiplayer/NetworkInput.h>
|
||||
#include <Multiplayer/NetworkEntityHandle.h>
|
||||
#include <AzCore/std/containers/array.h>
|
||||
#include <AzCore/std/containers/fixed_vector.h>
|
||||
|
||||
|
||||
@@ -11,6 +11,9 @@
|
||||
*/
|
||||
|
||||
#include <Source/NetworkTime/NetworkTime.h>
|
||||
#include <Multiplayer/NetBindComponent.h>
|
||||
#include <Multiplayer/IMultiplayer.h>
|
||||
#include <AzFramework/Visibility/IVisibilitySystem.h>
|
||||
|
||||
namespace Multiplayer
|
||||
{
|
||||
@@ -51,11 +54,6 @@ namespace Multiplayer
|
||||
return m_hostTimeMs;
|
||||
}
|
||||
|
||||
void NetworkTime::SyncRewindableEntityState()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
AzNetworking::ConnectionId NetworkTime::GetRewindingConnectionId() const
|
||||
{
|
||||
return m_rewindingConnectionId;
|
||||
@@ -72,4 +70,38 @@ namespace Multiplayer
|
||||
m_hostTimeMs = timeMs;
|
||||
m_rewindingConnectionId = rewindConnectionId;
|
||||
}
|
||||
|
||||
void NetworkTime::SyncEntitiesToRewindState(const AZ::Aabb& rewindVolume)
|
||||
{
|
||||
// TODO: extrude rewind volume for initial gather
|
||||
AZStd::vector<AzFramework::VisibilityEntry*> gatheredEntries;
|
||||
AZ::Interface<AzFramework::IVisibilitySystem>::Get()->GetDefaultVisibilityScene()->Enumerate(rewindVolume, [&gatheredEntries](const AzFramework::IVisibilityScene::NodeData& nodeData)
|
||||
{
|
||||
gatheredEntries.reserve(gatheredEntries.size() + nodeData.m_entries.size());
|
||||
for (AzFramework::VisibilityEntry* visEntry : nodeData.m_entries)
|
||||
{
|
||||
if (visEntry->m_typeFlags & AzFramework::VisibilityEntry::TypeFlags::TYPE_Entity)
|
||||
{
|
||||
// TODO: offset aabb for exact rewound position and check against the non-extruded rewind volume
|
||||
gatheredEntries.push_back(visEntry);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
for (AzFramework::VisibilityEntry* visEntry : gatheredEntries)
|
||||
{
|
||||
AZ::Entity* entity = static_cast<AZ::Entity*>(visEntry->m_userData);
|
||||
[[maybe_unused]] NetBindComponent* entryNetBindComponent = entity->template FindComponent<NetBindComponent>();
|
||||
if (entryNetBindComponent != nullptr)
|
||||
{
|
||||
// TODO: invoke the sync to rewind event on the netBindComponent and add the entity to the rewound entity set
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void NetworkTime::ClearRewoundEntities()
|
||||
{
|
||||
AZ_Assert(!IsTimeRewound(), "Cannot clear rewound entity state while still within scoped rewind");
|
||||
// TODO: iterate all rewound entities, signal them to sync rewind state, and clear the rewound entity set
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Include/INetworkTime.h>
|
||||
#include <Multiplayer/INetworkTime.h>
|
||||
#include <AzCore/Component/Component.h>
|
||||
#include <AzCore/Console/IConsole.h>
|
||||
|
||||
@@ -33,10 +33,11 @@ namespace Multiplayer
|
||||
HostFrameId GetUnalteredHostFrameId() const override;
|
||||
void IncrementHostFrameId() override;
|
||||
AZ::TimeMs GetHostTimeMs() const override;
|
||||
void SyncRewindableEntityState() override;
|
||||
AzNetworking::ConnectionId GetRewindingConnectionId() const override;
|
||||
HostFrameId GetHostFrameIdForRewindingConnection(AzNetworking::ConnectionId rewindConnectionId) const override;
|
||||
void AlterTime(HostFrameId frameId, AZ::TimeMs timeMs, AzNetworking::ConnectionId rewindConnectionId) override;
|
||||
void SyncEntitiesToRewindState(const AZ::Aabb& rewindVolume) override;
|
||||
void ClearRewoundEntities() override;
|
||||
//! @}
|
||||
|
||||
private:
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include <AzToolsFramework/Prefab/Instance/Instance.h>
|
||||
#include <AzToolsFramework/Prefab/PrefabDomUtils.h>
|
||||
#include <Prefab/Spawnable/SpawnableUtils.h>
|
||||
#include <Source/Components/NetBindComponent.h>
|
||||
#include <Multiplayer/NetBindComponent.h>
|
||||
#include <Source/Pipeline/NetBindMarkerComponent.h>
|
||||
#include <Source/Pipeline/NetworkSpawnableHolderComponent.h>
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Include/IReplicationWindow.h>
|
||||
#include <Multiplayer/IReplicationWindow.h>
|
||||
|
||||
namespace Multiplayer
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
#include <Source/ReplicationWindows/ServerToClientReplicationWindow.h>
|
||||
#include <Source/Components/NetBindComponent.h>
|
||||
#include <Multiplayer/NetBindComponent.h>
|
||||
#include <AzFramework/Visibility/IVisibilitySystem.h>
|
||||
#include <AzCore/Component/TransformBus.h>
|
||||
#include <AzCore/Console/ILogger.h>
|
||||
@@ -65,7 +65,7 @@ namespace Multiplayer
|
||||
{
|
||||
AZ::Entity* entity = m_controlledEntity.GetEntity();
|
||||
AZ_Assert(entity, "Invalid controlled entity provided to replication window");
|
||||
m_controlledEntityTransform = entity->GetTransform();
|
||||
m_controlledEntityTransform = entity ? entity->GetTransform() : nullptr;
|
||||
AZ_Assert(m_controlledEntityTransform, "Controlled player entity must have a transform");
|
||||
|
||||
//// this one is optional
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Include/INetworkEntityManager.h>
|
||||
#include <Include/IReplicationWindow.h>
|
||||
#include <Include/NetworkEntityHandle.h>
|
||||
#include <Multiplayer/IMultiplayer.h>
|
||||
#include <Multiplayer/IReplicationWindow.h>
|
||||
#include <Multiplayer/NetworkEntityHandle.h>
|
||||
#include <AzNetworking/ConnectionLayer/IConnection.h>
|
||||
#include <AzCore/Component/EntityBus.h>
|
||||
#include <AzCore/EBus/ScheduledEvent.h>
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <Source/NetworkTime/RewindableObject.h>
|
||||
#include <Multiplayer/RewindableObject.h>
|
||||
#include <Multiplayer/IMultiplayer.h>
|
||||
#include <Source/NetworkTime/NetworkTime.h>
|
||||
#include <AzCore/Console/LoggerSystemComponent.h>
|
||||
#include <AzCore/Time/TimeSystemComponent.h>
|
||||
@@ -37,7 +38,7 @@ namespace UnitTest
|
||||
{
|
||||
test = i;
|
||||
EXPECT_EQ(i, test);
|
||||
AZ::Interface<Multiplayer::INetworkTime>::Get()->IncrementHostFrameId();
|
||||
Multiplayer::GetNetworkTime()->IncrementHostFrameId();
|
||||
}
|
||||
|
||||
for (uint32_t i = 0; i < 16; ++i)
|
||||
@@ -50,7 +51,7 @@ namespace UnitTest
|
||||
{
|
||||
test = i;
|
||||
EXPECT_EQ(i, test);
|
||||
AZ::Interface<Multiplayer::INetworkTime>::Get()->IncrementHostFrameId();
|
||||
Multiplayer::GetNetworkTime()->IncrementHostFrameId();
|
||||
}
|
||||
|
||||
for (uint32_t i = 16; i < 48; ++i)
|
||||
@@ -68,7 +69,7 @@ namespace UnitTest
|
||||
{
|
||||
test = i;
|
||||
EXPECT_EQ(i, test);
|
||||
AZ::Interface<Multiplayer::INetworkTime>::Get()->IncrementHostFrameId();
|
||||
Multiplayer::GetNetworkTime()->IncrementHostFrameId();
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
@@ -10,18 +10,29 @@
|
||||
#
|
||||
|
||||
set(FILES
|
||||
Include/IConnectionData.h
|
||||
Include/IEntityDomain.h
|
||||
Include/IMultiplayer.h
|
||||
Include/IMultiplayerComponentInput.h
|
||||
Include/INetworkEntityManager.h
|
||||
Include/INetworkTime.h
|
||||
Include/IReplicationWindow.h
|
||||
Include/MultiplayerStats.cpp
|
||||
Include/MultiplayerStats.h
|
||||
Include/MultiplayerTypes.h
|
||||
Include/NetworkEntityHandle.h
|
||||
Include/NetworkEntityHandle.inl
|
||||
Include/Multiplayer/IConnectionData.h
|
||||
Include/Multiplayer/IEntityDomain.h
|
||||
Include/Multiplayer/IMultiplayer.h
|
||||
Include/Multiplayer/IMultiplayerComponentInput.h
|
||||
Include/Multiplayer/INetworkEntityManager.h
|
||||
Include/Multiplayer/INetworkPlayerSpawner.h
|
||||
Include/Multiplayer/INetworkTime.h
|
||||
Include/Multiplayer/IReplicationWindow.h
|
||||
Include/Multiplayer/MultiplayerComponent.h
|
||||
Include/Multiplayer/MultiplayerController.h
|
||||
Include/Multiplayer/MultiplayerComponentRegistry.h
|
||||
Include/Multiplayer/MultiplayerStats.cpp
|
||||
Include/Multiplayer/MultiplayerStats.h
|
||||
Include/Multiplayer/MultiplayerTypes.h
|
||||
Include/Multiplayer/NetBindComponent.h
|
||||
Include/Multiplayer/NetworkEntityRpcMessage.h
|
||||
Include/Multiplayer/NetworkEntityUpdateMessage.h
|
||||
Include/Multiplayer/NetworkEntityHandle.h
|
||||
Include/Multiplayer/NetworkEntityHandle.inl
|
||||
Include/Multiplayer/NetworkInput.h
|
||||
Include/Multiplayer/ReplicationRecord.h
|
||||
Include/Multiplayer/RewindableObject.h
|
||||
Include/Multiplayer/RewindableObject.inl
|
||||
Source/Multiplayer_precompiled.cpp
|
||||
Source/Multiplayer_precompiled.h
|
||||
Source/MultiplayerSystemComponent.cpp
|
||||
@@ -36,14 +47,10 @@ set(FILES
|
||||
Source/AutoGen/NetworkTransformComponent.AutoComponent.xml
|
||||
Source/Components/LocalPredictionPlayerInputComponent.cpp
|
||||
Source/Components/LocalPredictionPlayerInputComponent.h
|
||||
Source/Components/MultiplayerComponentRegistry.cpp
|
||||
Source/Components/MultiplayerComponentRegistry.h
|
||||
Source/Components/MultiplayerComponent.cpp
|
||||
Source/Components/MultiplayerComponent.h
|
||||
Source/Components/MultiplayerController.cpp
|
||||
Source/Components/MultiplayerController.h
|
||||
Source/Components/MultiplayerComponentRegistry.cpp
|
||||
Source/Components/NetBindComponent.cpp
|
||||
Source/Components/NetBindComponent.h
|
||||
Source/Components/NetworkTransformComponent.cpp
|
||||
Source/Components/NetworkTransformComponent.h
|
||||
Source/ConnectionData/ClientToServerConnectionData.cpp
|
||||
@@ -64,7 +71,6 @@ set(FILES
|
||||
Source/NetworkEntity/EntityReplication/PropertySubscriber.cpp
|
||||
Source/NetworkEntity/EntityReplication/PropertySubscriber.h
|
||||
Source/NetworkEntity/EntityReplication/ReplicationRecord.cpp
|
||||
Source/NetworkEntity/EntityReplication/ReplicationRecord.h
|
||||
Source/NetworkEntity/NetworkEntityAuthorityTracker.cpp
|
||||
Source/NetworkEntity/NetworkEntityAuthorityTracker.h
|
||||
Source/NetworkEntity/NetworkEntityHandle.cpp
|
||||
@@ -73,14 +79,11 @@ set(FILES
|
||||
Source/NetworkEntity/NetworkSpawnableLibrary.cpp
|
||||
Source/NetworkEntity/NetworkSpawnableLibrary.h
|
||||
Source/NetworkEntity/NetworkEntityRpcMessage.cpp
|
||||
Source/NetworkEntity/NetworkEntityRpcMessage.h
|
||||
Source/NetworkEntity/NetworkEntityTracker.cpp
|
||||
Source/NetworkEntity/NetworkEntityTracker.h
|
||||
Source/NetworkEntity/NetworkEntityTracker.inl
|
||||
Source/NetworkEntity/NetworkEntityUpdateMessage.cpp
|
||||
Source/NetworkEntity/NetworkEntityUpdateMessage.h
|
||||
Source/NetworkInput/NetworkInput.cpp
|
||||
Source/NetworkInput/NetworkInput.h
|
||||
Source/NetworkInput/NetworkInputArray.cpp
|
||||
Source/NetworkInput/NetworkInputArray.h
|
||||
Source/NetworkInput/NetworkInputChild.cpp
|
||||
@@ -91,8 +94,6 @@ set(FILES
|
||||
Source/NetworkInput/NetworkInputMigrationVector.h
|
||||
Source/NetworkTime/NetworkTime.cpp
|
||||
Source/NetworkTime/NetworkTime.h
|
||||
Source/NetworkTime/RewindableObject.h
|
||||
Source/NetworkTime/RewindableObject.inl
|
||||
Source/Pipeline/NetBindMarkerComponent.cpp
|
||||
Source/Pipeline/NetBindMarkerComponent.h
|
||||
Source/Pipeline/NetworkSpawnableHolderComponent.cpp
|
||||
|
||||
Reference in New Issue
Block a user