void WeatherParticles::removeEmitters(core::list<v2s16> emitters_to_delete) {
	if (emitters_to_delete.size() > 0) {
		core::list<v2s16>::Iterator j;
		for (j = emitters_to_delete.begin(); j != emitters_to_delete.end(); j++) {
			WEmitter *emitter = m_emitter_map[*j];
			m_emitter_map.remove(*j);
			emitter->remove();
		}
	}
}
Ejemplo n.º 2
0
    void fillBodyList(core::list<scene::ISceneNode *> &aPlanes, scene::ISceneNode *pNode, const c8 *sClassName, u32 iMax, ode::CIrrOdeWorld *pWorld) {
      if (pNode->getType()==ode::IRR_ODE_BODY_ID) {
        ode::CIrrOdeBody *p=(ode::CIrrOdeBody *)pNode;
        if (p->getOdeClassname().equals_ignore_case(sClassName)) {
          printf("%s found (%i)\n",sClassName,aPlanes.size());
          if (aPlanes.size()<iMax)
            aPlanes.push_back(pNode);
          else {
            m_pCtrlReceiver->removeFromScene(pNode);
            return;
          }
        }
      }

      core::list<scene::ISceneNode *> children=pNode->getChildren();
      core::list<scene::ISceneNode *>::Iterator it;

      for (it=children.begin(); it!=children.end(); it++) fillBodyList(aPlanes,*it,sClassName,iMax, pWorld);
    }