9 string m_AnimEventsCfgPath;
13 m_CfgPath =
"CfgVehicles " + GetName() +
" ";
14 m_AnimEventsCfgPath = m_CfgPath +
"AnimEvents ";
23 void LoadAnimSoundEvents()
27 string soundsCfgPath = m_AnimEventsCfgPath +
"Sounds ";
29 int soundCount =
GetGame().ConfigGetChildrenCount(soundsCfgPath);
30 for (
int i = 0; i < soundCount; i++)
33 GetGame().ConfigGetChildName(soundsCfgPath, i, soundName);
34 string soundPath = soundsCfgPath + soundName +
" ";
35 AnimSoundEvent soundEvent =
new AnimSoundEvent(soundPath);
36 if (soundEvent.IsValid())
41 void LoadAnimSoundVoiceEvents()
45 string soundsCfgPath = m_AnimEventsCfgPath +
"SoundVoice ";
47 int soundCount =
GetGame().ConfigGetChildrenCount(soundsCfgPath);
48 for (
int i = 0; i < soundCount; i++)
51 GetGame().ConfigGetChildName(soundsCfgPath, i, soundName);
52 string soundPath = soundsCfgPath + soundName +
" ";
53 AnimSoundVoiceEvent soundEvent =
new AnimSoundVoiceEvent(soundPath);
54 if (soundEvent.IsValid())
55 m_animSoundVoiceEvents.Insert(soundEvent);
59 void LoadAnimStepEvents()
62 string stepsCfgPath = m_AnimEventsCfgPath +
"Steps ";
63 int stepsCount =
GetGame().ConfigGetChildrenCount(stepsCfgPath);
65 for (
int i = 0; i < stepsCount; i++)
68 GetGame().ConfigGetChildName(stepsCfgPath, i, stepName);
69 string stepPath = stepsCfgPath + stepName +
" ";
70 AnimStepEvent stepEvent =
new AnimStepEvent(stepPath);
71 m_animStepEvents.Insert(stepEvent);
75 void LoadAnimDamageEvents()
79 string damagesCfgPath = m_AnimEventsCfgPath +
"Damages ";
80 int damagesCount =
GetGame().ConfigGetChildrenCount(damagesCfgPath);
82 for (
int i = 0; i < damagesCount; i++)
85 GetGame().ConfigGetChildName(damagesCfgPath, i, damageName);
86 string damagePath = damagesCfgPath + damageName +
" ";
87 AnimDamageEvent damageEvent =
new AnimDamageEvent(damagePath);
88 m_animDamageEvents.Insert(damageEvent);
92 private void LoadParams()
94 LoadAnimSoundEvents();
95 LoadAnimSoundVoiceEvents();
97 LoadAnimDamageEvents();
100 AnimStepEvent GetStepEvent(
int event_id)
102 for (
int i = 0; i < m_animStepEvents.Count(); i++)
104 AnimStepEvent stepEvent = m_animStepEvents.Get(i);
105 if (stepEvent.m_iID == event_id)
114 AnimSoundEvent GetSoundEvent(
int event_id)
119 if (soundEvent.m_iID == event_id)
128 AnimSoundVoiceEvent GetSoundVoiceEvent(
int event_id)
130 for (
int i = 0; i < m_animSoundVoiceEvents.Count(); i++)
132 AnimSoundVoiceEvent voiceEvent = m_animSoundVoiceEvents.Get(i);
133 if (voiceEvent.m_iID == event_id)
142 AnimDamageEvent GetDamageEvent(
int event_id)
144 for (
int i = 0; i < m_animDamageEvents.Count(); i++)
146 AnimDamageEvent damageEvent = m_animDamageEvents.Get(i);
147 if (damageEvent.m_iID == event_id)
156 proto native owned
string GetName();