void CCustomZone::PlayObjectIdleParticles(CGameObject* pObject) { CParticlesPlayer* PP = smart_cast<CParticlesPlayer*>(pObject); if(!PP) return; shared_str particle_str = NULL; //разные партиклы для объектов разного размера if(pObject->Radius()<SMALL_OBJECT_RADIUS) { if(!m_sIdleObjectParticlesSmall) return; particle_str = m_sIdleObjectParticlesSmall; } else { if(!m_sIdleObjectParticlesBig) return; particle_str = m_sIdleObjectParticlesBig; } //запустить партиклы на объекте //. new PP->StopParticles (particle_str, BI_NONE, true); PP->StartParticles (particle_str, Fvector().set(0,1,0), ID()); if (!IsEnabled()) PP->StopParticles (particle_str, BI_NONE, true); }
void CCustomZone::StopObjectIdleParticles(CGameObject* pObject) { if (m_zone_flags.test(eIdleObjectParticlesDontStop) && !pObject->cast_actor()) return; CParticlesPlayer* PP = smart_cast<CParticlesPlayer*>(pObject); if(!PP) return; OBJECT_INFO_VEC_IT it = std::find(m_ObjectInfoMap.begin(),m_ObjectInfoMap.end(),pObject); if(m_ObjectInfoMap.end() == it) return; shared_str particle_str = NULL; //разные партиклы для объектов разного размера if(pObject->Radius()<SMALL_OBJECT_RADIUS) { if(!m_sIdleObjectParticlesSmall) return; particle_str = m_sIdleObjectParticlesSmall; } else { if(!m_sIdleObjectParticlesBig) return; particle_str = m_sIdleObjectParticlesBig; } PP->StopParticles (particle_str, BI_NONE, true); }
void CScriptGameObject::stop_particles(LPCSTR pname, LPCSTR bone) { CParticlesPlayer* PP = smart_cast<CParticlesPlayer*>(&object()); if (!PP) return; IKinematics* K = smart_cast<IKinematics*>(object().Visual()); R_ASSERT(K); u16 play_bone = K->LL_BoneID(bone); R_ASSERT(play_bone != BI_NONE); if (K->LL_GetBoneVisible(play_bone)) PP->StopParticles(9999, play_bone, true); else ai().script_engine().script_log(ScriptStorage::eLuaMessageTypeError, "Cant stop particles, bone [%s] is not visible now", bone); }
void CBaseGraviZone::StopTeleParticles(CGameObject* pObject) { CParticlesPlayer* PP = smart_cast<CParticlesPlayer*>(pObject); if(!PP) return; shared_str particle_str = NULL; //разные партиклы дл¤ объектов разного размера if(pObject->Radius()<SMALL_OBJECT_RADIUS) { if(!m_sTeleParticlesSmall) return; particle_str = m_sTeleParticlesSmall; } else { if(!m_sTeleParticlesBig) return; particle_str = m_sTeleParticlesBig; } //остановить партиклы PP->StopParticles (particle_str, BI_NONE, true); }
void CBurer::StopTeleObjectParticle(CGameObject *pO) { CParticlesPlayer* PP = smart_cast<CParticlesPlayer*>(pO); if(!PP) return; PP->StopParticles (particle_tele_object, BI_NONE, true); }