void CArtefact::Load(LPCSTR section) { inherited::Load (section); if (pSettings->line_exist(section, "particles")) m_sParticlesName = pSettings->r_string(section, "particles"); m_bLightsEnabled = !!pSettings->r_bool(section, "lights_enabled"); if(m_bLightsEnabled){ sscanf(pSettings->r_string(section,"trail_light_color"), "%f,%f,%f", &m_TrailLightColor.r, &m_TrailLightColor.g, &m_TrailLightColor.b); m_fTrailLightRange = pSettings->r_float(section,"trail_light_range"); } { m_fHealthRestoreSpeed = pSettings->r_float (section,"health_restore_speed" ); m_fRadiationRestoreSpeed = pSettings->r_float (section,"radiation_restore_speed" ); m_fSatietyRestoreSpeed = pSettings->r_float (section,"satiety_restore_speed" ); m_fPowerRestoreSpeed = pSettings->r_float (section,"power_restore_speed" ); m_fBleedingRestoreSpeed = pSettings->r_float (section,"bleeding_restore_speed" ); if(pSettings->section_exist(/**cNameSect(), */pSettings->r_string(section,"hit_absorbation_sect"))) m_ArtefactHitImmunities.LoadImmunities(pSettings->r_string(section,"hit_absorbation_sect"),pSettings); } m_bCanSpawnZone = !!pSettings->line_exist("artefact_spawn_zones", section); animGet (m_anim_idle, pSettings->r_string(*hud_sect,"anim_idle")); animGet (m_anim_idle_sprint, pSettings->r_string(*hud_sect,"anim_idle_sprint")); animGet (m_anim_hide, pSettings->r_string(*hud_sect,"anim_hide")); animGet (m_anim_show, pSettings->r_string(*hud_sect,"anim_show")); animGet (m_anim_activate, pSettings->r_string(*hud_sect,"anim_activate")); }
void CWeaponKnife::Load (LPCSTR section) { // verify class inherited::Load (section); fWallmarkSize = pSettings->r_float(section,"wm_size"); // HUD :: Anims R_ASSERT (m_pHUD); animGet (mhud_idle, pSettings->r_string(*hud_sect,"anim_idle")); animGet (mhud_hide, pSettings->r_string(*hud_sect,"anim_hide")); animGet (mhud_show, pSettings->r_string(*hud_sect,"anim_draw")); animGet (mhud_attack, pSettings->r_string(*hud_sect,"anim_shoot1_start")); animGet (mhud_attack2, pSettings->r_string(*hud_sect,"anim_shoot2_start")); animGet (mhud_attack_e, pSettings->r_string(*hud_sect,"anim_shoot1_end")); animGet (mhud_attack2_e,pSettings->r_string(*hud_sect,"anim_shoot2_end")); #if defined(KNIFE_SPRINT_MOTION) animGet(mhud_idle_sprint, pSettings->r_string(*hud_sect,"anim_idle_sprint") ); #endif HUD_SOUND::LoadSound(section,"snd_shoot" , m_sndShot , ESoundTypes(SOUND_TYPE_WEAPON_SHOOTING) ); knife_material_idx = GMLib.GetMaterialIdx(KNIFE_MATERIAL_NAME); }
void CWeaponMagazined::Load(LPCSTR section) { inherited::Load(section); // Sounds HUD_SOUND::LoadSound(section, "snd_draw", sndShow, m_eSoundShow); HUD_SOUND::LoadSound(section, "snd_holster", sndHide, m_eSoundHide); HUD_SOUND::LoadSound(section, "snd_shoot", sndShot, m_eSoundShot); HUD_SOUND::LoadSound(section, "snd_empty", sndEmptyClick, m_eSoundEmptyClick); HUD_SOUND::LoadSound(section, "snd_reload", sndReload, m_eSoundReload); HUD_SOUND::LoadSound(section, "snd_SightsUp", sndSightsUp, m_eSoundSightsUp); //added by Daemonion for ironsight audio in weapon parameters - sights being raised HUD_SOUND::LoadSound(section, "snd_SightsDown", sndSightsDown, m_eSoundSightsDown); //added by Daemonion for ironsight audio in weapon parameters - sights being lowered m_pSndShotCurrent = &sndShot; // HUD :: Anims R_ASSERT(m_pHUD); animGet(mhud.mhud_idle, pSettings->r_string(*hud_sect, "anim_idle")); animGet(mhud.mhud_reload, pSettings->r_string(*hud_sect, "anim_reload")); animGet(mhud.mhud_show, pSettings->r_string(*hud_sect, "anim_draw")); animGet(mhud.mhud_hide, pSettings->r_string(*hud_sect, "anim_holster")); animGet(mhud.mhud_shots, pSettings->r_string(*hud_sect, "anim_shoot")); if (pSettings->line_exist(*hud_sect, "anim_idle_sprint")) animGet(mhud.mhud_idle_sprint, pSettings->r_string(*hud_sect, "anim_idle_sprint")); if (IsZoomEnabled()) animGet(mhud.mhud_idle_aim, pSettings->r_string(*hud_sect, "anim_idle_aim")); //звуки и партиклы глушителя, еслит такой есть if (m_eSilencerStatus == ALife::eAddonAttachable) { if (pSettings->line_exist(section, "silencer_flame_particles")) m_sSilencerFlameParticles = pSettings->r_string(section, "silencer_flame_particles"); if (pSettings->line_exist(section, "silencer_smoke_particles")) m_sSilencerSmokeParticles = pSettings->r_string(section, "silencer_smoke_particles"); HUD_SOUND::LoadSound(section, "snd_silncer_shot", sndSilencerShot, m_eSoundShot); } // [7/20/2005] if (pSettings->line_exist(section, "dispersion_start")) m_iShootEffectorStart = pSettings->r_u8(section, "dispersion_start"); else m_iShootEffectorStart = 0; // [7/20/2005] // [7/21/2005] if (pSettings->line_exist(section, "fire_modes")) { m_bHasDifferentFireModes = true; shared_str FireModesList = pSettings->r_string(section, "fire_modes"); int ModesCount = _GetItemCount(FireModesList.c_str()); m_aFireModes.clear(); for (int i = 0; i < ModesCount; i++) { string16 sItem; _GetItem(FireModesList.c_str(), i, sItem); int FireMode = atoi(sItem); m_aFireModes.push_back(FireMode); } m_iCurFireMode = ModesCount - 1; m_iPrefferedFireMode = READ_IF_EXISTS(pSettings, r_s16, section, "preffered_fire_mode", -1); } else m_bHasDifferentFireModes = false; // [7/21/2005] }
void CWeaponPistol::Load (LPCSTR section) { inherited::Load (section); HUD_SOUND::LoadSound(section, "snd_close", sndClose, m_eSoundClose); animGet (mhud_pistol.mhud_empty, pSettings->r_string(*hud_sect, "anim_empty")); animGet (mhud_pistol.mhud_shot_l, pSettings->r_string(*hud_sect, "anim_shot_last")); animGet (mhud_pistol.mhud_close, pSettings->r_string(*hud_sect, "anim_close")); animGet (mhud_pistol.mhud_show_empty, pSettings->r_string(*hud_sect, "anim_draw_empty")); animGet (mhud_pistol.mhud_reload_empty, pSettings->r_string(*hud_sect, "anim_reload_empty")); string128 str; strconcat(sizeof(str),str,pSettings->r_string(*hud_sect, "anim_empty"),"_r"); animGet (mhud_pistol_r.mhud_empty, str); strconcat(sizeof(str),str,pSettings->r_string(*hud_sect, "anim_shot_last"),"_r"); animGet (mhud_pistol_r.mhud_shot_l, str); strconcat(sizeof(str),str,pSettings->r_string(*hud_sect, "anim_close"),"_r"); animGet (mhud_pistol_r.mhud_close, str); strconcat(sizeof(str),str,pSettings->r_string(*hud_sect, "anim_draw_empty"),"_r"); animGet (mhud_pistol_r.mhud_show_empty, str); strconcat(sizeof(str),str,pSettings->r_string(*hud_sect, "anim_reload_empty"),"_r"); animGet (mhud_pistol_r.mhud_reload_empty, str); strconcat(sizeof(str),str,pSettings->r_string(*hud_sect, "anim_idle"),"_r"); animGet (wm_mhud_r.mhud_idle, str); strconcat(sizeof(str),str,pSettings->r_string(*hud_sect, "anim_reload"),"_r"); animGet (wm_mhud_r.mhud_reload, str); strconcat(sizeof(str),str,pSettings->r_string(*hud_sect, "anim_draw"),"_r"); animGet (wm_mhud_r.mhud_show, str); strconcat(sizeof(str),str,pSettings->r_string(*hud_sect, "anim_holster"),"_r"); animGet (wm_mhud_r.mhud_hide, str); strconcat(sizeof(str),str,pSettings->r_string(*hud_sect, "anim_shoot"),"_r"); animGet (wm_mhud_r.mhud_shots, str); if(IsZoomEnabled()){ strconcat(sizeof(str),str,pSettings->r_string(*hud_sect, "anim_idle_aim"),"_r"); animGet (wm_mhud_r.mhud_idle_aim, str); } }