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

Method Load

ogsr_engine/xrGame/Artifact.cpp:95–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95void CArtefact::Load(LPCSTR section)
96{
97 inherited::Load(section);
98
99 if (pSettings->line_exist(section, "particles"))
100 m_sParticlesName = pSettings->r_string(section, "particles");
101
102 m_bLightsEnabled = !!pSettings->r_bool(section, "lights_enabled");
103 if (m_bLightsEnabled)
104 {
105 sscanf(pSettings->r_string(section, "trail_light_color"), "%f,%f,%f", &m_TrailLightColor.r, &m_TrailLightColor.g, &m_TrailLightColor.b);
106 m_fTrailLightRange = pSettings->r_float(section, "trail_light_range");
107 }
108
109 {
110 m_fHealthRestoreSpeed = pSettings->r_float(section, "health_restore_speed");
111 m_fSatietyRestoreSpeed = pSettings->r_float(section, "satiety_restore_speed");
112 m_fPowerRestoreSpeed = pSettings->r_float(section, "power_restore_speed");
113 m_fBleedingRestoreSpeed = pSettings->r_float(section, "bleeding_restore_speed");
114 if (pSettings->section_exist(/**cNameSect(), */ pSettings->r_string(section, "hit_absorbation_sect")))
115 m_ArtefactHitImmunities.LoadImmunities(pSettings->r_string(section, "hit_absorbation_sect"), pSettings);
116 m_additional_weight = READ_IF_EXISTS(pSettings, r_float, section, "additional_inventory_weight", 0.f);
117 m_additional_weight2 = READ_IF_EXISTS(pSettings, r_float, section, "additional_inventory_weight2", 0.f);
118 m_fThirstRestoreSpeed = READ_IF_EXISTS(pSettings, r_float, section, "thirst_restore_speed", 0.f);
119 }
120 m_bCanSpawnZone = !!pSettings->line_exist("artefact_spawn_zones", section);
121 m_af_rank = READ_IF_EXISTS(pSettings, r_u8, section, "af_rank", 0);
122}
123
124BOOL CArtefact::net_Spawn(CSE_Abstract* DC)
125{

Callers

nothing calls this directly

Calls 12

LoadFunction · 0.85
SStateDefClass · 0.85
_GetItemCountFunction · 0.85
_GetItemFunction · 0.85
clear_bracketsFunction · 0.85
line_existMethod · 0.80
r_boolMethod · 0.80
section_existMethod · 0.80
LoadImmunitiesMethod · 0.80
r_stringMethod · 0.45
r_floatMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected