| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| enum AnimBootsType |
| { |
| None, |
| Sneakers, |
| Boots |
| } |
|
|
| enum AnimUpperBodyType |
| { |
| None = 4107064, |
| NylonJacket = 1228024514, |
| TShirt = 1690896446, |
| WoolShirt = 1060939383, |
| HeavyJacket = 1544363355, |
| LeatherJacket = 2008520095, |
| Coat = 3549415, |
| ChemlonDress = -1491825621, |
| Ghillie = 602194810, |
| Chainmail = -563873622, |
| } |
|
|
| enum AnimBackType |
| { |
| None = -1, |
| Small = 161213437, |
| Military = 1935514591, |
| Outdoor = 574855932, |
| Ghillie = 602194810 |
| } |
|
|
| enum AnimRangedWeaponType |
| { |
| None = 5727960, |
| Rifle = 219116654, |
| Shotgun = 1836650908 |
| } |
|
|
| class AnimSoundEvent |
| { |
| int m_iID; |
| ref SoundObjectBuilder m_SoundObjectBuilder; |
| ref SoundParams m_SoundParams; |
| autoptr NoiseParams m_NoiseParams; |
| bool m_IsValid = false; |
| SoundLookupTable m_Table; |
| |
| |
| void AnimSoundEvent(string soundPath) |
| { |
| m_iID = GetGame().ConfigGetInt(soundPath + "id"); |
|
|
| #ifndef SERVER |
|
|
| string soundSetName; |
| if (GetGame().ConfigGetText(soundPath + "soundSet", soundSetName)) |
| { |
| m_SoundParams = new SoundParams(soundSetName); |
| if (m_SoundParams.IsValid()) |
| { |
| m_SoundObjectBuilder = new SoundObjectBuilder(m_SoundParams); |
| m_IsValid = true; |
| } |
| } |
| |
| string tableName; |
| if (GetGame().ConfigGetText(soundPath + "soundLookupTable", tableName)) |
| { |
| m_Table = AnimSoundLookupTableBank.GetInstance().GetActionTable(tableName); |
| if (m_Table) |
| { |
| m_IsValid = true; |
| |
| } |
| } |
| #endif |
|
|
| |
| |
| |
| if ( GetGame().IsServer() ) |
| { |
| string noiseName; |
| if (GetGame().ConfigGetText(soundPath + "noise", noiseName)) |
| { |
| m_NoiseParams = new NoiseParams(); |
| m_NoiseParams.Load(noiseName); |
| m_IsValid = true; |
| } |
| else |
| { |
| |
| } |
| } |
| } |
| |
| bool IsValid() |
| { |
| return m_IsValid; |
| } |
| |
| SoundObjectBuilder GetSoundBuilder() |
| { |
| return m_SoundObjectBuilder; |
| } |
| |
| SoundObjectBuilder GetSoundBuilderEx(int paramHash = 0) |
| { |
| if (m_Table && paramHash) |
| { |
| return m_Table.GetSoundBuilder(paramHash); |
| } |
| return m_SoundObjectBuilder; |
| } |
|
|
| SoundObject GetSoundObject(vector position) |
| { |
| GetSoundBuilderEx().AddEnvSoundVariables(position); |
| return GetSoundBuilderEx().BuildSoundObject(); |
| } |
| } |
|
|
| class AnimSoundVoiceEvent |
| { |
| int m_iID; |
| ref SoundObjectBuilder m_SoundObjectBuilder; |
| ref SoundParams m_SoundParams; |
| autoptr NoiseParams m_NoiseParams; |
| bool m_IsValid = false; |
|
|
| void AnimSoundVoiceEvent(string soundPath) |
| { |
| m_iID = GetGame().ConfigGetInt(soundPath + "id"); |
|
|
| if ( !GetGame().IsDedicatedServer() ) |
| { |
| string soundSetName; |
| GetGame().ConfigGetText(soundPath + "soundSet", soundSetName); |
| m_SoundParams = new SoundParams(soundSetName); |
| if ( m_SoundParams.IsValid() ) |
| { |
| m_SoundObjectBuilder = new SoundObjectBuilder(m_SoundParams); |
| m_IsValid = true; |
| } |
| } |
| |
| if ( GetGame().IsServer() ) |
| { |
| string noiseName; |
| if (GetGame().ConfigGetText(soundPath + "noise", noiseName)) |
| { |
| m_NoiseParams = new NoiseParams(); |
| m_NoiseParams.Load(noiseName); |
| m_IsValid = true; |
| } |
| else |
| { |
| |
| } |
| } |
| } |
| |
| bool IsValid() |
| { |
| return m_IsValid; |
| } |
| |
| SoundObjectBuilder GetSoundBuilder() |
| { |
| return m_SoundObjectBuilder; |
| } |
|
|
| SoundObject GetSoundObject(vector position) |
| { |
| m_SoundObjectBuilder.AddEnvSoundVariables(position); |
| return m_SoundObjectBuilder.BuildSoundObject(); |
| } |
| } |
|
|
| class AnimStepEvent |
| { |
| int m_iID; |
| string m_sSoundLookupTableName; |
| StepSoundLookupTable m_soundLookupTable; |
| autoptr NoiseParams m_NoiseParams; |
|
|
| void AnimStepEvent(string stepPath) |
| { |
| m_iID = GetGame().ConfigGetInt(stepPath + "id"); |
|
|
| if ( !GetGame().IsDedicatedServer() ) |
| { |
| GetGame().ConfigGetText(stepPath + "soundLookupTable", m_sSoundLookupTableName); |
| m_soundLookupTable = StepSoundLookupTable.Cast( AnimSoundLookupTableBank.GetInstance().GetStepTable(m_sSoundLookupTableName) ); |
| } |
| |
| if ( GetGame().IsServer() ) |
| { |
| string noiseName; |
| if (GetGame().ConfigGetText(stepPath + "noise",noiseName)) |
| { |
| m_NoiseParams = new NoiseParams(); |
| m_NoiseParams.Load(noiseName); |
| } |
| } |
| } |
| |
| SoundObjectBuilder GetSoundBuilder(int surfaceHash) |
| { |
| return m_soundLookupTable.GetSoundBuilder(surfaceHash); |
| } |
| } |
|
|
| class AnimDamageEvent |
| { |
| int m_iID; |
| autoptr AnimDamageParams m_DamageParams; |
|
|
| void AnimDamageEvent(string damagePath) |
| { |
| m_iID = GetGame().ConfigGetInt(damagePath + "id"); |
| |
| string damageName; |
| GetGame().ConfigGetText(damagePath + "damage", damageName); |
| m_DamageParams = new AnimDamageParams(damageName); |
| } |
| } |
|
|
| class AnimDamageParams |
| { |
| string m_sName; |
| string m_sBoneName; |
| string m_sAmmoName; |
| float m_fRadius; |
| float m_fDuration; |
| bool m_bInvertTeams; |
|
|
| static const string DAMAGE_CFG_CLASS = "CfgDamages "; |
| void AnimDamageParams(string damageName) |
| { |
| m_sName = damageName; |
| string damagePath = DAMAGE_CFG_CLASS + damageName + " "; |
|
|
| GetGame().ConfigGetText(damagePath + "bone", m_sBoneName); |
| GetGame().ConfigGetText(damagePath + "ammo", m_sAmmoName); |
| m_fRadius = GetGame().ConfigGetFloat(damagePath + "radius"); |
| m_fDuration = GetGame().ConfigGetFloat(damagePath + "duration"); |
| |
| m_bInvertTeams = false; |
| string str_invert_teams_cfg; |
| GetGame().ConfigGetText(damagePath + "invertTeams", str_invert_teams_cfg); |
| str_invert_teams_cfg.ToLower(); |
| if (str_invert_teams_cfg == "true") |
| { |
| m_bInvertTeams = true; |
| } |
| } |
| } |
|
|
| class AnimEffectParams |
| { |
| string m_sName; |
|
|
| static const string EFFECT_CFG_CLASS = "CfgEffects "; |
| void AnimEffectParams(string effectName) |
| { |
| m_sName = effectName; |
| string effectPath = EFFECT_CFG_CLASS + effectName + " "; |
| |
| } |
| } |
|
|