summaryrefslogtreecommitdiff
path: root/src/bridge_gui.cpp
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-10-30 11:13:12 +0100
committerErich Eckner <git@eckner.net>2018-10-30 15:28:03 +0100
commita34d095259409cf1454d9777deabbc00bcdb9407 (patch)
tree9e7c37ed33f5bd6b3c2f41cf248dcb656b2a4afa /src/bridge_gui.cpp
parent6647cb917963c4e0d6d633b7a92af78167050893 (diff)
downloadopenttd-underground-plus-others-original.tar.xz
underground patch appliedunderground-plus-others-original
Diffstat (limited to 'src/bridge_gui.cpp')
-rw-r--r--src/bridge_gui.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/bridge_gui.cpp b/src/bridge_gui.cpp
index 4a349b605..f6412352c 100644
--- a/src/bridge_gui.cpp
+++ b/src/bridge_gui.cpp
@@ -24,6 +24,7 @@
#include "cmd_helper.h"
#include "tunnelbridge_map.h"
#include "road_gui.h"
+#include "tilehighlight_func.h"
#include "widgets/bridge_widget.h"
@@ -116,8 +117,10 @@ private:
case TRANSPORT_ROAD: _last_roadbridge_type = this->bridges->Get(i)->index; break;
default: break;
}
- DoCommandP(this->end_tile, this->start_tile, this->type | this->bridges->Get(i)->index,
- CMD_BUILD_BRIDGE | CMD_MSG(STR_ERROR_CAN_T_BUILD_BRIDGE_HERE), CcBuildBridge);
+ if (DoCommandP(this->end_tile, this->start_tile, this->type | this->bridges->Get(i)->index,
+ CMD_BUILD_BRIDGE | CMD_MSG(STR_ERROR_CAN_T_BUILD_BRIDGE_HERE), CcBuildBridge)) {
+ StoreRailPlacementEndpoints(this->start_tile, this->end_tile, (TileX(this->start_tile) == TileX(this->end_tile)) ? TRACK_Y : TRACK_X, false);
+ }
}
/** Sort the builable bridges */