| 307 | #include "clsid_game.h" |
| 308 | |
| 309 | void CCustomDetectorSHOC::UpdateNightVisionMode() |
| 310 | { |
| 311 | bool bNightVision = Actor()->Cameras().GetPPEffector(EEffectorPPType(effNightvision)) != NULL; |
| 312 | |
| 313 | bool bOn = bNightVision && m_pCurrentActor && m_pCurrentActor == Level().CurrentViewEntity() && IsWorking() && m_nightvision_particle.size(); |
| 314 | |
| 315 | ZONE_INFO_MAP_IT it; |
| 316 | for (it = m_ZoneInfoMap.begin(); m_ZoneInfoMap.end() != it; ++it) |
| 317 | { |
| 318 | CCustomZone* pZone = it->first; |
| 319 | ZONE_INFO_SHOC& zone_info = it->second; |
| 320 | |
| 321 | if (bOn && pZone->IsEnabled()) |
| 322 | { |
| 323 | Fvector zero_vector; |
| 324 | zero_vector.set(0.f, 0.f, 0.f); |
| 325 | |
| 326 | if (!zone_info.pParticle) |
| 327 | zone_info.pParticle = CParticlesObject::Create(*m_nightvision_particle, FALSE); |
| 328 | |
| 329 | zone_info.pParticle->UpdateParent(pZone->XFORM(), zero_vector); |
| 330 | |
| 331 | if (!zone_info.pParticle->IsPlaying()) |
| 332 | zone_info.pParticle->Play(false); |
| 333 | } |
| 334 | else |
| 335 | { |
| 336 | if (zone_info.pParticle) |
| 337 | { |
| 338 | zone_info.pParticle->Stop(); |
| 339 | CParticlesObject::Destroy(zone_info.pParticle); |
| 340 | } |
| 341 | } |
| 342 | } |
| 343 | } |
| 344 | |
| 345 | void CCustomDetectorSHOC::update_actor_radiation() |
| 346 | { |
nothing calls this directly
no test coverage detected