Exemplo n.º 1
0
void CSDKPlayerShared::SetAimIn(bool bAimIn)
{
	// If we're aimed in and aimin is being turned off and we're aimed in enough to have noticed a change, train the aimin lesson.
	if (m_bAimedIn && !bAimIn && m_flAimIn > 0.5f)
	{
		CWeaponSDKBase* pWeapon = m_pOuter->GetActiveSDKWeapon();

		// Also must be holding an aimin weapon.
		if (pWeapon && (pWeapon->HasAimInFireRateBonus() || pWeapon->HasAimInRecoilBonus() || pWeapon->HasAimInSpeedPenalty()))
			m_pOuter->Instructor_LessonLearned("aimin");
	}

	m_bAimedIn = bAimIn;
}
Exemplo n.º 2
0
bool PlayerActiveWeaponHasAimInConditions( C_SDKPlayer *pPlayer, class CLesson *pLesson )
{
	if (!PlayerAliveConditions(pPlayer, pLesson))
		return false;

	CWeaponSDKBase* pWeapon = pPlayer->GetActiveSDKWeapon();

	if (!pWeapon)
		return false;

	if (pWeapon->HasAimInSpeedPenalty() || pWeapon->HasAimInFireRateBonus() || pWeapon->HasAimInRecoilBonus())
		return true;

	return false;
}