diff options
-rw-r--r-- | src/train_cmd.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index 46c804543..600deddca 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -2813,6 +2813,9 @@ static Vehicle *FindTrainCollideEnum(Vehicle *v, void *data) /* not a train or in depot */ if (v->type != VEH_TRAIN || Train::From(v)->track == TRACK_BIT_DEPOT) return NULL; + /* do not crash into trains of another company. */ + if (v->owner != tcc->v->owner) return NULL; + /* get first vehicle now to make most usual checks faster */ Train *coll = Train::From(v)->First(); |