mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Clarify teehistorian code
This commit is contained in:
parent
04e8ce56a9
commit
80df59ba5a
|
@ -47,7 +47,7 @@ void CTeeHistorian::Reset(const CGameInfo *pGameInfo, WRITE_CALLBACK pfnWriteCal
|
|||
// Tick 0 is implicit at the start, game starts as tick 1.
|
||||
m_TickWritten = true;
|
||||
m_MaxClientID = MAX_CLIENTS;
|
||||
// `m_PrevMaxClientID` is initialized in `BeginTick`
|
||||
// `m_PrevMaxClientID` is initialized in `BeginPlayers`
|
||||
for(auto &PrevPlayer : m_aPrevPlayers)
|
||||
{
|
||||
PrevPlayer.m_Alive = false;
|
||||
|
@ -204,6 +204,8 @@ void CTeeHistorian::BeginPlayers()
|
|||
dbg_assert(m_State == STATE_BEFORE_PLAYERS, "invalid teehistorian state");
|
||||
|
||||
m_PrevMaxClientID = m_MaxClientID;
|
||||
// ensure that PLAYER_{DIFF, NEW, OLD} don't cause an implicit tick after a TICK_SKIP
|
||||
// by not overwriting m_MaxClientID during RecordPlayer
|
||||
m_MaxClientID = -1;
|
||||
|
||||
m_State = STATE_PLAYERS;
|
||||
|
|
Loading…
Reference in a new issue