| 93 | } |
| 94 | |
| 95 | void 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 | |
| 124 | BOOL CArtefact::net_Spawn(CSE_Abstract* DC) |
| 125 | { |
nothing calls this directly
no test coverage detected