1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-09-02 11:29:10 +00:00

(svn r9807) -Codechange: unify playing of sound when vehicle has been loaded and leaves the station.

This commit is contained in:
rubidium
2007-05-07 15:58:05 +00:00
parent 4591fb5b0d
commit 161786e222
5 changed files with 20 additions and 3 deletions

View File

@@ -2097,6 +2097,11 @@ static void TrainPlayLeaveStationSound(const Vehicle* v)
SndPlayVehicleFx(sfx[RailVehInfo(engtype)->engclass], v);
}
void Train::PlayLeaveStationSound() const
{
TrainPlayLeaveStationSound(this);
}
static bool CheckTrainStayInDepot(Vehicle *v)
{
/* bail out if not all wagons are in the same depot or not in a depot at all */
@@ -2531,7 +2536,7 @@ static void HandleTrainLoading(Vehicle *v, bool mode)
if (LoadUnloadVehicle(v)) return;
TrainPlayLeaveStationSound(v);
v->PlayLeaveStationSound();
Order b = v->current_order;
v->LeaveStation();