summaryrefslogtreecommitdiff
path: root/train_cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'train_cmd.c')
-rw-r--r--train_cmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/train_cmd.c b/train_cmd.c
index 309ddc128..21839c44b 100644
--- a/train_cmd.c
+++ b/train_cmd.c
@@ -86,7 +86,7 @@ void TrainConsistChanged(Vehicle* v)
assert(IsFrontEngine(v) || IsFreeWagon(v));
rvi_v = RailVehInfo(v->engine_type);
- first_engine = IsFrontEngine(v) ? v->engine_type : INVALID_VEHICLE;
+ first_engine = IsFrontEngine(v) ? v->engine_type : INVALID_ENGINE;
v->u.rail.cached_total_length = 0;
for (u = v; u != NULL; u = u->next) {
@@ -97,7 +97,7 @@ void TrainConsistChanged(Vehicle* v)
if (u->first == NULL) u->first = v;
// update the 'first engine'
- u->u.rail.first_engine = (v == u) ? INVALID_VEHICLE : first_engine;
+ u->u.rail.first_engine = (v == u) ? INVALID_ENGINE : first_engine;
if (rvi_u->visual_effect != 0) {
u->u.rail.cached_vis_effect = rvi_u->visual_effect;