Changeset - r14842:1346ce055d4b
[Not reviewed]
master
0 2 0
frosch - 14 years ago 2010-03-17 20:19:55
frosch@openttd.org
(svn r19445) -Change: No need to drag an area when overbuilding bridges.
2 files changed with 17 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/rail_gui.cpp
Show inline comments
 
@@ -254,7 +254,14 @@ static void GenericPlaceSignals(TileInde
 

	
 
static void PlaceRail_Bridge(TileIndex tile)
 
{
 
	VpStartPlaceSizing(tile, VPM_X_OR_Y, DDSP_BUILD_BRIDGE);
 
	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 */
src/road_gui.cpp
Show inline comments
 
@@ -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,7 +113,14 @@ static void PlaceRoad_AutoRoad(TileIndex
 

	
 
static void PlaceRoad_Bridge(TileIndex tile)
 
{
 
	VpStartPlaceSizing(tile, VPM_X_OR_Y, DDSP_BUILD_BRIDGE);
 
	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);
 
	}
 
}
 

	
 

	
0 comments (0 inline, 0 general)