Mercurial > hg > openttd
diff src/train_cmd.cpp @ 8236:d1191295967a draft
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
author | rubidium <rubidium@openttd.org> |
---|---|
date | Wed, 09 Jan 2008 21:05:03 +0000 |
parents | 5b61305fcdd4 |
children | e9d8b0764f38 |
line wrap: on
line diff
--- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -165,7 +165,7 @@ const RailVehicleInfo *rvi_v = RailVehInfo(v->engine_type); EngineID first_engine = IsFrontEngine(v) ? v->engine_type : INVALID_ENGINE; v->u.rail.cached_total_length = 0; - v->u.rail.compatible_railtypes = 0; + v->u.rail.compatible_railtypes = RAILTYPES_NONE; bool train_can_tilt = true; @@ -230,7 +230,7 @@ * existing electric engines when elrails are disabled and then re-enabled */ if (HasBit(u->u.rail.flags, VRF_EL_ENGINE_ALLOWED_NORMAL_RAIL)) { u->u.rail.railtype = RAILTYPE_RAIL; - u->u.rail.compatible_railtypes |= (1 << RAILTYPE_RAIL); + u->u.rail.compatible_railtypes |= RAILTYPES_RAIL; } /* max speed is the minimum of the speed limits of all vehicles in the consist */