MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / StartRoadVehSound

Function StartRoadVehSound

src/roadveh_cmd.cpp:607–616  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

605}
606
607static void StartRoadVehSound(const RoadVehicle *v)
608{
609 if (!PlayVehicleSound(v, VSE_START)) {
610 SoundID s = RoadVehInfo(v->engine_type)->sfx;
611 if (s == SND_19_DEPARTURE_OLD_RV_1 && (v->tick_counter & 3) == 0) {
612 s = SND_1A_DEPARTURE_OLD_RV_2;
613 }
614 SndPlayVehicleFx(s, v);
615 }
616}
617
618struct RoadVehFindData {
619 int x;

Callers 2

RoadVehLeaveDepotFunction · 0.85

Calls 3

PlayVehicleSoundFunction · 0.85
RoadVehInfoFunction · 0.85
SndPlayVehicleFxFunction · 0.85

Tested by

no test coverage detected