mirror of https://github.com/OpenTTD/OpenTTD
(svn r25225) -Fix: [NewGRF] Play vehicle sound effect also for planes.
parent
2030d1cf60
commit
9dee2f5c1e
|
@ -890,9 +890,23 @@ void CallVehicleTicks()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (v->type == VEH_TRAIN && Train::From(v)->IsWagon()) continue;
|
/* Check vehicle sounds */
|
||||||
if (v->type == VEH_AIRCRAFT && v->subtype != AIR_HELICOPTER) continue;
|
switch (v->type) {
|
||||||
if (v->type == VEH_ROAD && !RoadVehicle::From(v)->IsFrontEngine()) continue;
|
case VEH_TRAIN:
|
||||||
|
if (Train::From(v)->IsWagon()) continue;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case VEH_ROAD:
|
||||||
|
if (!RoadVehicle::From(v)->IsFrontEngine()) continue;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case VEH_AIRCRAFT:
|
||||||
|
if (!Aircraft::From(v)->IsNormalAircraft()) continue;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
v->motion_counter += front->cur_speed;
|
v->motion_counter += front->cur_speed;
|
||||||
/* Play a running sound if the motion counter passes 256 (Do we not skip sounds?) */
|
/* Play a running sound if the motion counter passes 256 (Do we not skip sounds?) */
|
||||||
|
|
Loading…
Reference in New Issue