Remove dead code

This commit is contained in:
Robert Müller 2022-12-12 23:08:44 +01:00
parent 11f5162be8
commit 6d3baed69d
2 changed files with 1 additions and 18 deletions

View file

@ -1547,7 +1547,6 @@ void CGameContext::OnClientDrop(int ClientID, const char *pReason)
delete m_apPlayers[ClientID]; delete m_apPlayers[ClientID];
m_apPlayers[ClientID] = 0; m_apPlayers[ClientID] = 0;
//(void)m_pController->CheckTeamBalance();
m_VoteUpdate = true; m_VoteUpdate = true;
// update spectator modes // update spectator modes
@ -2046,7 +2045,6 @@ void CGameContext::OnMessage(int MsgID, CUnpacker *pUnpacker, int ClientID)
m_apPlayers[ClientID]->m_Last_KickVote = time_get(); m_apPlayers[ClientID]->m_Last_KickVote = time_get();
return; return;
} }
//else if(!g_Config.m_SvVoteKick)
else if(!g_Config.m_SvVoteKick && !Authed) // allow admins to call kick votes even if they are forbidden else if(!g_Config.m_SvVoteKick && !Authed) // allow admins to call kick votes even if they are forbidden
{ {
SendChatTarget(ClientID, "Server does not allow voting to kick players"); SendChatTarget(ClientID, "Server does not allow voting to kick players");
@ -3242,7 +3240,7 @@ void CGameContext::OnConsoleInit()
#include <game/ddracechat.h> #include <game/ddracechat.h>
} }
void CGameContext::OnInit(/*class IKernel *pKernel*/) void CGameContext::OnInit()
{ {
m_pServer = Kernel()->RequestInterface<IServer>(); m_pServer = Kernel()->RequestInterface<IServer>();
m_pConfig = Kernel()->RequestInterface<IConfigManager>()->Values(); m_pConfig = Kernel()->RequestInterface<IConfigManager>()->Values();
@ -3264,9 +3262,6 @@ void CGameContext::OnInit(/*class IKernel *pKernel*/)
DeleteTempfile(); DeleteTempfile();
//if(!data) // only load once
//data = load_data_from_memory(internal_data);
for(int i = 0; i < NUM_NETOBJTYPES; i++) for(int i = 0; i < NUM_NETOBJTYPES; i++)
Server()->SnapSetStaticsize(i, m_NetObjHandler.GetObjSize(i)); Server()->SnapSetStaticsize(i, m_NetObjHandler.GetObjSize(i));
@ -3281,10 +3276,6 @@ void CGameContext::OnInit(/*class IKernel *pKernel*/)
Server()->GetMapInfo(aMapName, sizeof(aMapName), &MapSize, &MapSha256, &MapCrc); Server()->GetMapInfo(aMapName, sizeof(aMapName), &MapSize, &MapSha256, &MapCrc);
m_MapBugs = GetMapBugs(aMapName, MapSize, MapSha256); m_MapBugs = GetMapBugs(aMapName, MapSize, MapSha256);
// reset everything here
//world = new GAMEWORLD;
//players = new CPlayer[MAX_CLIENTS];
// Reset Tunezones // Reset Tunezones
CTuningParams TuningParams; CTuningParams TuningParams;
for(int i = 0; i < NUM_TUNEZONES; i++) for(int i = 0; i < NUM_TUNEZONES; i++)
@ -3440,10 +3431,6 @@ void CGameContext::OnInit(/*class IKernel *pKernel*/)
m_pScore = new CScore(this, ((CServer *)Server())->DbPool()); m_pScore = new CScore(this, ((CServer *)Server())->DbPool());
} }
// setup core world
//for(int i = 0; i < MAX_CLIENTS; i++)
// game.players[i].core.world = &game.world.core;
// create all entities from the game layer // create all entities from the game layer
CMapItemLayerTilemap *pTileMap = m_Layers.GameLayer(); CMapItemLayerTilemap *pTileMap = m_Layers.GameLayer();
CTile *pTiles = (CTile *)Kernel()->RequestInterface<IMap>()->GetData(pTileMap->m_Data); CTile *pTiles = (CTile *)Kernel()->RequestInterface<IMap>()->GetData(pTileMap->m_Data);
@ -3541,8 +3528,6 @@ void CGameContext::OnInit(/*class IKernel *pKernel*/)
} }
} }
//game.world.insert_entity(game.Controller);
if(GIT_SHORTREV_HASH) if(GIT_SHORTREV_HASH)
Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "git-revision", GIT_SHORTREV_HASH); Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "git-revision", GIT_SHORTREV_HASH);

View file

@ -454,8 +454,6 @@ const char *IGameController::GetTeamName(int Team)
return "spectators"; return "spectators";
} }
//static bool IsSeparator(char c) { return c == ';' || c == ' ' || c == ',' || c == '\t'; }
void IGameController::StartRound() void IGameController::StartRound()
{ {
ResetGame(); ResetGame();