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

◆ OnSound()

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

См. определение в файле Vehicles/InheritedCars/Sedan_02.c строка 322

323 {
324 switch ( ctrl )
325 {
326 case CarSoundCtrl.DOORS:
327 float newValue = 0;
328 if (GetCarDoorsState("Sedan_02_Door_1_1") == CarDoorState.DOORS_CLOSED)
329 {
330 newValue += 0.25;
331 }
332
333 if (GetCarDoorsState("Sedan_02_Door_2_1") == CarDoorState.DOORS_CLOSED)
334 {
335 newValue += 0.25;
336 }
337
338 if (GetCarDoorsState("Sedan_02_Door_1_2") == CarDoorState.DOORS_CLOSED)
339 {
340 newValue += 0.25;
341 }
342
343 if (GetCarDoorsState("Sedan_02_Door_2_2") == CarDoorState.DOORS_CLOSED)
344 {
345 newValue += 0.25;
346 }
347
348 return Math.Clamp(newValue, 0, 1);
349 break;
350 }
351
352 return super.OnSound(ctrl, oldValue);
353 }
CarSoundCtrl
Car's sound controller list. (native, do not change or extend)
Определения Car.c:4
CarDoorState
Определения CarScript.c:2
override int GetCarDoorsState(string slotType)

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