Change GetTrainStopLocation to GetDistanceToStopLocation
commitacc2e1986b37e587e7c1cb688ade856a2ef19f61
authorcirdan <cirdansw@gmail.com>
Tue, 26 Dec 2017 15:19:39 +0000 (26 16:19 +0100)
committercirdan <cirdansw@gmail.com>
Tue, 26 Dec 2017 15:19:39 +0000 (26 16:19 +0100)
tree20a3cccc6be286e0c19196dc2866e08847c971a4
parente92f3725cc29c661102beb4de376185d9c6093d1
Change GetTrainStopLocation to GetDistanceToStopLocation

Replace GetTrainStopLocation, which was used to compute the
stopping location for a train at a station, with a new function
GetDistanceToStopLocation that computes the remaining distance to
that location instead. The new function takes the current position
of the train within its tile into account, and so provides tile
subcoord accuracy. Also make the function static while at it.
src/train.h
src/train_cmd.cpp