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

Method IR_OnKeyboardRelease

ogsr_engine/xrGame/ActorInput.cpp:187–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185 }
186}
187void CActor::IR_OnKeyboardRelease(int cmd)
188{
189 if (g_bHudAdjustMode && pInput->iGetAsyncKeyState(DIK_LSHIFT))
190 return;
191
192 if (Remote())
193 return;
194
195 // if (conditions().IsSleeping()) return;
196 if (m_input_external_handler && !m_input_external_handler->authorized(cmd))
197 return;
198
199 if (g_Alive())
200 {
201 // int dik = get_action_dik((EGameActions)cmd);
202 // if ((dik != DIK_LALT) && (dik != DIK_RALT) && (dik != DIK_F4) /*&& psCallbackFlags.test(CF_KEY_RELEASE)*/)
203 // this->callback(GameObject::eOnKeyRelease)(cmd);
204 if (cmd == kUSE)
205 PickupModeOff();
206
207 if (m_holder)
208 {
209 m_holder->OnKeyboardRelease(cmd);
210
211 if (m_holder->allowWeapon() && inventory().Action(cmd, CMD_STOP))
212 return;
213 return;
214 }
215 else if (inventory().Action(cmd, CMD_STOP))
216 return;
217
218 switch (cmd)
219 {
220 case kJUMP: mstate_wishful &= ~mcJump; break;
221 case kDROP:
222 if (GAME_PHASE_INPROGRESS == Game().Phase())
223 g_PerformDrop();
224 break;
225 case kCROUCH: g_bAutoClearCrouch = true;
226 }
227 }
228}
229
230void CActor::IR_OnKeyboardHold(int cmd)
231{

Callers

nothing calls this directly

Calls 8

RemoteFunction · 0.85
g_AliveFunction · 0.85
iGetAsyncKeyStateMethod · 0.80
PhaseMethod · 0.80
authorizedMethod · 0.45
OnKeyboardReleaseMethod · 0.45
allowWeaponMethod · 0.45
ActionMethod · 0.45

Tested by

no test coverage detected