コード例 #1
0
void CWeaponEgon::UpdateEffect( const Vector &startPoint, const Vector &endPoint )
{
	if ( !m_hBeam )
	{
		CreateEffect();
	}

	if ( m_hBeam )
	{
		m_hBeam->SetStartPos( endPoint );
	}

	if ( m_hSprite )
	{
		m_hSprite->SetAbsOrigin( endPoint );

		m_hSprite->m_flFrame += 8 * gpGlobals->frametime;
		if ( m_hSprite->m_flFrame > m_hSprite->Frames() )
			m_hSprite->m_flFrame = 0;
	}

	if ( m_hNoise )
	{
		m_hNoise->SetStartPos( endPoint );
	}
}