| 185 | } |
| 186 | } |
| 187 | void 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 | |
| 230 | void CActor::IR_OnKeyboardHold(int cmd) |
| 231 | { |
nothing calls this directly
no test coverage detected