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

◆ OnSound()

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

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

225 {
226 switch (ctrl)
227 {
228 case CarSoundCtrl.DOORS:
229 float newValue = 0;
230
231 //-----
232 if (GetCarDoorsState("Truck_01_Door_1_1") == CarDoorState.DOORS_CLOSED)
233 {
234 newValue += 0.4;
235 }
236
237 if (GetCarDoorsState("Truck_01_Door_2_1") == CarDoorState.DOORS_CLOSED)
238 {
239 newValue += 0.4;
240 }
241
242 return Math.Clamp(newValue, 0, 1);
243 break;
244 }
245
246 return super.OnSound(ctrl, oldValue);
247 }
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_01_Base.c:280

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