Debug overlay for kpbs per entity works

Signed-off-by: AMZN-Olex <5432499+AMZN-Olex@users.noreply.github.com>
This commit is contained in:
AMZN-Olex
2021-07-27 15:49:41 -04:00
parent 8fa3addda3
commit 5ebb096d1a
5 changed files with 138 additions and 38 deletions
@@ -101,6 +101,11 @@ namespace Multiplayer
void MultiplayerStats::RecordRpcReceived(NetComponentId netComponentId, RpcIndex rpcId, uint32_t totalBytes)
{
if (auto* perEntityStats = AZ::Interface<MultiplayerDiagnostics::MultiplayerIPerEntityStats>::Get())
{
perEntityStats->RecordRpcReceived(netComponentId, rpcId, totalBytes);
}
const uint16_t netComponentIndex = aznumeric_cast<uint16_t>(netComponentId);
const uint16_t rpcIndex = aznumeric_cast<uint16_t>(rpcId);
m_componentStats[netComponentIndex].m_rpcsRecv[rpcIndex].m_totalCalls++;