mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-20 09:34:19 +00:00
Remove dead code
This commit is contained in:
parent
11f5162be8
commit
6d3baed69d
|
@ -1547,7 +1547,6 @@ void CGameContext::OnClientDrop(int ClientID, const char *pReason)
|
|||
delete m_apPlayers[ClientID];
|
||||
m_apPlayers[ClientID] = 0;
|
||||
|
||||
//(void)m_pController->CheckTeamBalance();
|
||||
m_VoteUpdate = true;
|
||||
|
||||
// update spectator modes
|
||||
|
@ -2046,7 +2045,6 @@ void CGameContext::OnMessage(int MsgID, CUnpacker *pUnpacker, int ClientID)
|
|||
m_apPlayers[ClientID]->m_Last_KickVote = time_get();
|
||||
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
|
||||
{
|
||||
SendChatTarget(ClientID, "Server does not allow voting to kick players");
|
||||
|
@ -3242,7 +3240,7 @@ void CGameContext::OnConsoleInit()
|
|||
#include <game/ddracechat.h>
|
||||
}
|
||||
|
||||
void CGameContext::OnInit(/*class IKernel *pKernel*/)
|
||||
void CGameContext::OnInit()
|
||||
{
|
||||
m_pServer = Kernel()->RequestInterface<IServer>();
|
||||
m_pConfig = Kernel()->RequestInterface<IConfigManager>()->Values();
|
||||
|
@ -3264,9 +3262,6 @@ void CGameContext::OnInit(/*class IKernel *pKernel*/)
|
|||
|
||||
DeleteTempfile();
|
||||
|
||||
//if(!data) // only load once
|
||||
//data = load_data_from_memory(internal_data);
|
||||
|
||||
for(int i = 0; i < NUM_NETOBJTYPES; 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);
|
||||
m_MapBugs = GetMapBugs(aMapName, MapSize, MapSha256);
|
||||
|
||||
// reset everything here
|
||||
//world = new GAMEWORLD;
|
||||
//players = new CPlayer[MAX_CLIENTS];
|
||||
|
||||
// Reset Tunezones
|
||||
CTuningParams TuningParams;
|
||||
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());
|
||||
}
|
||||
|
||||
// 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
|
||||
CMapItemLayerTilemap *pTileMap = m_Layers.GameLayer();
|
||||
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)
|
||||
Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "git-revision", GIT_SHORTREV_HASH);
|
||||
|
||||
|
|
|
@ -454,8 +454,6 @@ const char *IGameController::GetTeamName(int Team)
|
|||
return "spectators";
|
||||
}
|
||||
|
||||
//static bool IsSeparator(char c) { return c == ';' || c == ' ' || c == ',' || c == '\t'; }
|
||||
|
||||
void IGameController::StartRound()
|
||||
{
|
||||
ResetGame();
|
||||
|
|
Loading…
Reference in a new issue