C_EnvProjectedTexture::C_EnvProjectedTexture( void ) { m_LightHandle = CLIENTSHADOW_INVALID_HANDLE; m_bForceUpdate = true; m_pMaterial = NULL; AddToEntityList( ENTITY_LIST_SIMULATE ); }
void CBeam::OnDataChanged( DataUpdateType_t updateType ) { MarkMessageReceived(); // Make sure that the correct model is referenced for this entity SetModelPointer( modelinfo->GetModel( GetModelIndex() ) ); // Convert weapon world models to viewmodels if they're weapons being carried by the local player for (int i=0;i<MAX_BEAM_ENTS;i++) { C_BaseEntity *pEnt = m_hAttachEntity[i].Get(); if ( pEnt ) { C_BaseCombatWeapon *pWpn = pEnt->MyCombatWeaponPointer(); if ( pWpn && pWpn->IsCarriedByLocalPlayer() ) { C_BasePlayer *player = ToBasePlayer( pWpn->GetOwner() ); C_BaseViewModel *pViewModel = player ? player->GetViewModel( 0 ) : NULL; if ( pViewModel ) { // Get the viewmodel and use it instead m_hAttachEntity.Set( i, pViewModel ); } } } } // Compute the bounds here... Vector mins, maxs; ComputeBounds( mins, maxs ); SetCollisionBounds( mins, maxs ); AddToEntityList( ENTITY_LIST_SIMULATE ); }
C_Plasma::C_Plasma() { //Server-side m_flStartScale = 0.0f; m_flScale = 0.0f; m_flScaleTime = 0.0f; m_nFlags = bitsFIRESMOKE_NONE; m_nPlasmaModelIndex = 0; m_nPlasmaModelIndex2 = 0; m_nGlowModelIndex = 0; //Client-side m_flScaleRegister = 0.0f; m_flScaleStart = 0.0f; m_flScaleEnd = 0.0f; m_flScaleTimeStart = 0.0f; m_flScaleTimeEnd = 0.0f; m_flGlowScale = 0.0f; m_bClipTested = false; m_entGlow.Clear(); //Clear all child flames for ( int i = 0; i < NUM_CHILD_FLAMES; i++ ) { m_entFlames[i].Clear(); } AddToEntityList(ENTITY_LIST_SIMULATE); }
//----------------------------------------------------------------------------- // Purpose: // Input : bnewentity - //----------------------------------------------------------------------------- void C_Plasma::OnDataChanged( DataUpdateType_t updateType ) { C_BaseEntity::OnDataChanged( updateType ); if ( updateType == DATA_UPDATE_CREATED ) { Start(); } if ( m_nFlags & bitsFIRESMOKE_ACTIVE ) { AddToEntityList(ENTITY_LIST_SIMULATE); } }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- CBeam::CBeam( void ) { #ifdef _DEBUG // necessary since in debug, we initialize vectors to NAN for debugging m_vecEndPos.Init(); #endif m_flHDRColorScale = 1.0f; // default value. #if !defined( CLIENT_DLL ) m_nDissolveType = -1; #else m_queryHandleHalo = 0; AddToEntityList(ENTITY_LIST_SIMULATE); #endif }
C_WaterBullet( void ) { AddToEntityList(ENTITY_LIST_SIMULATE); };