//переключение режимов стрельбы одиночными и очередями bool CWeaponMagazined::SwitchMode() { if (eIdle != GetState() || IsPending()) return false; if (SingleShotMode()) m_iQueueSize = WEAPON_ININITE_QUEUE; else m_iQueueSize = 1; PlaySound(sndEmptyClick, get_LastFP()); return true; }
Cedrus::SingleShotMode Cedrus::XIDDevice::GetSingleShotMode(unsigned char selector) const { if (!m_config->IsXID2()) return SingleShotMode(); static char gssm_command[4] = { '_','i','a' }; gssm_command[3] = selector; unsigned char return_info[9]; m_xidCon->SendXIDCommand(gssm_command, 4, return_info, sizeof(return_info)); SingleShotMode ss_mode; ss_mode.enabled = return_info[4] == '1'; ss_mode.delay = AdjustEndiannessCharsToUint( return_info[5], return_info[6], return_info[7], return_info[8]); return ss_mode; }