MCPcopy Create free account
hub / github.com/StrongPC123/Far-Cry-1-Source-Full / SetActionMap

Method SetActionMap

CryInput/XActionMapManager.cpp:142–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140}
141
142void CXActionMapManager::SetActionMap(const char *s)
143{
144 // reset keys when changing action map
145 //m_pInput->GetIKeyboard()->ClearKeyState();
146
147
148 ActionMapMapItor itor;
149 itor=m_mapActionMaps.find(s);
150
151 if(itor!=m_mapActionMaps.end())
152 {
153 CXActionMap *pNewActionMap = itor->second;
154
155 if(m_pCurrentActionMap)
156 {
157 // reset the key state for all actions
158 std::vector<int> keys;
159 std::vector<int>::iterator i;
160 m_pCurrentActionMap->GetBindDifferences(pNewActionMap, keys);
161
162 for (i=keys.begin(); i != keys.end(); ++i)
163 m_pInput->GetIKeyboard()->ClearKey(*i);
164
165 m_pCurrentActionMap->Reset();
166 }
167
168 m_pCurrentActionMap = pNewActionMap;
169 }
170 else
171 m_pCurrentActionMap=NULL;
172}
173
174bool CXActionMapManager::CheckActionMap(XACTIONID nActionID)
175{

Callers

nothing calls this directly

Calls 7

GetBindDifferencesMethod · 0.80
GetIKeyboardMethod · 0.80
findMethod · 0.45
endMethod · 0.45
beginMethod · 0.45
ClearKeyMethod · 0.45
ResetMethod · 0.45

Tested by

no test coverage detected