mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-04 05:15:21 +00:00
(svn r19445) -Change: No need to drag an area when overbuilding bridges.
This commit is contained in:
parent
8b8057dce3
commit
0f9be95e03
@ -254,8 +254,15 @@ static void GenericPlaceSignals(TileIndex tile)
|
||||
|
||||
static void PlaceRail_Bridge(TileIndex tile)
|
||||
{
|
||||
if (IsBridgeTile(tile)) {
|
||||
TileIndex other_tile = GetOtherTunnelBridgeEnd(tile);
|
||||
Window *w = GetCallbackWnd();
|
||||
Point pt = {0, 0};
|
||||
if (w != NULL) w->OnPlaceMouseUp(VPM_X_OR_Y, DDSP_BUILD_BRIDGE, pt, tile, other_tile);
|
||||
} else {
|
||||
VpStartPlaceSizing(tile, VPM_X_OR_Y, DDSP_BUILD_BRIDGE);
|
||||
}
|
||||
}
|
||||
|
||||
/** Command callback for building a tunnel */
|
||||
void CcBuildRailTunnel(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "sound_func.h"
|
||||
#include "company_func.h"
|
||||
#include "tunnelbridge.h"
|
||||
#include "tunnelbridge_map.h"
|
||||
#include "tilehighlight_func.h"
|
||||
#include "company_base.h"
|
||||
|
||||
@ -112,8 +113,15 @@ static void PlaceRoad_AutoRoad(TileIndex tile)
|
||||
|
||||
static void PlaceRoad_Bridge(TileIndex tile)
|
||||
{
|
||||
if (IsBridgeTile(tile)) {
|
||||
TileIndex other_tile = GetOtherTunnelBridgeEnd(tile);
|
||||
Window *w = GetCallbackWnd();
|
||||
Point pt = {0, 0};
|
||||
if (w != NULL) w->OnPlaceMouseUp(VPM_X_OR_Y, DDSP_BUILD_BRIDGE, pt, tile, other_tile);
|
||||
} else {
|
||||
VpStartPlaceSizing(tile, VPM_X_OR_Y, DDSP_BUILD_BRIDGE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void CcBuildRoadTunnel(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
|
||||
|
Loading…
Reference in New Issue
Block a user