summaryrefslogtreecommitdiff
path: root/src/rail_cmd.cpp
diff options
context:
space:
mode:
authorterkhen <terkhen@openttd.org>2010-12-14 21:33:53 +0000
committerterkhen <terkhen@openttd.org>2010-12-14 21:33:53 +0000
commit48b7916458de4b2cdbc226a4a6ab078db4c77e73 (patch)
treec3a49ca7a91890042ca56765574bc40a54c15f96 /src/rail_cmd.cpp
parenta93944e765776c6e9a2bd556457cd93748068da6 (diff)
downloadopenttd-48b7916458de4b2cdbc226a4a6ab078db4c77e73.tar.xz
(svn r21521) -Codechange: Unify some cached values that were present in both road vehicles and trains.
Diffstat (limited to 'src/rail_cmd.cpp')
-rw-r--r--src/rail_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp
index 2e88b1eb7..eed8c0bb8 100644
--- a/src/rail_cmd.cpp
+++ b/src/rail_cmd.cpp
@@ -2698,7 +2698,7 @@ static const int8 _deltacoord_leaveoffset[8] = {
int TicksToLeaveDepot(const Train *v)
{
DiagDirection dir = GetRailDepotDirection(v->tile);
- int length = v->tcache.cached_veh_length;
+ int length = v->gcache.cached_veh_length;
switch (dir) {
case DIAGDIR_NE: return ((int)(v->x_pos & 0x0F) - ((_fractcoords_enter[dir] & 0x0F) - (length + 1)));
@@ -2727,7 +2727,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 */
- int length = v->tcache.cached_veh_length;
+ int length = v->gcache.cached_veh_length;
byte fract_coord_leave =
((_fractcoords_enter[dir] & 0x0F) + // x