@@ -2228,14 +2228,12 @@ void Train::PlayLeaveStationSound() cons
SND_0A_TRAIN_HORN,
SND_47_MAGLEV_2,
SND_41_MAGLEV
};
if (IsTileType(this->tile, MP_STATION)) StationAnimationTrigger(NULL, this->tile, STAT_ANIM_TRAIN_DEPARTS);
if (PlayVehicleSound(this, VSE_START)) return;
EngineID engtype = this->engine_type;
SndPlayVehicleFx(sfx[RailVehInfo(engtype)->engclass], this);
}
@@ -27,12 +27,13 @@
#include "water_map.h"
#include "network/network.h"
#include "yapf/yapf.h"
#include "newgrf_callbacks.h"
#include "newgrf_engine.h"
#include "newgrf_sound.h"
#include "newgrf_station.h"
#include "group.h"
#include "order_func.h"
#include "strings_func.h"
#include "zoom_func.h"
#include "functions.h"
#include "date_func.h"
@@ -2559,16 +2560,20 @@ void Vehicle::LeaveStation()
assert(current_order.IsType(OT_LOADING));
/* Only update the timetable if the vehicle was supposed to stop here. */
if (current_order.GetNonStopType() != ONSF_STOP_EVERYWHERE) UpdateVehicleTimetable(this, false);
current_order.MakeLeaveStation();
GetStation(this->last_station_visited)->loading_vehicles.remove(this);
Station *st = GetStation(this->last_station_visited);
st->loading_vehicles.remove(this);
HideFillingPercent(this->fill_percent_te_id);
this->fill_percent_te_id = INVALID_TE_ID;
/* Trigger station animation for trains only */
if (this->type == VEH_TRAIN && IsTileType(this->tile, MP_STATION)) StationAnimationTrigger(st, this->tile, STAT_ANIM_TRAIN_DEPARTS);
void Vehicle::HandleLoading(bool mode)
{
switch (this->current_order.GetType()) {
Status change: