MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / IR_OnActivate

Method IR_OnActivate

ogsr_engine/xrGame/Level_input.cpp:425–456  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

423void CLevel::IR_OnMouseStop(int /**axis/**/, int /**value/**/) {}
424
425void CLevel::IR_OnActivate()
426{
427 if (!pInput)
428 return;
429 int i;
430 for (i = 0; i < CInput::COUNT_KB_BUTTONS; i++)
431 {
432 if (pInput->iGetAsyncKeyState(i))
433 {
434 EGameActions action = get_binded_action(i);
435 switch (action)
436 {
437 case kFWD:
438 case kBACK:
439 case kL_STRAFE:
440 case kR_STRAFE:
441 case kLEFT:
442 case kRIGHT:
443 case kUP:
444 case kDOWN:
445 case kCROUCH:
446 case kACCEL:
447 case kL_LOOKOUT:
448 case kR_LOOKOUT:
449 case kWPN_FIRE: {
450 IR_OnKeyboardPress(i);
451 }
452 break;
453 };
454 };
455 }
456}
457
458void CLevel::block_action(EGameActions cmd) { m_blocked_actions.insert(cmd); }
459

Callers

nothing calls this directly

Calls 2

get_binded_actionFunction · 0.85
iGetAsyncKeyStateMethod · 0.80

Tested by

no test coverage detected