Changeset - r17053:d1bd348513e5
[Not reviewed]
master
0 1 0
rubidium - 13 years ago 2011-01-15 09:53:21
rubidium@openttd.org
(svn r21800) -Fix [FS#3569]: under certain circumstances one could crash a competitor's train; take the lazy non-future proof version of the fix from the 1.0 branch as fixing the real bug is significantly more complex and might even break some backwards compatability if not done perfectly
1 file changed with 3 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/train_cmd.cpp
Show inline comments
 
@@ -2813,6 +2813,9 @@ static Vehicle *FindTrainCollideEnum(Veh
 
	/* 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();
 

	
0 comments (0 inline, 0 general)