equal
deleted
inserted
replaced
138 |
138 |
139 /* For ships, make sure that the station is not too far away from the previous destination. */ |
139 /* For ships, make sure that the station is not too far away from the previous destination. */ |
140 if (v->type == VEH_Ship && IS_HUMAN_PLAYER(v->owner) && |
140 if (v->type == VEH_Ship && IS_HUMAN_PLAYER(v->owner) && |
141 sel != 0 && GetVehicleOrder(v, sel - 1)->type == OT_GOTO_STATION) { |
141 sel != 0 && GetVehicleOrder(v, sel - 1)->type == OT_GOTO_STATION) { |
142 |
142 |
143 int dist = GetTileDist( |
143 int dist = DistanceManhattan( |
144 GetStation(GetVehicleOrder(v, sel - 1)->station)->xy, |
144 GetStation(GetVehicleOrder(v, sel - 1)->station)->xy, |
145 GetStation(new_order.station)->xy |
145 GetStation(new_order.station)->xy |
146 ); |
146 ); |
147 if (dist >= 130) |
147 if (dist >= 130) |
148 return_cmd_error(STR_0210_TOO_FAR_FROM_PREVIOUS_DESTINATIO); |
148 return_cmd_error(STR_0210_TOO_FAR_FROM_PREVIOUS_DESTINATIO); |