// tbh highly inefficent but we shouldn't have any large number of ps's, // and we won't be force removing very often so this won't be too bad void CParticleSystemManager::RemoveSystem( unsigned int iSystem ) { unsigned int i = 0; unsigned int iSystems = m_pParticleSystems.size(); CParticleSystem *pSystem = NULL; for (; i < iSystems; i++) { pSystem = m_pParticleSystems[i]; // i != the system id, as the server or the client can generate these if(pSystem && pSystem->SystemID() == iSystem) { delete pSystem; m_pParticleSystems.erase(m_pParticleSystems.begin() + i); i--; iSystems--; } } }