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();
	}
}
Beispiel #2
0
void CUIInput::UnloadEventSystem()
{
	if (g_pGame && g_pGame->GetIGameFramework())
	{
		IActionMapManager* pAMMgr = g_pGame->GetIGameFramework()->GetIActionMapManager();
		if (pAMMgr)
		{
			pAMMgr->RemoveAlwaysActionListener(shared_from_this());
		}
	}
}