mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Add constants for minimum and maximum tick values
This commit is contained in:
parent
29bf49ae31
commit
25e01eb762
|
@ -314,7 +314,7 @@ CServer::CServer()
|
|||
|
||||
m_pGameServer = 0;
|
||||
|
||||
m_CurrentGameTick = 0;
|
||||
m_CurrentGameTick = MIN_TICK;
|
||||
m_RunServer = UNINITIALIZED;
|
||||
|
||||
m_aShutdownReason[0] = 0;
|
||||
|
@ -541,7 +541,7 @@ int CServer::Init()
|
|||
Client.m_Sixup = false;
|
||||
}
|
||||
|
||||
m_CurrentGameTick = 0;
|
||||
m_CurrentGameTick = MIN_TICK;
|
||||
|
||||
m_AnnouncementLastLine = 0;
|
||||
mem_zero(m_aPrevStates, sizeof(m_aPrevStates));
|
||||
|
@ -2640,7 +2640,7 @@ int CServer::Run()
|
|||
int NewTicks = 0;
|
||||
|
||||
// load new map
|
||||
if(m_MapReload || m_CurrentGameTick >= 0x6FFFFFFF) // force reload to make sure the ticks stay within a valid range
|
||||
if(m_MapReload || m_CurrentGameTick >= MAX_TICK) // force reload to make sure the ticks stay within a valid range
|
||||
{
|
||||
// load map
|
||||
if(LoadMap(Config()->m_SvMap))
|
||||
|
@ -2671,7 +2671,7 @@ int CServer::Run()
|
|||
}
|
||||
|
||||
m_GameStartTime = time_get();
|
||||
m_CurrentGameTick = 0;
|
||||
m_CurrentGameTick = MIN_TICK;
|
||||
m_ServerInfoFirstRequest = 0;
|
||||
Kernel()->ReregisterInterface(GameServer());
|
||||
GameServer()->OnInit();
|
||||
|
|
|
@ -87,6 +87,8 @@ enum
|
|||
MAX_CLIENTS = 64,
|
||||
VANILLA_MAX_CLIENTS = 16,
|
||||
MAX_CHECKPOINTS = 25,
|
||||
MIN_TICK = 0,
|
||||
MAX_TICK = 0x6FFFFFFF,
|
||||
|
||||
MAX_INPUT_SIZE = 128,
|
||||
MAX_SNAPSHOT_PACKSIZE = 900,
|
||||
|
|
Loading…
Reference in a new issue