diff options
| author | oy <Tom_Adams@web.de> | 2011-03-15 11:23:49 +0100 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2011-03-15 11:23:49 +0100 |
| commit | 30d9c9f4d9e46fec403f3fa810898017a18e93b6 (patch) | |
| tree | 722a14c6fb470c65e21a1ec8daab0c1391c03d38 /src/game/server | |
| parent | 27e5a6af0d09192e1a865332f35bde4a0ac180dd (diff) | |
| download | zcatch-30d9c9f4d9e46fec403f3fa810898017a18e93b6.tar.gz zcatch-30d9c9f4d9e46fec403f3fa810898017a18e93b6.zip | |
made network support clan name and country code for players
Diffstat (limited to 'src/game/server')
| -rw-r--r-- | src/game/server/gamecontext.cpp | 4 | ||||
| -rw-r--r-- | src/game/server/player.cpp | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/game/server/gamecontext.cpp b/src/game/server/gamecontext.cpp index 8c3dc3e3..348b6735 100644 --- a/src/game/server/gamecontext.cpp +++ b/src/game/server/gamecontext.cpp @@ -796,6 +796,8 @@ void CGameContext::OnMessage(int MsgID, CUnpacker *pUnpacker, int ClientID) // set start infos Server()->SetClientName(ClientID, pMsg->m_pName); + Server()->SetClientClan(ClientID, pMsg->m_pClan); + Server()->SetClientCountry(ClientID, pMsg->m_Country); str_copy(pPlayer->m_TeeInfos.m_SkinName, pMsg->m_pSkin, sizeof(pPlayer->m_TeeInfos.m_SkinName)); pPlayer->m_TeeInfos.m_UseCustomColor = pMsg->m_UseCustomColor; pPlayer->m_TeeInfos.m_ColorBody = pMsg->m_ColorBody; @@ -840,6 +842,8 @@ void CGameContext::OnMessage(int MsgID, CUnpacker *pUnpacker, int ClientID) str_format(aChatText, sizeof(aChatText), "'%s' changed name to '%s'", aOldName, Server()->ClientName(ClientID)); SendChat(-1, CGameContext::CHAT_ALL, aChatText); } + Server()->SetClientClan(ClientID, pMsg->m_pClan); + Server()->SetClientCountry(ClientID, pMsg->m_Country); str_copy(pPlayer->m_TeeInfos.m_SkinName, pMsg->m_pSkin, sizeof(pPlayer->m_TeeInfos.m_SkinName)); pPlayer->m_TeeInfos.m_UseCustomColor = pMsg->m_UseCustomColor; pPlayer->m_TeeInfos.m_ColorBody = pMsg->m_ColorBody; diff --git a/src/game/server/player.cpp b/src/game/server/player.cpp index 82b45011..6c118a19 100644 --- a/src/game/server/player.cpp +++ b/src/game/server/player.cpp @@ -107,7 +107,9 @@ void CPlayer::Snap(int SnappingClient) if(!pClientInfo) return; - StrToInts(&pClientInfo->m_Name0, 6, Server()->ClientName(m_ClientID)); + StrToInts(&pClientInfo->m_Name0, 4, Server()->ClientName(m_ClientID)); + StrToInts(&pClientInfo->m_Clan0, 3, Server()->ClientClan(m_ClientID)); + pClientInfo->m_Country = Server()->ClientCountry(m_ClientID); StrToInts(&pClientInfo->m_Skin0, 6, m_TeeInfos.m_SkinName); pClientInfo->m_UseCustomColor = m_TeeInfos.m_UseCustomColor; pClientInfo->m_ColorBody = m_TeeInfos.m_ColorBody; |