forked from mirror/OpenTTD
(svn r16393) -Codechange: move VehicleRail to Train.
This commit is contained in:
@@ -2433,10 +2433,10 @@ static const signed char _deltacoord_leaveoffset[8] = {
|
||||
* @param v vehicle outside (leaving) the depot
|
||||
* @return number of ticks when the next wagon will leave
|
||||
*/
|
||||
int TicksToLeaveDepot(const Vehicle *v)
|
||||
int TicksToLeaveDepot(const Train *v)
|
||||
{
|
||||
DiagDirection dir = GetRailDepotDirection(v->tile);
|
||||
int length = v->u.rail.cached_veh_length;
|
||||
int length = v->tcache.cached_veh_length;
|
||||
|
||||
switch (dir) {
|
||||
case DIAGDIR_NE: return ((int)(v->x_pos & 0x0F) - ((_fractcoords_enter[dir] & 0x0F) - (length + 1)));
|
||||
@@ -2468,7 +2468,7 @@ static VehicleEnterTileStatus VehicleEnter_Track(Vehicle *u, TileIndex tile, int
|
||||
|
||||
/* calculate the point where the following wagon should be activated
|
||||
* this depends on the length of the current vehicle */
|
||||
length = v->u.rail.cached_veh_length;
|
||||
length = v->tcache.cached_veh_length;
|
||||
|
||||
fract_coord_leave =
|
||||
((_fractcoords_enter[dir] & 0x0F) + // x
|
||||
|
Reference in New Issue
Block a user