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

Method Load

ogsr_engine/xrGame/WeaponMagazined.cpp:124–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122}
123
124void CWeaponMagazined::Load(LPCSTR section)
125{
126 inherited::Load(section);
127
128 // Sounds
129 HUD_SOUND::LoadSound(section, "snd_draw", sndShow, m_eSoundShow);
130 HUD_SOUND::LoadSound(section, "snd_holster", sndHide, m_eSoundHide);
131 HUD_SOUND::LoadSound(section, "snd_shoot", sndShot, m_eSoundShot);
132 HUD_SOUND::LoadSound(section, "snd_empty", sndEmptyClick, m_eSoundEmptyClick);
133
134 if (pSettings->line_exist(section, "snd_reload_empty"))
135 HUD_SOUND::LoadSound(section, "snd_reload_empty", sndReload, m_eSoundReload);
136 else
137 HUD_SOUND::LoadSound(section, "snd_reload", sndReload, m_eSoundReload);
138
139 if (pSettings->line_exist(section, "snd_reload_jammed"))
140 HUD_SOUND::LoadSound(section, "snd_reload_jammed", sndReloadJammed, m_eSoundReload);
141
142 if (pSettings->line_exist(section, "snd_reload_jammed_last"))
143 HUD_SOUND::LoadSound(section, "snd_reload_jammed_last", sndReloadJammedLast, m_eSoundReload);
144
145 if (pSettings->line_exist(section, "snd_reload_empty")) // OpenXRay-style неполная перезарядка
146 HUD_SOUND::LoadSound(section, "snd_reload", sndReloadPartly, m_eSoundReload);
147 else if (pSettings->line_exist(section, "snd_reload_partly")) // OGSR-style неполная перезарядка
148 HUD_SOUND::LoadSound(section, "snd_reload_partly", sndReloadPartly, m_eSoundReload);
149
150 if (pSettings->line_exist(section, "snd_fire_modes"))
151 HUD_SOUND::LoadSound(section, "snd_fire_modes", sndFireModes, m_eSoundEmptyClick);
152 if (pSettings->line_exist(section, "snd_zoom_change"))
153 HUD_SOUND::LoadSound(section, "snd_zoom_change", sndZoomChange, m_eSoundEmptyClick);
154 if (pSettings->line_exist(section, "snd_tact_item_on"))
155 HUD_SOUND::LoadSound(section, "snd_tact_item_on", sndTactItemOn, m_eSoundEmptyClick);
156 if (pSettings->line_exist(section, "snd_item_on"))
157 HUD_SOUND::LoadSound(section, "snd_item_on", sndItemOn, m_eSoundEmptyClick);
158
159 if (pSettings->line_exist(section, "snd_aim_start"))
160 HUD_SOUND::LoadSound(section, "snd_aim_start", sndAimStart, m_eSoundShow);
161 if (pSettings->line_exist(section, "snd_aim_end"))
162 HUD_SOUND::LoadSound(section, "snd_aim_end", sndAimEnd, m_eSoundHide);
163
164 m_pSndShotCurrent = &sndShot;
165
166 //звуки и партиклы глушителя, еслит такой есть
167 if (m_eSilencerStatus == ALife::eAddonAttachable)
168 {
169 if (pSettings->line_exist(section, "silencer_flame_particles"))
170 m_sSilencerFlameParticles = pSettings->r_string(section, "silencer_flame_particles");
171 if (pSettings->line_exist(section, "silencer_smoke_particles"))
172 m_sSilencerSmokeParticles = pSettings->r_string(section, "silencer_smoke_particles");
173 HUD_SOUND::LoadSound(section, "snd_silncer_shot", sndSilencerShot, m_eSoundShot);
174 }
175 // [7/20/2005]
176 if (pSettings->line_exist(section, "dispersion_start"))
177 m_iShootEffectorStart = pSettings->r_u8(section, "dispersion_start");
178 else
179 m_iShootEffectorStart = 0;
180 // [7/20/2005]
181 // [7/21/2005]

Callers 1

ReloadMagazineMethod · 0.45

Calls 10

LoadFunction · 0.85
_GetItemCountFunction · 0.85
_GetItemFunction · 0.85
line_existMethod · 0.80
u32Enum · 0.70
r_stringMethod · 0.45
r_u8Method · 0.45
c_strMethod · 0.45
clearMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected