src/yapf/yapf_destrail.hpp
changeset 10806 f3fc164fc538
parent 10429 1b99254f9607
equal deleted inserted replaced
10805:97512a15c41b 10806:f3fc164fc538
     9 {
     9 {
    10 protected:
    10 protected:
    11 	RailTypes m_compatible_railtypes;
    11 	RailTypes m_compatible_railtypes;
    12 
    12 
    13 public:
    13 public:
    14 	void SetDestination(Vehicle* v)
    14 	void SetDestination(const Vehicle* v)
    15 	{
    15 	{
    16 		m_compatible_railtypes = v->u.rail.compatible_railtypes;
    16 		m_compatible_railtypes = v->u.rail.compatible_railtypes;
    17 	}
    17 	}
    18 
    18 
    19 	bool IsCompatibleRailType(RailType rt)
    19 	bool IsCompatibleRailType(RailType rt)
    82 		// return the tile of our target coordinates
    82 		// return the tile of our target coordinates
    83 		return TileXY(x, y);
    83 		return TileXY(x, y);
    84 	}
    84 	}
    85 
    85 
    86 public:
    86 public:
    87 	void SetDestination(Vehicle* v)
    87 	void SetDestination(const Vehicle* v)
    88 	{
    88 	{
    89 		switch (v->current_order.GetType()) {
    89 		switch (v->current_order.GetType()) {
    90 			case OT_GOTO_STATION:
    90 			case OT_GOTO_STATION:
    91 				m_destTile = CalcStationCenterTile(v->current_order.GetDestination());
    91 				m_destTile = CalcStationCenterTile(v->current_order.GetDestination());
    92 				m_dest_station_id = v->current_order.GetDestination();
    92 				m_dest_station_id = v->current_order.GetDestination();