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

Method PlayAnimDeviceSwitch

ogsr_engine/xrGame/weaponBM16.cpp:337–351  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

335}
336
337void CWeaponBM16::PlayAnimDeviceSwitch()
338{
339 PlaySound((HeadLampSwitch || NightVisionSwitch) ? sndItemOn : sndTactItemOn, get_LastFP());
340
341 string128 guns_device_anm;
342 xr_strconcat(guns_device_anm, LaserSwitch ? "anm_laser_on" : (TorchSwitch ? "anm_torch_on" : ((HeadLampSwitch || NightVisionSwitch) ? "anm_headlamp_on" : "")),
343 IsMisfire() ? "_jammed_" : "_", std::to_string(m_magazine.size()).c_str());
344 if (AnimationExist(guns_device_anm))
345 PlayHUDMotion(guns_device_anm, true, GetState());
346 else
347 {
348 DeviceUpdate();
349 SwitchState(eIdle);
350 }
351}

Callers

nothing calls this directly

Calls 4

xr_strconcatFunction · 0.85
to_stringFunction · 0.85
c_strMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected