Mercurial > hg > openttd
changeset 5554:4e5da844da6d draft
(svn r7936) -Fix (r4987, old-rev): Only update the signals and YAPF cache on a DC_EXEC action for bridge-building
author | Darkvater <Darkvater@openttd.org> |
---|---|
date | Sun, 07 Jan 2007 00:19:57 +0000 |
parents | 054e42013849 |
children | d2263262f7d1 |
files | src/tunnelbridge_cmd.c |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/tunnelbridge_cmd.c +++ b/src/tunnelbridge_cmd.c @@ -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