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

◆ OnSound() [8/8]

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

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

184 {
185 switch ( ctrl )
186 {
187 case CarSoundCtrl.DOORS:
188 float newValue = 0;
189
190 //-----
191 if ( GetCarDoorsState( "Van_01_Door_1_1" ) == CarDoorState.DOORS_CLOSED )
192 newValue += 0.25;
193
194 //-----
195 if ( GetCarDoorsState( "Van_01_Door_2_1" ) == CarDoorState.DOORS_CLOSED )
196 newValue += 0.25;
197
198 //-----
199 if ( GetCarDoorsState( "Van_01_Door_2_2" ) == CarDoorState.DOORS_CLOSED )
200 newValue += 0.25;
201
202 //-----
203 if ( GetCarDoorsState( "Van_01_Trunk_1" ) == CarDoorState.DOORS_CLOSED )
204 newValue += 0.125;
205
206 //-----
207 if ( GetCarDoorsState( "Van_01_Trunk_2" ) == CarDoorState.DOORS_CLOSED )
208 newValue += 0.125;
209
210 if ( newValue > 1 )
211 newValue = 1;
212
213 return newValue;
214 break;
215 }
216
217 return oldValue;
218 }
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:163

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