summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2008-12-14 19:52:55 +0000
committerfrosch <frosch@openttd.org>2008-12-14 19:52:55 +0000
commite259fa8ede15303c6ef3c5f64ad0fbebe9a7eaeb (patch)
tree068170779ba02efc992b3998339657c5fa3c1489 /src
parent79e20448f8b7b4fac82dce90789d2aab8667714f (diff)
downloadopenttd-e259fa8ede15303c6ef3c5f64ad0fbebe9a7eaeb.tar.xz
(svn r14676) -Fix: Do not copy the signal type of parallel vertical/horizontal track, when dragging signals.
Diffstat (limited to 'src')
-rw-r--r--src/rail_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp
index cbe1e65ef..54380b7e7 100644
--- a/src/rail_cmd.cpp
+++ b/src/rail_cmd.cpp
@@ -1087,9 +1087,9 @@ static CommandCost CmdSignalTrackHelper(TileIndex tile, uint32 flags, uint32 p1,
if (sigtype > SIGTYPE_LAST) return CMD_ERROR;
/* copy the signal-style of the first rail-piece if existing */
- if (HasSignals(tile)) {
+ if (HasSignalOnTrack(tile, 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) */
semaphores = GetSignalVariant(tile, track) != SIG_ELECTRIC;