Merge branch 'development' into cmake/AddressSanitizer
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -1568,8 +1568,7 @@ namespace {{ Component.attrib['Namespace'] }}
|
||||
return s_netComponentId;
|
||||
}
|
||||
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4065) // switch statement contains 'default' but no 'case' labels
|
||||
AZ_PUSH_DISABLE_WARNING(4065, "-Wunknown-warning-option") // switch statement contains 'default' but no 'case' labels
|
||||
bool {{ ComponentBaseName }}::HandleRpcMessage
|
||||
(
|
||||
[[maybe_unused]] AzNetworking::IConnection* invokingConnection,
|
||||
@@ -1587,10 +1586,8 @@ namespace {{ Component.attrib['Namespace'] }}
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
AZ_Assert(0, "Got unhandled RpcType %d in {{ ComponentBaseName }}", static_cast<int32_t>(rpcType));
|
||||
return false;
|
||||
}
|
||||
#pragma warning(pop)
|
||||
AZ_POP_DISABLE_WARNING
|
||||
|
||||
bool {{ ComponentBaseName }}::SerializeStateDeltaMessage(Multiplayer::ReplicationRecord& replicationRecord, AzNetworking::ISerializer& serializer)
|
||||
{
|
||||
|
||||
@@ -277,7 +277,7 @@ namespace Multiplayer
|
||||
input.SetClientInputId(GetLastInputId());
|
||||
|
||||
ScopedAlterTime scopedTime(input.GetHostFrameId(), input.GetHostTimeMs(), input.GetHostBlendFactor(), invokingConnection->GetConnectionId());
|
||||
GetNetBindComponent()->ProcessInput(input, clientInputRateSec);
|
||||
GetNetBindComponent()->ProcessInput(input, static_cast<float>(clientInputRateSec));
|
||||
|
||||
AZLOG(NET_Prediction, "Migrated InputId=%d", aznumeric_cast<int32_t>(input.GetClientInputId()));
|
||||
|
||||
@@ -345,7 +345,7 @@ namespace Multiplayer
|
||||
// Reprocess the input for this frame
|
||||
NetworkInput& input = m_inputHistory[replayIndex];
|
||||
ScopedAlterTime scopedTime(input.GetHostFrameId(), input.GetHostTimeMs(), input.GetHostBlendFactor(), invokingConnection->GetConnectionId());
|
||||
GetNetBindComponent()->ReprocessInput(input, clientInputRateSec);
|
||||
GetNetBindComponent()->ReprocessInput(input, static_cast<float>(clientInputRateSec));
|
||||
|
||||
AZLOG(NET_Prediction, "Replayed InputId=%d", aznumeric_cast<int32_t>(input.GetClientInputId()));
|
||||
}
|
||||
@@ -438,10 +438,10 @@ namespace Multiplayer
|
||||
input.SetHostBlendFactor(multiplayer->GetCurrentBlendFactor());
|
||||
|
||||
// Allow components to form the input for this frame
|
||||
GetNetBindComponent()->CreateInput(input, clientInputRateSec);
|
||||
GetNetBindComponent()->CreateInput(input, static_cast<float>(clientInputRateSec));
|
||||
|
||||
// Process the input for this frame
|
||||
GetNetBindComponent()->ProcessInput(input, clientInputRateSec);
|
||||
GetNetBindComponent()->ProcessInput(input, static_cast<float>(clientInputRateSec));
|
||||
|
||||
AZLOG(NET_Prediction, "Processed InputId=%d", aznumeric_cast<int32_t>(m_clientInputId));
|
||||
|
||||
@@ -464,7 +464,7 @@ namespace Multiplayer
|
||||
{
|
||||
// Clamp to oldest element if history is too small
|
||||
const int64_t historyIndex = AZStd::max<int64_t>(inputHistorySize - 1 - i, 0);
|
||||
inputArray[i] = m_inputHistory[historyIndex];
|
||||
inputArray[static_cast<uint32_t>(i)] = m_inputHistory[historyIndex];
|
||||
}
|
||||
|
||||
#ifndef AZ_RELEASE_BUILD
|
||||
@@ -506,7 +506,7 @@ namespace Multiplayer
|
||||
NetworkInput& input = m_lastInputReceived[0];
|
||||
{
|
||||
ScopedAlterTime scopedTime(input.GetHostFrameId(), input.GetHostTimeMs(), DefaultBlendFactor, GetNetBindComponent()->GetOwningConnectionId());
|
||||
GetNetBindComponent()->ProcessInput(input, clientInputRateSec);
|
||||
GetNetBindComponent()->ProcessInput(input, static_cast<float>(clientInputRateSec));
|
||||
}
|
||||
|
||||
AZLOG(NET_Prediction, "Forced InputId=%d", aznumeric_cast<int32_t>(input.GetClientInputId()));
|
||||
|
||||
@@ -1006,7 +1006,7 @@ namespace Multiplayer
|
||||
const char* addressStr = mutableAddress;
|
||||
const char* portStr = &(mutableAddress[portSeparator + 1]);
|
||||
int32_t portNumber = atol(portStr);
|
||||
AZ::Interface<IMultiplayer>::Get()->Connect(addressStr, portNumber);
|
||||
AZ::Interface<IMultiplayer>::Get()->Connect(addressStr, static_cast<uint16_t>(portNumber));
|
||||
}
|
||||
}
|
||||
AZ_CONSOLEFREEFUNC(connect, AZ::ConsoleFunctorFlags::DontReplicate, "Opens a multiplayer connection to a remote host");
|
||||
|
||||
Reference in New Issue
Block a user