src/train_cmd.cpp
changeset 6857 60130753e595
parent 6789 d32dd7c82158
child 6871 d8b53c9f0b13
equal deleted inserted replaced
6856:aa95d0fd29f1 6857:60130753e595
   574 			v->cur_image = 0xAC2;
   574 			v->cur_image = 0xAC2;
   575 			v->random_bits = VehicleRandomBits();
   575 			v->random_bits = VehicleRandomBits();
   576 
   576 
   577 			v->group_id = DEFAULT_GROUP;
   577 			v->group_id = DEFAULT_GROUP;
   578 
   578 
   579 			AddArticulatedParts(vl);
   579 			AddArticulatedParts(vl, VEH_TRAIN);
   580 
   580 
   581 			_new_vehicle_id = v->index;
   581 			_new_vehicle_id = v->index;
   582 
   582 
   583 			VehiclePositionChanged(v);
   583 			VehiclePositionChanged(v);
   584 			TrainConsistChanged(GetFirstVehicleInChain(v));
   584 			TrainConsistChanged(GetFirstVehicleInChain(v));
   753 				 * vl[0] is the front and vl[1] is the rear
   753 				 * vl[0] is the front and vl[1] is the rear
   754 				 */
   754 				 */
   755 				vl[0]->u.rail.other_multiheaded_part = vl[1];
   755 				vl[0]->u.rail.other_multiheaded_part = vl[1];
   756 				vl[1]->u.rail.other_multiheaded_part = vl[0];
   756 				vl[1]->u.rail.other_multiheaded_part = vl[0];
   757 			} else {
   757 			} else {
   758 				AddArticulatedParts(vl);
   758 				AddArticulatedParts(vl, VEH_TRAIN);
   759 			}
   759 			}
   760 
   760 
   761 			TrainConsistChanged(v);
   761 			TrainConsistChanged(v);
   762 			UpdateTrainAcceleration(v);
   762 			UpdateTrainAcceleration(v);
   763 			UpdateTrainGroupID(v);
   763 			UpdateTrainGroupID(v);