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

◆ OnSound() [2/2]

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

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

210 {
211 switch ( ctrl )
212 {
213 case CarSoundCtrl.DOORS:
214 float newValue = 0;
215
216 //-----
217 if ( GetCarDoorsState( "Van_01_Door_1_1" ) == CarDoorState.DOORS_CLOSED )
218 newValue += 0.25;
219
220 //-----
221 if ( GetCarDoorsState( "Van_01_Door_2_1" ) == CarDoorState.DOORS_CLOSED )
222 newValue += 0.25;
223
224 //-----
225 if ( GetCarDoorsState( "Van_01_Door_2_2" ) == CarDoorState.DOORS_CLOSED )
226 newValue += 0.25;
227
228 //-----
229 if ( GetCarDoorsState( "Van_01_Trunk_1" ) == CarDoorState.DOORS_CLOSED )
230 newValue += 0.125;
231
232 //-----
233 if ( GetCarDoorsState( "Van_01_Trunk_2" ) == CarDoorState.DOORS_CLOSED )
234 newValue += 0.125;
235
236 if ( newValue > 1 )
237 newValue = 1;
238
239 return newValue;
240 break;
241 }
242
243 return oldValue;
244 }
CarSoundCtrl
Car's sound controller list. (native, do not change or extend)
Определения Car.c:4
CarDoorState
Определения CarScript.c:2
override int GetCarDoorsState(string slotType)
Определения Truck_02.c:106

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