(svn r7936) -Fix (r4987, old-rev): Only update the signals and YAPF cache on a DC_EXEC action for bridge-building
authorDarkvater
Sun, 07 Jan 2007 00:19:57 +0000
changeset 5554 49c032cbe21d
parent 5553 24054eb99723
child 5555 f1c050be9cf8
(svn r7936) -Fix (r4987, old-rev): Only update the signals and YAPF cache on a DC_EXEC action for bridge-building
src/tunnelbridge_cmd.c
--- a/src/tunnelbridge_cmd.c	Sat Jan 06 23:47:59 2007 +0000
+++ b/src/tunnelbridge_cmd.c	Sun Jan 07 00:19:57 2007 +0000
@@ -370,8 +370,11 @@
 		}
 	}
 
-	SetSignalsOnBothDir(tile_start, AxisToTrack(direction));
-	YapfNotifyTrackLayoutChange(tile_start, AxisToTrack(direction));
+	if (flags & DC_EXEC) {
+		Axis axis = AxisToTrack(direction);
+		SetSignalsOnBothDir(tile_start, axis);
+		YapfNotifyTrackLayoutChange(tile_start, axis);
+	}
 
 	/* for human player that builds the bridge he gets a selection to choose from bridges (DC_QUERY_COST)
 	 * It's unnecessary to execute this command every time for every bridge. So it is done only