MCPcopy Create free account
hub / github.com/ddnet/ddnet / CClient

Method CClient

src/engine/client/client.cpp:88–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86static constexpr ColorRGBA CLIENT_NETWORK_PRINT_ERROR_COLOR = ColorRGBA(1.0f, 0.25f, 0.25f, 1.0f);
87
88CClient::CClient() :
89 m_DemoPlayer(&m_SnapshotDelta, true, [&]() { UpdateDemoIntraTimers(); }),
90 m_InputtimeMarginGraph(128, 2, true),
91 m_aGametimeMarginGraphs{{128, 2, true}, {128, 2, true}},
92 m_FpsGraph(4096, 0, true)
93{
94 m_StateStartTime = time_get();
95 for(auto &DemoRecorder : m_aDemoRecorder)
96 DemoRecorder = CDemoRecorder(&m_SnapshotDelta);
97 m_LastRenderTime = time_get();
98 mem_zero(m_aInputs, sizeof(m_aInputs));
99 mem_zero(m_aapSnapshots, sizeof(m_aapSnapshots));
100 for(auto &SnapshotStorage : m_aSnapshotStorage)
101 SnapshotStorage.Init();
102 mem_zero(m_aDemorecSnapshotHolders, sizeof(m_aDemorecSnapshotHolders));
103 mem_zero(&m_CurrentServerInfo, sizeof(m_CurrentServerInfo));
104 mem_zero(&m_Checksum, sizeof(m_Checksum));
105 for(auto &GameTime : m_aGameTime)
106 GameTime.Init(0);
107 m_PredictedTime.Init(0);
108
109 m_Sixup = false;
110}
111
112// ----- send functions -----
113static inline bool RepackMsg(const CMsgPacker *pMsg, CPacker &Packer, bool Sixup)

Callers

nothing calls this directly

Calls 4

time_getFunction · 0.85
CDemoRecorderClass · 0.85
mem_zeroFunction · 0.85
InitMethod · 0.45

Tested by

no test coverage detected