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; }
void CUIMenuEvents::StopIngameMenu() { if (!gEnv->bMultiplayer && !gEnv->IsEditor()) { g_pGame->GetIGameFramework()->PauseGame( false, true ); } IActionMapManager* pAmMgr = g_pGame->GetIGameFramework()->GetIActionMapManager(); if (pAmMgr) { pAmMgr->EnableFilter("only_ui", false); } m_eventSender.SendEvent<eUIE_StopIngameMenu>(); }
//------------------------------------------------------------------------ void CVehicleClient::OnEnterVehicleSeat(IVehicleSeat* pSeat) { m_bMovementFlagRight=m_bMovementFlagLeft=m_bMovementFlagForward=m_bMovementFlagBack=false; m_fLeftRight = m_fForwardBackward = 0.f; IVehicle* pVehicle = pSeat->GetVehicle(); assert(pVehicle); IActorSystem* pActorSystem = gEnv->pGame->GetIGameFramework()->GetIActorSystem(); assert(pActorSystem); IActor* pActor = pActorSystem->GetActor(pSeat->GetPassenger()); bool isThirdPerson = pActor->IsThirdPerson() || m_tp; TVehicleViewId viewId = InvalidVehicleViewId; TVehicleViewId firstViewId = InvalidVehicleViewId; while (viewId = pSeat->GetNextView(viewId)) { if (viewId == firstViewId) break; if (firstViewId == InvalidVehicleViewId) firstViewId = viewId; if (IVehicleView* pView = pSeat->GetView(viewId)) { if (pView->IsThirdPerson() == isThirdPerson) break; } } if (viewId != InvalidVehicleViewId) pSeat->SetView(viewId); IActionMapManager* pMapManager = gEnv->pGame->GetIGameFramework()->GetIActionMapManager(); assert(pMapManager); pMapManager->EnableActionMap("landvehicle", false); pMapManager->EnableActionMap("seavehicle", false); pMapManager->EnableActionMap("helicopter", false); pMapManager->EnableActionMap("vtol", false); pMapManager->EnableFilter ( "vehicle_no_seat_change_and_exit", true ); }