| 872 | } |
| 873 | |
| 874 | void CCustomZone::PlayHitParticles(CGameObject* pObject) |
| 875 | { |
| 876 | m_hit_sound.play_at_pos(0, pObject->Position()); |
| 877 | |
| 878 | shared_str particle_str = NULL; |
| 879 | |
| 880 | if (pObject->Radius() < SMALL_OBJECT_RADIUS) |
| 881 | { |
| 882 | if (!m_sHitParticlesSmall) |
| 883 | return; |
| 884 | particle_str = m_sHitParticlesSmall; |
| 885 | } |
| 886 | else |
| 887 | { |
| 888 | if (!m_sHitParticlesBig) |
| 889 | return; |
| 890 | particle_str = m_sHitParticlesBig; |
| 891 | } |
| 892 | |
| 893 | if (particle_str.size()) |
| 894 | { |
| 895 | CParticlesPlayer* PP = smart_cast<CParticlesPlayer*>(pObject); |
| 896 | if (PP) |
| 897 | { |
| 898 | u16 play_bone = PP->GetRandomBone(); |
| 899 | if (play_bone != BI_NONE) |
| 900 | PP->StartParticles(particle_str, play_bone, Fvector().set(0, 1, 0), ID()); |
| 901 | } |
| 902 | } |
| 903 | } |
| 904 | |
| 905 | void CCustomZone::PlayEntranceParticles(CGameObject* pObject) |
| 906 | { |
nothing calls this directly
no test coverage detected