src/train_cmd.cpp
changeset 6481 c069e5454782
parent 6480 767cfeae4dbf
child 6498 aff910a05c6e
equal deleted inserted replaced
6480:767cfeae4dbf 6481:c069e5454782
  2946 
  2946 
  2947 				TrackBits chosen_track;
  2947 				TrackBits chosen_track;
  2948 				if (prev == NULL) {
  2948 				if (prev == NULL) {
  2949 					/* Currently the locomotive is active. Determine which one of the
  2949 					/* Currently the locomotive is active. Determine which one of the
  2950 					 * available tracks to choose */
  2950 					 * available tracks to choose */
  2951 					chosen_track = 1 << ChooseTrainTrack(v, gp.new_tile, enterdir, bits);
  2951 					chosen_track = TrackToTrackBits(ChooseTrainTrack(v, gp.new_tile, enterdir, bits));
  2952 					assert(chosen_track & tracks);
  2952 					assert(chosen_track & tracks);
  2953 
  2953 
  2954 					/* Check if it's a red signal and that force proceed is not clicked. */
  2954 					/* Check if it's a red signal and that force proceed is not clicked. */
  2955 					if ((tracks >> 16) & chosen_track && v->u.rail.force_proceed == 0) {
  2955 					if ((tracks >> 16) & chosen_track && v->u.rail.force_proceed == 0) {
  2956 						// In front of a red signal
  2956 						// In front of a red signal