| 1770 | |
| 1771 | |
| 1772 | bool cChunk::AddClient(cClientHandle* a_Client) |
| 1773 | { |
| 1774 | for (cClientHandleList::iterator itr = m_LoadedByClient.begin(); itr != m_LoadedByClient.end(); ++itr) |
| 1775 | { |
| 1776 | if (a_Client == *itr) |
| 1777 | { |
| 1778 | // Already there, nothing needed |
| 1779 | return false; |
| 1780 | } |
| 1781 | } |
| 1782 | m_LoadedByClient.push_back( a_Client ); |
| 1783 | |
| 1784 | for (cEntityList::iterator itr = m_Entities.begin(); itr != m_Entities.end(); ++itr ) |
| 1785 | { |
| 1786 | /* |
| 1787 | // DEBUG: |
| 1788 | LOGD("cChunk: Entity #%d (%s) at [%i, %i, %i] spawning for player \"%s\"", |
| 1789 | (*itr)->GetUniqueID(), (*itr)->GetClass(), |
| 1790 | m_PosX, m_PosY, m_PosZ, |
| 1791 | a_Client->GetUsername().c_str() |
| 1792 | ); |
| 1793 | */ |
| 1794 | (*itr)->SpawnOn(*a_Client); |
| 1795 | } |
| 1796 | return true; |
| 1797 | } |
| 1798 | |
| 1799 | |
| 1800 |
no test coverage detected