From 04d77258c5feaa4c6cddd97169cafbd8fbf863ea Mon Sep 17 00:00:00 2001 From: Darkvater Date: Sun, 7 Jan 2007 12:20:48 +0000 Subject: [PATCH] (svn r7957) -Backport from trunk (r7936): - Only update the signals and YAPF cache on a DC_EXEC action for bridge-building --- tunnelbridge_cmd.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tunnelbridge_cmd.c b/tunnelbridge_cmd.c index a1db8f8660..7cc2a8ce77 100644 --- a/tunnelbridge_cmd.c +++ b/tunnelbridge_cmd.c @@ -411,8 +411,11 @@ not_valid_below:; } } - 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