MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / QueryProfileActionToDo

Function QueryProfileActionToDo

engine/Poseidon/Input/InputSubsystem.cpp:448–472  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

446}
447
448static bool QueryProfileActionToDo(Input& in, const InputProfile& profile, UserAction action, bool& actionDone,
449 bool reset, bool checkFocus)
450{
451 if (actionDone && in.actionDone[action])
452 return false;
453 if (reset)
454 {
455 actionDone = true;
456 in.actionDone[action] = true;
457 }
458
459 bool found = false;
460 for (const InputBinding& binding : profile.GetBindingEntries(action))
461 {
462 if (!ProfileModifierHeld(in, binding.modifier, checkFocus))
463 continue;
464 if (QueryProfileCodeToDo(in, binding.code, false, checkFocus))
465 found = true;
466 }
467 return found;
468}
469
470InputSubsystem& InputSubsystem::Instance()
471{
472 static InputSubsystem instance;
473 return instance;
474}
475

Callers 1

GetActionToDoMethod · 0.85

Calls 2

ProfileModifierHeldFunction · 0.85
QueryProfileCodeToDoFunction · 0.85

Tested by

no test coverage detected