예제 #1
0
//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CAI_Spotlight::Init( CAI_BaseNPC *pOuter, int nFlags, float flConstraintAngle, float flMaxLength )
{
	SetOuter( pOuter );
	m_nFlags = nFlags;
	m_flConstraintAngle = flConstraintAngle; 
	m_flSpotlightMaxLength = flMaxLength;

	// Check for user error
	if (m_flSpotlightMaxLength <= 0)
	{
		DevMsg("ERROR: Invalid spotlight length <= 0, setting to 500\n");
		m_flSpotlightMaxLength = 500;
	}

	Precache();

	m_vSpotlightTargetPos	= vec3_origin;
	m_hSpotlight			= NULL;
	m_hSpotlightTarget		= NULL;

	AngleVectors( GetAbsAngles(), &m_vSpotlightDir );
	m_vAngularVelocity.Init( 0, 0, 0, 1 );
	m_flSpotlightCurLength	= m_flSpotlightMaxLength;
}
예제 #2
0
UnitExpresser::UnitExpresser( boost::python::object outer ) : UnitComponent(outer)
{
	SetOuter( UnitComponent::GetOuter() );
	Connect( UnitComponent::GetOuter() );
}