diff options
author | Darkvater <Darkvater@openttd.org> | 2007-01-07 00:19:57 +0000 |
---|---|---|
committer | Darkvater <Darkvater@openttd.org> | 2007-01-07 00:19:57 +0000 |
commit | 0a44c03edd611e9b816ae7bcc71561b1ff7bd259 (patch) | |
tree | bea04073c9e003ace28a31b23b45cb2c716b8873 /src | |
parent | 9961e309ea7ba7d7aecacf99039a7c30949914d4 (diff) | |
download | openttd-0a44c03edd611e9b816ae7bcc71561b1ff7bd259.tar.xz |
(svn r7936) -Fix (r4987, old-rev): Only update the signals and YAPF cache on a DC_EXEC action for bridge-building
Diffstat (limited to 'src')
-rw-r--r-- | src/tunnelbridge_cmd.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/tunnelbridge_cmd.c b/src/tunnelbridge_cmd.c index 7e38814c4..9f51b450c 100644 --- a/src/tunnelbridge_cmd.c +++ b/src/tunnelbridge_cmd.c @@ -370,8 +370,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 |