void CSpriteTrail::SetSkybox( const Vector &vecSkyboxOrigin, float flSkyboxScale ) { m_flTextureRes /= m_flSkyboxScale; m_flMinFadeLength *= m_flSkyboxScale; m_flStartWidth *= m_flSkyboxScale; m_flEndWidth *= m_flSkyboxScale; m_flStartWidthVariance *= m_flSkyboxScale; m_vecSkyboxOrigin = vecSkyboxOrigin; m_flSkyboxScale = flSkyboxScale; m_flTextureRes *= m_flSkyboxScale; m_flMinFadeLength /= m_flSkyboxScale; m_flStartWidth /= m_flSkyboxScale; m_flEndWidth /= m_flSkyboxScale; m_flStartWidthVariance /= m_flSkyboxScale; if ( IsInSkybox() ) { AddEFlags( EFL_IN_SKYBOX ); } else { RemoveEFlags( EFL_IN_SKYBOX ); } }
//----------------------------------------------------------------------------- // Purpose: // Input : check - //----------------------------------------------------------------------------- void C_BaseEntity::SetCheckUntouch( bool check ) { // Invalidate touchstamp if ( check ) { touchStamp++; AddEFlags( EFL_CHECK_UNTOUCH ); } else { RemoveEFlags( EFL_CHECK_UNTOUCH ); } }
//----------------------------------------------------------------------------- // Purpose: This think function should be called at the time when the HeadcrabCanister // will be leaving the skybox and entering the world. //----------------------------------------------------------------------------- void CEnvHeadcrabCanister::HeadcrabCanisterSkyboxThink( void ) { // Use different position computation m_Shared.ConvertFromSkyboxToWorld(); Vector vecEndPosition; QAngle vecEndAngles; m_Shared.GetPositionAtTime( gpGlobals->curtime, vecEndPosition, vecEndAngles ); UTIL_SetOrigin( this, vecEndPosition ); SetAbsAngles( vecEndAngles ); RemoveEFlags( EFL_IN_SKYBOX ); // Switch to the actual-scale model SetupWorldModel(); // Futz with the smoke trail to get it working across the boundary m_hTrail->SetSkybox( vec3_origin, 1.0f ); // Now we start looking for collisions SetThink( &CEnvHeadcrabCanister::HeadcrabCanisterWorldThink ); SetNextThink( gpGlobals->curtime + 0.01f ); }