Integrating up through commit 90f050496
This commit is contained in:
@@ -33,7 +33,7 @@ namespace Multiplayer
|
||||
|
||||
//! Constructor.
|
||||
//! @param connectionId the connectionId of the connection that owns the object.
|
||||
RewindableObject(AzNetworking::ConnectionId owningConnectionId);
|
||||
RewindableObject(const BASE_TYPE& value);
|
||||
|
||||
//! Copy construct from underlying base type.
|
||||
//! @param value base type value to construct from
|
||||
@@ -52,6 +52,10 @@ namespace Multiplayer
|
||||
//! @param rhs rewindable history buffer to assign from
|
||||
RewindableObject& operator = (const RewindableObject& rhs);
|
||||
|
||||
//! Sets the owning connectionId for the given rewindable object instance.
|
||||
//! @param owningConnectionId the new connectionId to use as the owning connectionId.
|
||||
void SetOwningConnectionId(AzNetworking::ConnectionId owningConnectionId);
|
||||
|
||||
//! Const base type operator.
|
||||
//! @return value in const base type form
|
||||
operator const BASE_TYPE&() const;
|
||||
@@ -106,4 +110,9 @@ namespace Multiplayer
|
||||
};
|
||||
}
|
||||
|
||||
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>
|
||||
|
||||
@@ -15,10 +15,9 @@
|
||||
namespace Multiplayer
|
||||
{
|
||||
template <typename BASE_TYPE, AZStd::size_t REWIND_SIZE>
|
||||
inline RewindableObject<BASE_TYPE, REWIND_SIZE>::RewindableObject(AzNetworking::ConnectionId owningConnectionId)
|
||||
: m_owningConnectionId(owningConnectionId)
|
||||
inline RewindableObject<BASE_TYPE, REWIND_SIZE>::RewindableObject(const BASE_TYPE& value)
|
||||
{
|
||||
m_history.fill(BASE_TYPE());
|
||||
m_history.fill(value);
|
||||
}
|
||||
|
||||
template <typename BASE_TYPE, AZStd::size_t REWIND_SIZE>
|
||||
@@ -53,6 +52,12 @@ namespace Multiplayer
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <typename BASE_TYPE, AZStd::size_t REWIND_SIZE>
|
||||
inline void RewindableObject<BASE_TYPE, REWIND_SIZE>::SetOwningConnectionId(AzNetworking::ConnectionId owningConnectionId)
|
||||
{
|
||||
m_owningConnectionId = owningConnectionId;
|
||||
}
|
||||
|
||||
template <typename BASE_TYPE, AZStd::size_t REWIND_SIZE>
|
||||
inline RewindableObject<BASE_TYPE, REWIND_SIZE>::operator const BASE_TYPE& () const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user