src/vehicle.cpp
changeset 10319 77f1149ee0c9
parent 10272 2014f0bdc800
child 10321 6d58c7470699
equal deleted inserted replaced
10318:e66f24f12a84 10319:77f1149ee0c9
    28 #include "network/network.h"
    28 #include "network/network.h"
    29 #include "yapf/yapf.h"
    29 #include "yapf/yapf.h"
    30 #include "newgrf_callbacks.h"
    30 #include "newgrf_callbacks.h"
    31 #include "newgrf_engine.h"
    31 #include "newgrf_engine.h"
    32 #include "newgrf_sound.h"
    32 #include "newgrf_sound.h"
       
    33 #include "newgrf_station.h"
    33 #include "group.h"
    34 #include "group.h"
    34 #include "order_func.h"
    35 #include "order_func.h"
    35 #include "strings_func.h"
    36 #include "strings_func.h"
    36 #include "zoom_func.h"
    37 #include "zoom_func.h"
    37 #include "functions.h"
    38 #include "functions.h"
  2560 
  2561 
  2561 	/* Only update the timetable if the vehicle was supposed to stop here. */
  2562 	/* Only update the timetable if the vehicle was supposed to stop here. */
  2562 	if (current_order.GetNonStopType() != ONSF_STOP_EVERYWHERE) UpdateVehicleTimetable(this, false);
  2563 	if (current_order.GetNonStopType() != ONSF_STOP_EVERYWHERE) UpdateVehicleTimetable(this, false);
  2563 
  2564 
  2564 	current_order.MakeLeaveStation();
  2565 	current_order.MakeLeaveStation();
  2565 	GetStation(this->last_station_visited)->loading_vehicles.remove(this);
  2566 	Station *st = GetStation(this->last_station_visited);
       
  2567 	st->loading_vehicles.remove(this);
  2566 
  2568 
  2567 	HideFillingPercent(this->fill_percent_te_id);
  2569 	HideFillingPercent(this->fill_percent_te_id);
  2568 	this->fill_percent_te_id = INVALID_TE_ID;
  2570 	this->fill_percent_te_id = INVALID_TE_ID;
       
  2571 
       
  2572 	/* Trigger station animation for trains only */
       
  2573 	if (this->type == VEH_TRAIN && IsTileType(this->tile, MP_STATION)) StationAnimationTrigger(st, this->tile, STAT_ANIM_TRAIN_DEPARTS);
  2569 }
  2574 }
  2570 
  2575 
  2571 
  2576 
  2572 void Vehicle::HandleLoading(bool mode)
  2577 void Vehicle::HandleLoading(bool mode)
  2573 {
  2578 {