src/rail_cmd.cpp
changeset 10423 293726ac3faa
parent 10355 8a930759b457
equal deleted inserted replaced
10422:f5985144f4a6 10423:293726ac3faa
  1085 
  1085 
  1086 	SignalType sigtype = (SignalType)GB(p2, 7, 3);
  1086 	SignalType sigtype = (SignalType)GB(p2, 7, 3);
  1087 	if (sigtype > SIGTYPE_LAST) return CMD_ERROR;
  1087 	if (sigtype > SIGTYPE_LAST) return CMD_ERROR;
  1088 
  1088 
  1089 	/* copy the signal-style of the first rail-piece if existing */
  1089 	/* copy the signal-style of the first rail-piece if existing */
  1090 	if (HasSignals(tile)) {
  1090 	if (HasSignalOnTrack(tile, track)) {
  1091 		signals = GetPresentSignals(tile) & SignalOnTrack(track);
  1091 		signals = GetPresentSignals(tile) & SignalOnTrack(track);
  1092 		if (signals == 0) signals = SignalOnTrack(track); /* Can this actually occur? */
  1092 		assert(signals != 0);
  1093 
  1093 
  1094 		/* copy signal/semaphores style (independent of CTRL) */
  1094 		/* copy signal/semaphores style (independent of CTRL) */
  1095 		semaphores = GetSignalVariant(tile, track) != SIG_ELECTRIC;
  1095 		semaphores = GetSignalVariant(tile, track) != SIG_ELECTRIC;
  1096 
  1096 
  1097 		sigtype = GetSignalType(tile, track);
  1097 		sigtype = GetSignalType(tile, track);