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

Method Load

ogsr_engine/xrGame/Torch.cpp:84–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84void CTorch::Load(LPCSTR section)
85{
86 inherited::Load(section);
87 light_trace_bone = pSettings->r_string(section, "light_trace_bone");
88
89 if (pSettings->line_exist(section, "snd_turn_on"))
90 HUD_SOUND::LoadSound(section, "snd_turn_on", sndTurnOn, SOUND_TYPE_ITEM_USING);
91 if (pSettings->line_exist(section, "snd_turn_off"))
92 HUD_SOUND::LoadSound(section, "snd_turn_off", sndTurnOff, SOUND_TYPE_ITEM_USING);
93
94 m_bNightVisionEnabled = !!pSettings->r_bool(section, "night_vision");
95 if (m_bNightVisionEnabled)
96 {
97 HUD_SOUND::LoadSound(section, "snd_night_vision_on", m_NightVisionOnSnd, SOUND_TYPE_ITEM_USING);
98 HUD_SOUND::LoadSound(section, "snd_night_vision_off", m_NightVisionOffSnd, SOUND_TYPE_ITEM_USING);
99 HUD_SOUND::LoadSound(section, "snd_night_vision_idle", m_NightVisionIdleSnd, SOUND_TYPE_ITEM_USING);
100 HUD_SOUND::LoadSound(section, "snd_night_vision_broken", m_NightVisionBrokenSnd, SOUND_TYPE_ITEM_USING);
101 }
102
103 m_bind_to_camera = READ_IF_EXISTS(pSettings, r_bool, section, "bind_to_camera", false);
104 m_camera_torch_offset = READ_IF_EXISTS(pSettings, r_fvector3, section, "camera_torch_offset", TORCH_OFFSET);
105 m_camera_omni_offset = READ_IF_EXISTS(pSettings, r_fvector3, section, "camera_omni_offset", OMNI_OFFSET);
106 m_min_target_dist = READ_IF_EXISTS(pSettings, r_float, section, "camera_min_target_dist", m_min_target_dist);
107}
108
109void CTorch::SwitchNightVision()
110{

Callers

nothing calls this directly

Calls 4

LoadFunction · 0.85
line_existMethod · 0.80
r_boolMethod · 0.80
r_stringMethod · 0.45

Tested by

no test coverage detected