mirror of https://github.com/OpenTTD/OpenTTD
(svn r19445) -Change: No need to drag an area when overbuilding bridges.
parent
8b8057dce3
commit
0f9be95e03
|
@ -254,7 +254,14 @@ static void GenericPlaceSignals(TileIndex tile)
|
||||||
|
|
||||||
static void PlaceRail_Bridge(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);
|
VpStartPlaceSizing(tile, VPM_X_OR_Y, DDSP_BUILD_BRIDGE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Command callback for building a tunnel */
|
/** Command callback for building a tunnel */
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include "sound_func.h"
|
#include "sound_func.h"
|
||||||
#include "company_func.h"
|
#include "company_func.h"
|
||||||
#include "tunnelbridge.h"
|
#include "tunnelbridge.h"
|
||||||
|
#include "tunnelbridge_map.h"
|
||||||
#include "tilehighlight_func.h"
|
#include "tilehighlight_func.h"
|
||||||
#include "company_base.h"
|
#include "company_base.h"
|
||||||
|
|
||||||
|
@ -112,7 +113,14 @@ static void PlaceRoad_AutoRoad(TileIndex tile)
|
||||||
|
|
||||||
static void PlaceRoad_Bridge(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);
|
VpStartPlaceSizing(tile, VPM_X_OR_Y, DDSP_BUILD_BRIDGE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue