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

Method PlayAnimShoot

ogsr_engine/xrGame/weaponBM16.cpp:65–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65void CWeaponBM16::PlayAnimShoot()
66{
67 if (m_magazine.empty())
68 return;
69
70 string128 guns_shoot_anm;
71 xr_strconcat(guns_shoot_anm, "anm_shoot", (this->IsZoomed() && !this->IsRotatingToZoom()) ? "_aim" : "", IsMisfire() ? "_jammed_" : "_",
72 std::to_string(m_magazine.size()).c_str());
73 if (AnimationExist(guns_shoot_anm))
74 {
75 PlayHUDMotion(guns_shoot_anm, IS_OGSR_GA, GetState());
76 return;
77 }
78
79 switch (m_magazine.size())
80 {
81 case 1: PlayHUDMotion({"anim_shoot_1", "anm_shot_1"}, IS_OGSR_GA, GetState()); break;
82 case 2: PlayHUDMotion({"anim_shoot", "anm_shot_2"}, IS_OGSR_GA, GetState()); break;
83 default: PlayHUDMotion({"anim_shoot", "anm_shots"}, IS_OGSR_GA, GetState()); break; // А что, у БМ бывает больше двух патронов?...
84 }
85}
86
87void CWeaponBM16::PlayAnimFakeShoot()
88{

Callers

nothing calls this directly

Calls 7

xr_strconcatFunction · 0.85
to_stringFunction · 0.85
IsRotatingToZoomMethod · 0.80
emptyMethod · 0.45
IsZoomedMethod · 0.45
c_strMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected