(svn r14676) -Fix: Do not copy the signal type of parallel vertical/horizontal track, when dragging signals.

This commit is contained in:
frosch 2008-12-14 19:52:55 +00:00
parent 79e20448f8
commit e259fa8ede

View File

@ -1087,9 +1087,9 @@ static CommandCost CmdSignalTrackHelper(TileIndex tile, uint32 flags, uint32 p1,
if (sigtype > SIGTYPE_LAST) return CMD_ERROR; if (sigtype > SIGTYPE_LAST) return CMD_ERROR;
/* copy the signal-style of the first rail-piece if existing */ /* copy the signal-style of the first rail-piece if existing */
if (HasSignals(tile)) { if (HasSignalOnTrack(tile, track)) {
signals = GetPresentSignals(tile) & SignalOnTrack(track); signals = GetPresentSignals(tile) & SignalOnTrack(track);
if (signals == 0) signals = SignalOnTrack(track); /* Can this actually occur? */ assert(signals != 0);
/* copy signal/semaphores style (independent of CTRL) */ /* copy signal/semaphores style (independent of CTRL) */
semaphores = GetSignalVariant(tile, track) != SIG_ELECTRIC; semaphores = GetSignalVariant(tile, track) != SIG_ELECTRIC;