299 {
300 float tempCap = 0.0;
301
302 switch (ctrl)
303 {
305 float newValue = 0;
307 {
308 newValue += 0.5;
309 }
310
312 {
313 newValue += 0.5;
314 }
315
317 {
318 newValue += 0.3;
319 }
320
321 if (GetHealthLevel("WindowFront") == GameConstants.STATE_RUINED)
322 {
323 newValue -= 0.6;
324 }
325
326 if (GetHealthLevel("WindowLR") == GameConstants.STATE_RUINED)
327 {
328 newValue -= 0.2;
329 }
330
331 if (GetHealthLevel("WindowRR") == GameConstants.STATE_RUINED)
332 {
333 newValue -= 0.2;
334 }
335
336 return Math.Clamp(newValue, 0, 1);
337 break;
338 }
339
340 return super.OnSound(ctrl, oldValue);
341 }
CarSoundCtrl
Car's sound controller list. (native, do not change or extend)
override int GetCarDoorsState(string slotType)