diff options
| author | oy <Tom_Adams@web.de> | 2011-02-16 12:31:47 +0100 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2011-02-16 12:31:47 +0100 |
| commit | d939b841250180d89cd5843ff40e82d00b443c37 (patch) | |
| tree | d48055f92ae7531f937769bbe63352f9db1d4052 /src/engine | |
| parent | b63dbfede548bb9eb0ad7a5b7a83a8a3fac1e1f1 (diff) | |
| download | zcatch-d939b841250180d89cd5843ff40e82d00b443c37.tar.gz zcatch-d939b841250180d89cd5843ff40e82d00b443c37.zip | |
removed no longer needed progression browse info
Diffstat (limited to 'src/engine')
| -rw-r--r-- | src/engine/client/client.cpp | 1 | ||||
| -rw-r--r-- | src/engine/client/srvbrowse.cpp | 9 | ||||
| -rw-r--r-- | src/engine/server.h | 2 | ||||
| -rw-r--r-- | src/engine/server/server.cpp | 19 | ||||
| -rw-r--r-- | src/engine/server/server.h | 4 | ||||
| -rw-r--r-- | src/engine/serverbrowser.h | 3 |
6 files changed, 2 insertions, 36 deletions
diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index 13e59ac5..62585ef7 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -1077,7 +1077,6 @@ void CClient::ProcessPacket(CNetChunk *pPacket) str_copy(Info.m_aMap, Up.GetString(CUnpacker::SANITIZE_CC|CUnpacker::SKIP_START_WHITESPACES), sizeof(Info.m_aMap)); str_copy(Info.m_aGameType, Up.GetString(CUnpacker::SANITIZE_CC|CUnpacker::SKIP_START_WHITESPACES), sizeof(Info.m_aGameType)); Info.m_Flags = str_toint(Up.GetString()); - Info.m_Progression = str_toint(Up.GetString()); Info.m_NumPlayers = str_toint(Up.GetString()); Info.m_MaxPlayers = str_toint(Up.GetString()); diff --git a/src/engine/client/srvbrowse.cpp b/src/engine/client/srvbrowse.cpp index 7330850b..b9eeac11 100644 --- a/src/engine/client/srvbrowse.cpp +++ b/src/engine/client/srvbrowse.cpp @@ -109,13 +109,6 @@ bool CServerBrowser::SortCompareGametype(int Index1, int Index2) const return str_comp(a->m_Info.m_aGameType, b->m_Info.m_aGameType) < 0; } -bool CServerBrowser::SortCompareProgression(int Index1, int Index2) const -{ - CServerEntry *a = m_ppServerlist[Index1]; - CServerEntry *b = m_ppServerlist[Index2]; - return a->m_Info.m_Progression < b->m_Info.m_Progression; -} - bool CServerBrowser::SortCompareNumPlayers(int Index1, int Index2) const { CServerEntry *a = m_ppServerlist[Index1]; @@ -257,8 +250,6 @@ void CServerBrowser::Sort() std::sort(m_pSortedServerlist, m_pSortedServerlist+m_NumSortedServers, SortWrap(this, &CServerBrowser::SortCompareNumPlayers)); else if(g_Config.m_BrSort == IServerBrowser::SORT_GAMETYPE) std::sort(m_pSortedServerlist, m_pSortedServerlist+m_NumSortedServers, SortWrap(this, &CServerBrowser::SortCompareGametype)); - else if(g_Config.m_BrSort == IServerBrowser::SORT_PROGRESSION) - std::sort(m_pSortedServerlist, m_pSortedServerlist+m_NumSortedServers, SortWrap(this, &CServerBrowser::SortCompareProgression)); // invert the list if requested if(g_Config.m_BrSortOrder) diff --git a/src/engine/server.h b/src/engine/server.h index eb980d17..18d92dfe 100644 --- a/src/engine/server.h +++ b/src/engine/server.h @@ -42,7 +42,6 @@ public: return SendMsg(&Packer, Flags, ClientID); } - virtual void SetBrowseInfo(char const *pGameType, int Progression) = 0; virtual void SetClientName(int ClientID, char const *pName) = 0; virtual void SetClientScore(int ClientID, int Score) = 0; @@ -78,6 +77,7 @@ public: virtual void OnClientDirectInput(int ClientID, void *pInput) = 0; virtual void OnClientPredictedInput(int ClientID, void *pInput) = 0; + virtual const char *GameType() = 0; virtual const char *Version() = 0; virtual const char *NetVersion() = 0; }; diff --git a/src/engine/server/server.cpp b/src/engine/server/server.cpp index b6d465ac..5341a38c 100644 --- a/src/engine/server/server.cpp +++ b/src/engine/server/server.cpp @@ -178,9 +178,6 @@ CServer::CServer() : m_DemoRecorder(&m_SnapshotDelta) m_CurrentGameTick = 0; m_RunServer = 1; - mem_zero(m_aBrowseinfoGametype, sizeof(m_aBrowseinfoGametype)); - m_BrowseinfoProgression = -1; - m_pCurrentMapData = 0; m_CurrentMapSize = 0; @@ -253,16 +250,6 @@ void CServer::SetClientScore(int ClientID, int Score) m_aClients[ClientID].m_Score = Score; } -void CServer::SetBrowseInfo(const char *pGameType, int Progression) -{ - str_copy(m_aBrowseinfoGametype, pGameType, sizeof(m_aBrowseinfoGametype)); - m_BrowseinfoProgression = Progression; - if(m_BrowseinfoProgression > 100) - m_BrowseinfoProgression = 100; - if(m_BrowseinfoProgression < -1) - m_BrowseinfoProgression = -1; -} - void CServer::Kick(int ClientID, const char *pReason) { if(ClientID < 0 || ClientID >= MAX_CLIENTS || m_aClients[ClientID].m_State == CClient::STATE_EMPTY) @@ -910,7 +897,7 @@ void CServer::SendServerInfo(NETADDR *pAddr, int Token) p.AddString(GetMapName(), 32); // gametype - p.AddString(m_aBrowseinfoGametype, 16); + p.AddString(GameServer()->GameType(), 16); // flags int i = 0; @@ -919,10 +906,6 @@ void CServer::SendServerInfo(NETADDR *pAddr, int Token) str_format(aBuf, sizeof(aBuf), "%d", i); p.AddString(aBuf, 2); - // progression - str_format(aBuf, sizeof(aBuf), "%d", m_BrowseinfoProgression); - p.AddString(aBuf, 4); - str_format(aBuf, sizeof(aBuf), "%d", PlayerCount); p.AddString(aBuf, 3); // num players str_format(aBuf, sizeof(aBuf), "%d", m_NetServer.MaxClients()); p.AddString(aBuf, 3); // max players diff --git a/src/engine/server/server.h b/src/engine/server/server.h index f3726eba..6bee026e 100644 --- a/src/engine/server/server.h +++ b/src/engine/server/server.h @@ -111,9 +111,6 @@ public: int m_MapReload; int m_RconClientID; - char m_aBrowseinfoGametype[16]; - int m_BrowseinfoProgression; - int64 m_Lastheartbeat; //static NETADDR4 master_server; @@ -132,7 +129,6 @@ public: virtual void SetClientName(int ClientID, const char *pName); virtual void SetClientScore(int ClientID, int Score); - virtual void SetBrowseInfo(const char *pGameType, int Progression); void Kick(int ClientID, const char *pReason); diff --git a/src/engine/serverbrowser.h b/src/engine/serverbrowser.h index 98a24f7a..07f544e8 100644 --- a/src/engine/serverbrowser.h +++ b/src/engine/serverbrowser.h @@ -28,7 +28,6 @@ public: int m_QuickSearchHit; - int m_Progression; int m_MaxPlayers; int m_NumPlayers; int m_Flags; @@ -52,7 +51,6 @@ public: SORT_PING - Sort by ping. SORT_MAP - Sort by map SORT_GAMETYPE - Sort by game type. DM, TDM etc. - SORT_PROGRESSION - Sort by progression. SORT_NUMPLAYERS - Sort after how many players there are on the server. */ enum{ @@ -60,7 +58,6 @@ public: SORT_PING, SORT_MAP, SORT_GAMETYPE, - SORT_PROGRESSION, SORT_NUMPLAYERS, QUICK_SERVERNAME=1, |