(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

@@ -558,12 +558,12 @@ bool SettingsDisableElrail(int32 p1)
if (v->type != VEH_TRAIN) continue;
Train *t = (Train *)v;
if (t->u.rail.railtype == RAILTYPE_ELECTRIC) {
if (t->railtype == RAILTYPE_ELECTRIC) {
/* this railroad vehicle is now compatible only with elrail,
* so add there also normal rail compatibility */
t->u.rail.compatible_railtypes |= RAILTYPES_RAIL;
t->u.rail.railtype = RAILTYPE_RAIL;
SetBit(t->u.rail.flags, VRF_EL_ENGINE_ALLOWED_NORMAL_RAIL);
t->compatible_railtypes |= RAILTYPES_RAIL;
t->railtype = RAILTYPE_RAIL;
SetBit(t->flags, VRF_EL_ENGINE_ALLOWED_NORMAL_RAIL);
}
}
}