void CProceduralWeaponAnimation::UpdateDebugState() { if ((g_pGameCVars->g_debugWeaponOffset==2) != m_debugInput) { IActionMapManager* pAMMgr = gEnv->pGame->GetIGameFramework()->GetIActionMapManager(); if (g_pGameCVars->g_debugWeaponOffset == 2) { if (gEnv->pInput) gEnv->pInput->AddEventListener(m_weaponOffsetInput.get()); if (pAMMgr) pAMMgr->Enable(false); m_weaponOffsetInput->SetRightDebugOffset(SWeaponOffset(m_rightOffset)); m_weaponOffsetInput->SetLeftDebugOffset(SWeaponOffset(m_leftOffset)); } else { if (gEnv->pInput) gEnv->pInput->RemoveEventListener(m_weaponOffsetInput.get()); if (pAMMgr) pAMMgr->Enable(true); } m_debugInput = (g_pGameCVars->g_debugWeaponOffset == 2); } if (g_pGameCVars->g_debugWeaponOffset) { DrawCrossHairGuideLines(); } if (m_debugInput) { m_weaponOffsetInput->Update(); } }
EContextEstablishTaskResult OnStep( SContextEstablishState& state ) { IActionMapManager *pActionMapMan = CCryAction::GetCryAction()->GetIActionMapManager(); pActionMapMan->Enable(false); pActionMapMan->EnableActionMap("player", true); pActionMapMan->EnableFilter(0, false); // disable all actionfilters return eCETR_Ok; }
//////////////////////////////////////////////////////////////////////////// // ui events //////////////////////////////////////////////////////////////////////////// void CUIMenuEvents::StartIngameMenu() { if (!gEnv->bMultiplayer && !gEnv->IsEditor()) { g_pGame->GetIGameFramework()->PauseGame( true, true ); } IActionMapManager* pAmMgr = g_pGame->GetIGameFramework()->GetIActionMapManager(); if (pAmMgr) { pAmMgr->Enable(true); pAmMgr->EnableFilter("only_ui", true); } m_eventSender.SendEvent<eUIE_StartIngameMenu>(); }