(svn r16392) -Codechange: move some variables (the ones that aren't caches) from VehicleRail to Train

This commit is contained in:
rubidium
2009-05-22 22:33:05 +00:00
parent 1324100d69
commit 6350648a6c
24 changed files with 265 additions and 263 deletions

View File

@@ -28,7 +28,7 @@ void CcBuildWagon(bool success, TileIndex tile, uint32 p1, uint32 p2)
FOR_ALL_VEHICLES(v) {
if (v->type == VEH_TRAIN && IsFrontEngine(v) &&
v->tile == tile &&
((Train *)v)->u.rail.track == TRACK_BIT_DEPOT) {
((Train *)v)->track == TRACK_BIT_DEPOT) {
if (found != NULL) return; // must be exactly one.
found = v;
}