mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Small cleanup
This commit is contained in:
parent
6ccfdd55f9
commit
2d7886bf33
|
@ -901,6 +901,7 @@ void CGameContext::OnTick()
|
|||
}
|
||||
|
||||
if(Collision()->m_NumSwitchers > 0)
|
||||
{
|
||||
for (int i = 0; i < Collision()->m_NumSwitchers+1; ++i)
|
||||
{
|
||||
for (int j = 0; j < MAX_CLIENTS; ++j)
|
||||
|
@ -919,6 +920,7 @@ void CGameContext::OnTick()
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(m_pRandomMapResult && m_pRandomMapResult->m_Done)
|
||||
{
|
||||
|
|
|
@ -127,7 +127,7 @@ void CPlayer::Reset()
|
|||
// non-empty, allow them to vote immediately. This allows players to
|
||||
// vote after map changes or when they join an empty server.
|
||||
//
|
||||
// Otherwise, block voting in the begnning after joining.
|
||||
// Otherwise, block voting in the beginning after joining.
|
||||
if(Now > GameServer()->m_NonEmptySince + 10 * TickSpeed)
|
||||
m_FirstVoteTick = Now + g_Config.m_SvJoinVoteDelay * TickSpeed;
|
||||
else
|
||||
|
@ -233,7 +233,7 @@ void CPlayer::Tick()
|
|||
int CurrentIndex = GameServer()->Collision()->GetMapIndex(m_ViewPos);
|
||||
m_TuneZone = GameServer()->Collision()->IsTune(CurrentIndex);
|
||||
|
||||
if (m_TuneZone != m_TuneZoneOld) // don't send tunigs all the time
|
||||
if (m_TuneZone != m_TuneZoneOld) // don't send tunings all the time
|
||||
{
|
||||
GameServer()->SendTuningParams(m_ClientID, m_TuneZone);
|
||||
}
|
||||
|
@ -258,11 +258,11 @@ void CPlayer::PostTick()
|
|||
|
||||
void CPlayer::PostPostTick()
|
||||
{
|
||||
#ifdef CONF_DEBUG
|
||||
if(!g_Config.m_DbgDummies || m_ClientID < MAX_CLIENTS-g_Config.m_DbgDummies)
|
||||
#endif
|
||||
if(!Server()->ClientIngame(m_ClientID))
|
||||
return;
|
||||
#ifdef CONF_DEBUG
|
||||
if(!g_Config.m_DbgDummies || m_ClientID < MAX_CLIENTS-g_Config.m_DbgDummies)
|
||||
#endif
|
||||
if(!Server()->ClientIngame(m_ClientID))
|
||||
return;
|
||||
|
||||
if(!GameServer()->m_World.m_Paused && !m_pCharacter && m_Spawning && m_WeakHookSpawn)
|
||||
TryRespawn();
|
||||
|
|
|
@ -96,7 +96,7 @@ void CSqlScore::ExecSqlFunc(void *pUser)
|
|||
bool Success = false;
|
||||
|
||||
try {
|
||||
// try to connect to a working databaseserver
|
||||
// try to connect to a working database server
|
||||
while (!Success && !connector.MaxTriesReached(pData->m_ReadOnly) && connector.ConnectSqlServer(pData->m_ReadOnly))
|
||||
{
|
||||
try {
|
||||
|
@ -106,7 +106,7 @@ void CSqlScore::ExecSqlFunc(void *pUser)
|
|||
dbg_msg("sql", "Unexpected exception caught");
|
||||
}
|
||||
|
||||
// disconnect from databaseserver
|
||||
// disconnect from database server
|
||||
connector.SqlServer()->Disconnect();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue