예제 #1
0
void CProceduralWeaponAnimation::UpdateDebugState()
{
	if ((g_pGameCVars->g_debugWeaponOffset==2) != m_debugInput)
	{
		IActionMapManager* pAMMgr = gEnv->pGame->GetIGameFramework()->GetIActionMapManager();

		if (g_pGameCVars->g_debugWeaponOffset == 2)
		{
			if (pAMMgr)
				pAMMgr->AddAlwaysActionListener(m_weaponOffsetInput);
			m_weaponOffsetInput->SetRightDebugOffset(SWeaponOffset(m_rightOffset));
			m_weaponOffsetInput->SetLeftDebugOffset(SWeaponOffset(m_leftOffset));
		}
		else if (pAMMgr)
		{
			pAMMgr->RemoveAlwaysActionListener(m_weaponOffsetInput);
		}
		m_debugInput = (g_pGameCVars->g_debugWeaponOffset == 2);
	}

	if (g_pGameCVars->g_debugWeaponOffset)
	{
		DrawCrossHairGuideLines();
	}
	if (m_debugInput)
	{
		m_weaponOffsetInput->Update();
	}
}
예제 #2
0
void CUIInput::UnloadEventSystem()
{
	if (g_pGame && g_pGame->GetIGameFramework())
	{
		IActionMapManager* pAMMgr = g_pGame->GetIGameFramework()->GetIActionMapManager();
		if (pAMMgr)
		{
			pAMMgr->RemoveAlwaysActionListener(shared_from_this());
		}
	}
}