(svn r7957) -Backport from trunk (r7936): 0.5
authorDarkvater
Sun, 07 Jan 2007 12:20:48 +0000
branch0.5
changeset 5400 5cb194d32614
parent 5399 1bd8a20f6257
child 5401 8ba3ebcca23b
(svn r7957) -Backport from trunk (r7936):
- Only update the signals and YAPF cache on a DC_EXEC action for bridge-building
tunnelbridge_cmd.c
--- a/tunnelbridge_cmd.c	Sun Jan 07 12:19:56 2007 +0000
+++ b/tunnelbridge_cmd.c	Sun Jan 07 12:20:48 2007 +0000
@@ -411,8 +411,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