void CShootingObject::StartFlameParticles () { if(0==m_sFlameParticlesCurrent.size()) return; //если партиклы циклические if(m_pFlameParticles && m_pFlameParticles->IsLooped() && m_pFlameParticles->IsPlaying()) { UpdateFlameParticles(); return; } StopFlameParticles(); m_pFlameParticles = CParticlesObject::Create(*m_sFlameParticlesCurrent,FALSE); UpdateFlameParticles(); CSpectator* tmp_spectr = smart_cast<CSpectator*>(Level().CurrentControlEntity()); bool in_hud_mode = IsHudModeNow(); if (in_hud_mode && tmp_spectr && (tmp_spectr->GetActiveCam() != CSpectator::eacFirstEye)) { in_hud_mode = false; } m_pFlameParticles->Play(in_hud_mode); }
void CWeapon::UpdateCL () { inherited::UpdateCL (); UpdateHUDAddonsVisibility(); //подсветка от выстрела UpdateLight (); //нарисовать партиклы UpdateFlameParticles (); UpdateFlameParticles2 (); if(!IsGameTypeSingle()) make_Interpolation (); if( (GetNextState()==GetState()) && IsGameTypeSingle() && H_Parent()==Level().CurrentEntity()) { CActor* pActor = smart_cast<CActor*>(H_Parent()); if(pActor && !pActor->AnyMove() && this==pActor->inventory().ActiveItem()) { if (hud_adj_mode==0 && GetState()==eIdle && (Device.dwTimeGlobal-m_dw_curr_substate_time>20000) && !IsZoomed()&& g_player_hud->attached_item(1)==NULL) { if(AllowBore()) SwitchState (eBore); ResetSubStateTime (); } } } if(m_zoom_params.m_pNight_vision && !need_renderable()) { if(!m_zoom_params.m_pNight_vision->IsActive()) { CActor *pA = smart_cast<CActor *>(H_Parent()); R_ASSERT(pA); CTorch* pTorch = smart_cast<CTorch*>( pA->inventory().ItemFromSlot(TORCH_SLOT) ); if ( pTorch && pTorch->GetNightVisionStatus() ) { m_bRememberActorNVisnStatus = pTorch->GetNightVisionStatus(); pTorch->SwitchNightVision(false, false); } m_zoom_params.m_pNight_vision->Start(m_zoom_params.m_sUseZoomPostprocess, pA, false); } } else if(m_bRememberActorNVisnStatus) { m_bRememberActorNVisnStatus = false; EnableActorNVisnAfterZoom(); } if(m_zoom_params.m_pVision) m_zoom_params.m_pVision->Update(); }
void CShootingObject::StartFlameParticles () { if(0==m_sFlameParticlesCurrent.size()) return; //если партиклы циклические if(m_pFlameParticles && m_pFlameParticles->IsLooped() && m_pFlameParticles->IsPlaying()) { UpdateFlameParticles(); return; } StopFlameParticles(); m_pFlameParticles = CParticlesObject::Create(*m_sFlameParticlesCurrent,FALSE); UpdateFlameParticles(); m_pFlameParticles->Play(); }