void PlaylistView::SetPlaylist(Playlist* playlist) { if (playlist_) { disconnect(playlist_, SIGNAL(CurrentSongChanged(Song)), this, SLOT(MaybeAutoscroll())); disconnect(playlist_, SIGNAL(DynamicModeChanged(bool)), this, SLOT(DynamicModeChanged(bool))); disconnect(playlist_, SIGNAL(destroyed()), this, SLOT(PlaylistDestroyed())); disconnect(dynamic_controls_, SIGNAL(Repopulate()), playlist_, SLOT(RepopulateDynamicPlaylist())); disconnect(dynamic_controls_, SIGNAL(TurnOff()), playlist_, SLOT(TurnOffDynamicPlaylist())); } playlist_ = playlist; LoadGeometry(); ReloadSettings(); DynamicModeChanged(playlist->is_dynamic()); setFocus(); read_only_settings_ = false; connect(playlist_, SIGNAL(RestoreFinished()), SLOT(JumpToLastPlayedTrack())); connect(playlist_, SIGNAL(CurrentSongChanged(Song)), SLOT(MaybeAutoscroll())); connect(playlist_, SIGNAL(DynamicModeChanged(bool)), SLOT(DynamicModeChanged(bool))); connect(playlist_, SIGNAL(destroyed()), SLOT(PlaylistDestroyed())); connect(dynamic_controls_, SIGNAL(Repopulate()), playlist_, SLOT(RepopulateDynamicPlaylist())); connect(dynamic_controls_, SIGNAL(TurnOff()), playlist_, SLOT(TurnOffDynamicPlaylist())); }
void CPda::OnH_B_Independent(bool just_before_destroy) { inherited::OnH_B_Independent(just_before_destroy); //выключить TurnOff(); }
void Camera::Update() { LTVector vPos; g_pLTServer->GetObjectPos(m_hObject, &vPos); ObjArray <HOBJECT, MAX_OBJECT_ARRAY_SIZE> objArray; g_pLTServer->FindNamedObjects(DEFAULT_PLAYERNAME,objArray); int numObjects = objArray.NumObjects(); for (int i = 0; i < numObjects; i++ ) { CPlayerObj* pPlayer = (CPlayerObj*) g_pLTServer->HandleToObject(objArray.GetObject(i)); if (pPlayer) { HCLIENT hClient = pPlayer->GetClient(); if (hClient) { g_pLTServer->SetClientViewPos(hClient, &vPos); } } } if (m_fActiveTime > 0.0f && g_pLTServer->GetTime() > m_fTurnOffTime) { TurnOff(); } else { SetNextUpdate(UPDATE_NEXT_FRAME); } }
void CHangingLamp::CopySpawnInit () { CPHSkeleton::CopySpawnInit(); CKinematics* K=smart_cast<CKinematics*>(Visual()); if(!K->LL_GetBoneVisible(light_bone)) TurnOff(); }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void CEnvLaser::InputTurnOff( inputdata_t &inputdata ) { if (IsOn()) { TurnOff(); } }
void CPda::net_Destroy() { inherited::net_Destroy (); TurnOff (); feel_touch.clear (); UpdateActiveContacts (); }
void CFuncWall :: Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value ) { if( IsLockedByMaster( pActivator )) return; if( ShouldToggle( useType )) { if( GetState() == STATE_ON ) TurnOff(); else TurnOn(); // LRC (support generic switchable texlight) if( m_iStyle >= 32 ) { if( pev->frame ) LIGHT_STYLE( m_iStyle, "z" ); else LIGHT_STYLE( m_iStyle, "a" ); } else if( m_iStyle <= -32 ) { if( pev->frame ) LIGHT_STYLE( -m_iStyle, "a" ); else LIGHT_STYLE( -m_iStyle, "z" ); } } }
void ABaseCharacter::SetRagdollPhysics() { USkeletalMeshComponent* Mesh3P = GetMesh(); if (Mesh3P) { Mesh3P->SetCollisionProfileName(TEXT("Ragdoll")); } SetActorEnableCollision(true); if (!IsPendingKill() || Mesh3P || Mesh3P->GetPhysicsAsset()) { Mesh3P->SetAllBodiesSimulatePhysics(true); Mesh3P->SetSimulatePhysics(true); Mesh3P->WakeAllRigidBodies(); Mesh3P->bBlendPhysics = true; SetLifeSpan(TimeAfterDeathBeforeDestroy); } else { // Immediately hide the pawn TurnOff(); SetActorHiddenInGame(true); SetLifeSpan(1.0f); } UCharacterMovementComponent* CharacterComp = Cast<UCharacterMovementComponent>(GetMovementComponent()); if (CharacterComp) { CharacterComp->StopMovementImmediately(); CharacterComp->DisableMovement(); CharacterComp->SetComponentTickEnabled(false); } }
//void CHangingLamp::Hit(float P,Fvector &dir, CObject* who,s16 element, // Fvector p_in_object_space, float impulse, ALife::EHitType hit_type) void CHangingLamp::Hit (SHit* pHDS) { SHit HDS = *pHDS; callback(GameObject::eHit)( lua_game_object(), HDS.power, HDS.dir, smart_cast<const CGameObject*>(HDS.who)->lua_game_object(), HDS.bone() ); #ifdef HLAMP_AFFECT_IMMUNITIES HDS.power = CHitImmunity::AffectHit(HDS.power,HDS.hit_type); inherited::Hit(pHDS); #endif BOOL bWasAlive = Alive () || light_render->get_active(); if(m_pPhysicsShell) m_pPhysicsShell->applyHit(pHDS->p_in_bone_space,pHDS->dir,pHDS->impulse,pHDS->boneID,pHDS->hit_type); if (!bWasAlive) return; if (pHDS->boneID==light_bone) SetHealth ( 0.f ); else { float damage = pHDS->damage() * 100.f; Msg("DEBUG: %s health = %.3f, damage = %.3f", Name_script(), GetHealth(), damage); SetHealth(GetHealth() - damage); } if (bWasAlive && (!Alive())) TurnOff (); }
void Weldingtool::AttackBy(id_ptr_on<Item> item) { if (Working()) TurnOff(); else TurnOn(); }
void AVehiclePawn::OnDeath() { AVehiclePlayerController* MyPC = Cast<AVehiclePlayerController>(GetController()); bReplicateMovement = false; bIsDying = true; DetachFromControllerPendingDestroy(); // hide and disable TurnOff(); SetActorHiddenInGame(true); if (EngineAC) { EngineAC->Stop(); } if (SkidAC) { SkidAC->Stop(); } PlayDestructionFX(); // Give use a finite lifespan SetLifeSpan( 0.2f ); }
void InputToggle( inputdata_t &inputdata ) { if ( m_isOn ) TurnOff(); else TurnOn(); }
//----------------------------------------------------------------------------- // Purpose: Input handler to turn the lightning off. //----------------------------------------------------------------------------- void CEnvBeam::InputTurnOff( inputdata_t &inputdata ) { if ( m_active ) { TurnOff(); } }
void CFuncBrush::Spawn( void ) { SetMoveType( MOVETYPE_PUSH ); // so it doesn't get pushed by anything SetSolid( SOLID_VPHYSICS ); AddEFlags( EFL_USE_PARTITION_WHEN_NOT_SOLID ); if ( m_iSolidity == BRUSHSOLID_NEVER ) { AddSolidFlags( FSOLID_NOT_SOLID ); } SetModel( STRING( GetModelName() ) ); if ( m_iDisabled ) TurnOff(); // If it can't move/go away, it's really part of the world if ( !GetEntityName() || !m_iParent ) AddFlag( FL_WORLDBRUSH ); CreateVPhysics(); // Slam the object back to solid - if we really want it to be solid. if ( m_bSolidBsp ) { SetSolid( SOLID_BSP ); } }
void CLaser::Spawn(void) { if(FStringNull(pev->model)) { SetThink(&CLaser::SUB_Remove); return; } pev->solid = SOLID_NOT; // Remove model & collisions Precache(); SetThink(&CLaser::StrikeThink); pev->flags |= FL_CUSTOMENTITY; PointsInit(pev->origin, pev->origin); if(!m_pSprite && m_iszSpriteName) m_pSprite = CSprite::SpriteCreate(STRING(m_iszSpriteName), pev->origin, TRUE); else m_pSprite = NULL; if(m_pSprite) m_pSprite->SetTransparency(kRenderGlow, pev->rendercolor.x, pev->rendercolor.y, pev->rendercolor.z, pev->renderamt, pev->renderfx); if(pev->targetname && !(pev->spawnflags & SF_BEAM_STARTON)) TurnOff(); else TurnOn(); }
int moEffect::luaDisable(moLuaVirtualMachine& vm) { lua_State *luastate = (lua_State *) vm; TurnOff(); return 0; }
//================================================================================ // Pensamiento //================================================================================ void CInternalLight::Think() { // Debemos apagarnos if ( m_flDie.HasStarted() && m_flDie.IsElapsed() ) { TurnOff(); m_flDie.Invalidate(); } }
void CFuncWallToggle :: Spawn( void ) { BaseClass::Spawn(); if( FBitSet( pev->spawnflags, SF_WALL_START_OFF )) TurnOff(); else TurnOn(); }
void CFuncWallToggle::Spawn( void ) { BaseClass::Spawn(); if ( HasSpawnFlags( SF_WALL_START_OFF ) ) TurnOff(); SetMoveType( MOVETYPE_PUSH ); }
/* <1e28f> ../cstrike/dlls/bmodels.cpp:98 */ void CFuncWallToggle::__MAKE_VHOOK(Spawn)(void) { CFuncWall::Spawn(); if (pev->spawnflags & SF_WALL_START_OFF) { TurnOff(); } }
DynamicPlaylistControls::DynamicPlaylistControls(QWidget *parent) : QWidget(parent), ui_(new Ui_DynamicPlaylistControls) { ui_->setupUi(this); connect(ui_->repopulate, SIGNAL(clicked()), SIGNAL(Repopulate())); connect(ui_->off, SIGNAL(clicked()), SIGNAL(TurnOff())); }
void Weldingtool::Process() { --fuel_; if (fuel_ <= 0) { TurnOff(); fuel_ = 0; } }
void CFuncShine :: Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value ) { if (ShouldToggle(useType)) { if (pev->spawnflags & SF_SHINE_ACTIVE) TurnOff(); else TurnOn(); } }
void CParticleEmitter :: Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value ) { if (ShouldToggle(useType, pev->body)) { if (pev->spawnflags & SF_START_ON) TurnOff(); else TurnOn(); } }
//----------------------------------------------------------------------------- // Purpose: Input handler for toggling the hidden/shown state of the brush. //----------------------------------------------------------------------------- void CFuncBrush::InputToggle( inputdata_t &inputdata ) { if ( IsOn() ) { TurnOff(); return; } TurnOn(); }
//----------------------------------------------------------------------------- // Purpose: Input handler to toggle the lightning on/off. //----------------------------------------------------------------------------- void CEnvBeam::InputToggle( inputdata_t &inputdata ) { if ( m_active ) { TurnOff(); } else { TurnOn(); } }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void CEnvLaser::InputToggle( inputdata_t &inputdata ) { if ( IsOn() ) { TurnOff(); } else { TurnOn(); } }
void CEnvFireSensor::Spawn() { if ( m_spawnflags & SF_FIRESENSOR_START_ON ) { TurnOn(); } else { TurnOff(); } }
void CEnvFireSource::Spawn() { if ( m_spawnflags & SF_FIRESOURCE_START_ON ) { TurnOn(); } else { TurnOff(); } }
//----------------------------------------------------------------------------- // Purpose: Input handler that toggles the sprite between hidden and shown. //----------------------------------------------------------------------------- void CSprite::InputToggleSprite( inputdata_t &inputdata ) { if ( !IsEffectActive( EF_NODRAW ) ) { TurnOff(); } else { TurnOn(); } }