MCPcopy Create free account
hub / github.com/cuberite/cuberite / Destroy

Method Destroy

src/ClientHandle.cpp:151–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149
150
151void cClientHandle::Destroy(void)
152{
153 {
154 cCSLock Lock(m_CSDestroyingState);
155 if (m_State >= csDestroying)
156 {
157 // Already called
158 return;
159 }
160 m_State = csDestroying;
161 }
162
163 // DEBUG:
164 LOGD("%s: client %p, \"%s\"", __FUNCTION__, this, m_Username.c_str());
165
166 if ((m_Player != NULL) && (m_Player->GetWorld() != NULL))
167 {
168 RemoveFromAllChunks();
169 m_Player->GetWorld()->RemoveClientFromChunkSender(this);
170 }
171 m_State = csDestroyedWaiting;
172}
173
174
175

Callers 1

~cClientHandleMethod · 0.45

Calls 3

c_strMethod · 0.80
GetWorldMethod · 0.45

Tested by

no test coverage detected