| 149 | |
| 150 | |
| 151 | void 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 |
no test coverage detected