DayZ 1.29
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ OnSound() [8/8]

override float CarScript::OnSound ( CarSoundCtrl ctrl,
float oldValue )
inlineprotected

См. определение в файле Van_01.c строка 192

193 {
194 switch ( ctrl )
195 {
196 case CarSoundCtrl.DOORS:
197 float newValue = 0;
198
199 //-----
200 if ( GetCarDoorsState( "Van_01_Door_1_1" ) == CarDoorState.DOORS_CLOSED )
201 newValue += 0.25;
202
203 //-----
204 if ( GetCarDoorsState( "Van_01_Door_2_1" ) == CarDoorState.DOORS_CLOSED )
205 newValue += 0.25;
206
207 //-----
208 if ( GetCarDoorsState( "Van_01_Door_2_2" ) == CarDoorState.DOORS_CLOSED )
209 newValue += 0.25;
210
211 //-----
212 if ( GetCarDoorsState( "Van_01_Trunk_1" ) == CarDoorState.DOORS_CLOSED )
213 newValue += 0.125;
214
215 //-----
216 if ( GetCarDoorsState( "Van_01_Trunk_2" ) == CarDoorState.DOORS_CLOSED )
217 newValue += 0.125;
218
219 if ( newValue > 1 )
220 newValue = 1;
221
222 return newValue;
223 break;
224 }
225
226 return oldValue;
227 }
CarSoundCtrl
Car's sound controller list. (native, do not change or extend)
Определения Car.c:4
CarDoorState
Определения CarScript.c:2
override int GetCarDoorsState(string slotType)
Определения CivilianSedan.c:173

Перекрестные ссылки GetCarDoorsState().