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

Method PlayObjectIdleParticles

ogsr_engine/xrGame/CustomZone.cpp:982–1011  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

980}
981
982void CCustomZone::PlayObjectIdleParticles(CGameObject* pObject)
983{
984 CParticlesPlayer* PP = smart_cast<CParticlesPlayer*>(pObject);
985 if (!PP)
986 return;
987
988 shared_str particle_str = NULL;
989
990 //разные партиклы для объектов разного размера
991 if (pObject->Radius() < SMALL_OBJECT_RADIUS)
992 {
993 if (!m_sIdleObjectParticlesSmall)
994 return;
995 particle_str = m_sIdleObjectParticlesSmall;
996 }
997 else
998 {
999 if (!m_sIdleObjectParticlesBig)
1000 return;
1001 particle_str = m_sIdleObjectParticlesBig;
1002 }
1003
1004 //запустить партиклы на объекте
1005 //. new
1006 PP->StopParticles(particle_str, BI_NONE, true);
1007
1008 PP->StartParticles(particle_str, Fvector().set(0, 1, 0), ID());
1009 if (!IsEnabled())
1010 PP->StopParticles(particle_str, BI_NONE, true);
1011}
1012
1013void CCustomZone::StopObjectIdleParticles(CGameObject* pObject)
1014{

Callers

nothing calls this directly

Calls 6

IDFunction · 0.85
IsEnabledFunction · 0.85
RadiusMethod · 0.45
StopParticlesMethod · 0.45
StartParticlesMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected