| 73 | }; |
| 74 | |
| 75 | void CHelicopter::Load(LPCSTR section) |
| 76 | { |
| 77 | inherited::Load(section); |
| 78 | m_movement.Load(section); |
| 79 | m_body.Load(section); |
| 80 | m_enemy.Load(section); |
| 81 | |
| 82 | m_death_ang_vel = pSettings->r_fvector3(section, "death_angular_vel"); |
| 83 | m_death_lin_vel_k = pSettings->r_float(section, "death_lin_vel_koeff"); |
| 84 | |
| 85 | CHitImmunity::LoadImmunities(pSettings->r_string(section, "immunities_sect"), pSettings); |
| 86 | |
| 87 | // weapons |
| 88 | CShootingObject::Load(section); |
| 89 | HUD_SOUND::LoadSound(section, "snd_shoot", m_sndShot, SOUND_TYPE_WEAPON_SHOOTING); |
| 90 | HUD_SOUND::LoadSound(section, "snd_shoot_rocket", m_sndShotRocket, SOUND_TYPE_WEAPON_SHOOTING); |
| 91 | CRocketLauncher::Load(section); |
| 92 | |
| 93 | UseFireTrail(m_enemy.bUseFireTrail); // temp force reloar disp params |
| 94 | |
| 95 | m_sAmmoType = pSettings->r_string(section, "ammo_class"); |
| 96 | m_CurrentAmmo.Load(*m_sAmmoType, 0); |
| 97 | |
| 98 | m_sRocketSection = pSettings->r_string(section, "rocket_class"); |
| 99 | |
| 100 | m_use_rocket_on_attack = !!pSettings->r_bool(section, "use_rocket"); |
| 101 | m_use_mgun_on_attack = !!pSettings->r_bool(section, "use_mgun"); |
| 102 | m_min_rocket_dist = pSettings->r_float(section, "min_rocket_attack_dist"); |
| 103 | m_max_rocket_dist = pSettings->r_float(section, "max_rocket_attack_dist"); |
| 104 | m_min_mgun_dist = pSettings->r_float(section, "min_mgun_attack_dist"); |
| 105 | m_max_mgun_dist = pSettings->r_float(section, "max_mgun_attack_dist"); |
| 106 | m_time_between_rocket_attack = pSettings->r_u32(section, "time_between_rocket_attack"); |
| 107 | m_syncronize_rocket = !!pSettings->r_bool(section, "syncronize_rocket"); |
| 108 | m_barrel_dir_tolerance = pSettings->r_float(section, "barrel_dir_tolerance"); |
| 109 | |
| 110 | // lighting & sounds |
| 111 | m_smoke_particle = pSettings->r_string(section, "smoke_particle"); |
| 112 | |
| 113 | m_light_range = pSettings->r_float(section, "light_range"); |
| 114 | m_light_brightness = pSettings->r_float(section, "light_brightness"); |
| 115 | |
| 116 | m_light_color = pSettings->r_fcolor(section, "light_color"); |
| 117 | m_light_color.a = 1.f; |
| 118 | m_light_color.mul_rgb(m_light_brightness); |
| 119 | LPCSTR lanim = pSettings->r_string(section, "light_color_animmator"); |
| 120 | m_lanim = LALib.FindItem(lanim); |
| 121 | } |
| 122 | |
| 123 | void CHelicopter::reload(LPCSTR section) { inherited::reload(section); } |
| 124 | |