diff --git a/datasrc/network.py b/datasrc/network.py index 1c8fcd911..f36527c48 100644 --- a/datasrc/network.py +++ b/datasrc/network.py @@ -216,17 +216,15 @@ Objects = [ NetObject("ClientInfo", [ # 4*4 = 16 characters - NetTwIntString("m_Name0"), NetTwIntString("m_Name1"), NetTwIntString("m_Name2"), - NetTwIntString("m_Name3"), + NetArray(NetTwIntString("m_aName"), 4), # 4*3 = 12 characters - NetTwIntString("m_Clan0"), NetTwIntString("m_Clan1"), NetTwIntString("m_Clan2"), + NetArray(NetTwIntString("m_aClan"), 3), NetIntAny("m_Country"), # 4*6 = 24 characters - NetTwIntString("m_Skin0"), NetTwIntString("m_Skin1"), NetTwIntString("m_Skin2"), - NetTwIntString("m_Skin3"), NetTwIntString("m_Skin4"), NetTwIntString("m_Skin5"), + NetArray(NetTwIntString("m_aSkin"), 6), NetIntRange("m_UseCustomColor", 0, 1), diff --git a/src/game/client/gameclient.cpp b/src/game/client/gameclient.cpp index 84bb4ddff..c54c59bc4 100644 --- a/src/game/client/gameclient.cpp +++ b/src/game/client/gameclient.cpp @@ -1533,13 +1533,13 @@ void CGameClient::OnNewSnapshot() { CClientData *pClient = &m_aClients[ClientId]; - if(!IntsToStr(&pInfo->m_Name0, 4, pClient->m_aName, std::size(pClient->m_aName))) + if(!IntsToStr(pInfo->m_aName, 4, pClient->m_aName, std::size(pClient->m_aName))) { str_copy(pClient->m_aName, "nameless tee"); } - IntsToStr(&pInfo->m_Clan0, 3, pClient->m_aClan, std::size(pClient->m_aClan)); + IntsToStr(pInfo->m_aClan, 3, pClient->m_aClan, std::size(pClient->m_aClan)); pClient->m_Country = pInfo->m_Country; - IntsToStr(&pInfo->m_Skin0, 6, pClient->m_aSkinName, std::size(pClient->m_aSkinName)); + IntsToStr(pInfo->m_aSkin, 6, pClient->m_aSkinName, std::size(pClient->m_aSkinName)); pClient->m_UseCustomColor = pInfo->m_UseCustomColor; pClient->m_ColorBody = pInfo->m_ColorBody; diff --git a/src/game/client/sixup_translate_snapshot.cpp b/src/game/client/sixup_translate_snapshot.cpp index 2c33f4e1d..8555fe78c 100644 --- a/src/game/client/sixup_translate_snapshot.cpp +++ b/src/game/client/sixup_translate_snapshot.cpp @@ -146,10 +146,10 @@ int CGameClient::TranslateSnap(CSnapshot *pSnapDstSix, CSnapshot *pSnapSrcSeven, return -2; CNetObj_ClientInfo Info6 = {}; - StrToInts(&Info6.m_Name0, 4, Client.m_aName); - StrToInts(&Info6.m_Clan0, 3, Client.m_aClan); + StrToInts(Info6.m_aName, 4, Client.m_aName); + StrToInts(Info6.m_aClan, 3, Client.m_aClan); Info6.m_Country = Client.m_Country; - StrToInts(&Info6.m_Skin0, 6, Client.m_aSkinName); + StrToInts(Info6.m_aSkin, 6, Client.m_aSkinName); Info6.m_UseCustomColor = Client.m_UseCustomColor; Info6.m_ColorBody = Client.m_ColorBody; Info6.m_ColorFeet = Client.m_ColorFeet; diff --git a/src/game/server/player.cpp b/src/game/server/player.cpp index 2b638cc8b..c2fc83fd5 100644 --- a/src/game/server/player.cpp +++ b/src/game/server/player.cpp @@ -317,10 +317,10 @@ void CPlayer::Snap(int SnappingClient) if(!pClientInfo) return; - StrToInts(&pClientInfo->m_Name0, 4, Server()->ClientName(m_ClientId)); - StrToInts(&pClientInfo->m_Clan0, 3, Server()->ClientClan(m_ClientId)); + StrToInts(pClientInfo->m_aName, 4, Server()->ClientName(m_ClientId)); + StrToInts(pClientInfo->m_aClan, 3, Server()->ClientClan(m_ClientId)); pClientInfo->m_Country = Server()->ClientCountry(m_ClientId); - StrToInts(&pClientInfo->m_Skin0, 6, m_TeeInfos.m_aSkinName); + StrToInts(pClientInfo->m_aSkin, 6, m_TeeInfos.m_aSkinName); pClientInfo->m_UseCustomColor = m_TeeInfos.m_UseCustomColor; pClientInfo->m_ColorBody = m_TeeInfos.m_ColorBody; pClientInfo->m_ColorFeet = m_TeeInfos.m_ColorFeet; @@ -467,9 +467,9 @@ void CPlayer::FakeSnap() if(!pClientInfo) return; - StrToInts(&pClientInfo->m_Name0, 4, " "); - StrToInts(&pClientInfo->m_Clan0, 3, ""); - StrToInts(&pClientInfo->m_Skin0, 6, "default"); + StrToInts(pClientInfo->m_aName, 4, " "); + StrToInts(pClientInfo->m_aClan, 3, ""); + StrToInts(pClientInfo->m_aSkin, 6, "default"); if(m_Paused != PAUSE_PAUSED) return; diff --git a/src/tools/demo_extract_chat.cpp b/src/tools/demo_extract_chat.cpp index 323b139c9..da37c5056 100644 --- a/src/tools/demo_extract_chat.cpp +++ b/src/tools/demo_extract_chat.cpp @@ -98,7 +98,7 @@ public: if(ClientId < MAX_CLIENTS) { CClientData *pClient = &m_aClients[ClientId]; - IntsToStr(&pInfo->m_Name0, 4, pClient->m_aName, sizeof(pClient->m_aName)); + IntsToStr(pInfo->m_aName, 4, pClient->m_aName, sizeof(pClient->m_aName)); } } }