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()));
}
예제 #2
0
void CPda::OnH_B_Independent(bool just_before_destroy) 
{
	inherited::OnH_B_Independent(just_before_destroy);
	
	//выключить
	TurnOff();
}
예제 #3
0
파일: Camera.cpp 프로젝트: Arc0re/lithtech
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);
	}
}
예제 #4
0
void	CHangingLamp::CopySpawnInit		()
{
	CPHSkeleton::CopySpawnInit();
	CKinematics* K=smart_cast<CKinematics*>(Visual());
	if(!K->LL_GetBoneVisible(light_bone))
		TurnOff();
}
예제 #5
0
//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CEnvLaser::InputTurnOff( inputdata_t &inputdata )
{
	if (IsOn())
	{
		TurnOff();
	}
}
예제 #6
0
void CPda::net_Destroy() 
{
	inherited::net_Destroy		();
	TurnOff						();
	feel_touch.clear			();
	UpdateActiveContacts		();
}
예제 #7
0
파일: bmodels.cpp 프로젝트: XashDev/XashXT
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);
	}
}
예제 #9
0
//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	();
}
예제 #10
0
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();
	}
예제 #13
0
//-----------------------------------------------------------------------------
// Purpose: Input handler to turn the lightning off.
//-----------------------------------------------------------------------------
void CEnvBeam::InputTurnOff( inputdata_t &inputdata )
{
	if ( m_active )
	{
		TurnOff();
	}
}
예제 #14
0
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 );
	}
}
예제 #15
0
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();
}
예제 #16
0
int moEffect::luaDisable(moLuaVirtualMachine& vm)
{
    lua_State *luastate = (lua_State *) vm;

    TurnOff();

    return 0;
}
예제 #17
0
//================================================================================
// Pensamiento
//================================================================================
void CInternalLight::Think()
{
    // Debemos apagarnos
    if ( m_flDie.HasStarted() && m_flDie.IsElapsed() ) {
        TurnOff();
        m_flDie.Invalidate();
    }
}
예제 #18
0
파일: bmodels.cpp 프로젝트: XashDev/XashXT
void CFuncWallToggle :: Spawn( void )
{
	BaseClass::Spawn();

	if( FBitSet( pev->spawnflags, SF_WALL_START_OFF ))
		TurnOff();
	else TurnOn();
}
예제 #19
0
void CFuncWallToggle::Spawn( void )
{
	BaseClass::Spawn();
	if ( HasSpawnFlags( SF_WALL_START_OFF ) )
		TurnOff();
	
	SetMoveType( MOVETYPE_PUSH );
}
예제 #20
0
/* <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()));
}
예제 #22
0
void Weldingtool::Process()
{
    --fuel_;
    if (fuel_ <= 0)
    {
        TurnOff();
        fuel_ = 0;
    }
}
예제 #23
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();
	}
}
예제 #24
0
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();
	}
}
예제 #25
0
//-----------------------------------------------------------------------------
// Purpose: Input handler for toggling the hidden/shown state of the brush.
//-----------------------------------------------------------------------------
void CFuncBrush::InputToggle( inputdata_t &inputdata )
{
	if ( IsOn() )
	{
		TurnOff();
		return;
	}

	TurnOn();
}
예제 #26
0
//-----------------------------------------------------------------------------
// Purpose: Input handler to toggle the lightning on/off.
//-----------------------------------------------------------------------------
void CEnvBeam::InputToggle( inputdata_t &inputdata )
{
	if ( m_active )
	{
		TurnOff();
	}
	else
	{
		TurnOn();
	}
}
예제 #27
0
//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CEnvLaser::InputToggle( inputdata_t &inputdata )
{
	if ( IsOn() )
	{
		TurnOff();
	}
	else
	{
		TurnOn();
	}
}
예제 #28
0
void CEnvFireSensor::Spawn()
{
	if ( m_spawnflags & SF_FIRESENSOR_START_ON )
	{
		TurnOn();
	}
	else
	{
		TurnOff();
	}
}
예제 #29
0
void CEnvFireSource::Spawn()
{
	if ( m_spawnflags & SF_FIRESOURCE_START_ON )
	{
		TurnOn();
	}
	else
	{
		TurnOff();
	}
}
예제 #30
0
//-----------------------------------------------------------------------------
// Purpose: Input handler that toggles the sprite between hidden and shown.
//-----------------------------------------------------------------------------
void CSprite::InputToggleSprite( inputdata_t &inputdata )
{
	if ( !IsEffectActive( EF_NODRAW ) )
	{
		TurnOff();
	}
	else
	{
		TurnOn();
	}
}