MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / StopObjectIdleParticles

Method StopObjectIdleParticles

ogsr_engine/xrGame/CustomZone.cpp:1013–1043  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1011}
1012
1013void CCustomZone::StopObjectIdleParticles(CGameObject* pObject)
1014{
1015 //. new
1016 if (m_bIdleObjectParticlesDontStop && !pObject->cast_actor())
1017 return;
1018
1019 CParticlesPlayer* PP = smart_cast<CParticlesPlayer*>(pObject);
1020 if (!PP)
1021 return;
1022
1023 OBJECT_INFO_VEC_IT it = std::find(m_ObjectInfoMap.begin(), m_ObjectInfoMap.end(), pObject);
1024 if (m_ObjectInfoMap.end() == it)
1025 return;
1026
1027 shared_str particle_str = NULL;
1028 //разные партиклы для объектов разного размера
1029 if (pObject->Radius() < SMALL_OBJECT_RADIUS)
1030 {
1031 if (!m_sIdleObjectParticlesSmall)
1032 return;
1033 particle_str = m_sIdleObjectParticlesSmall;
1034 }
1035 else
1036 {
1037 if (!m_sIdleObjectParticlesBig)
1038 return;
1039 particle_str = m_sIdleObjectParticlesBig;
1040 }
1041
1042 PP->StopParticles(particle_str, BI_NONE, true);
1043}
1044
1045void CCustomZone::Hit(SHit* pHDS)
1046{

Callers

nothing calls this directly

Calls 6

findFunction · 0.50
cast_actorMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
RadiusMethod · 0.45
StopParticlesMethod · 0.45

Tested by

no test coverage detected