Add server side accounting for blend factor

Signed-off-by: puvvadar <puvvadar@amazon.com>
This commit is contained in:
puvvadar
2021-07-20 14:12:06 -07:00
parent 7950c2b549
commit ebe326f6e9
6 changed files with 30 additions and 2 deletions
@@ -75,6 +75,16 @@ namespace Multiplayer
return m_hostTimeMs;
}
void NetworkInput::SetHostBlendFactor(float hostBlendFactor)
{
m_hostBlendFactor = hostBlendFactor;
}
float NetworkInput::GetHostBlendFactor() const
{
return m_hostBlendFactor;
}
void NetworkInput::AttachNetBindComponent(NetBindComponent* netBindComponent)
{
m_wasAttached = true;
@@ -90,7 +100,8 @@ namespace Multiplayer
{
if (!serializer.Serialize(m_inputId, "InputId")
|| !serializer.Serialize(m_hostTimeMs, "HostTimeMs")
|| !serializer.Serialize(m_hostFrameId, "HostFrameId"))
|| !serializer.Serialize(m_hostFrameId, "HostFrameId")
|| !serializer.Serialize(m_hostBlendFactor, "HostBlendFactor"))
{
return false;
}
@@ -163,6 +174,7 @@ namespace Multiplayer
m_inputId = rhs.m_inputId;
m_hostFrameId = rhs.m_hostFrameId;
m_hostTimeMs = rhs.m_hostTimeMs;
m_hostBlendFactor = rhs.m_hostBlendFactor;
m_componentInputs.resize(rhs.m_componentInputs.size());
for (int32_t i = 0; i < rhs.m_componentInputs.size(); ++i)
{