Skip to content

Commit b247a69

Browse files
committed
CHG: (poppo) build_wayobj and dragging signals also use the test_driver like the removal tool
git-svn-id: svn://tron.homeunix.org/simutrans/simutrans/trunk@11872 8aca7d54-2c30-db11-9de9-000461428c89
1 parent bf3446d commit b247a69

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

simutrans/history.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@
4444
FIX: no longer crash when city grows into fields
4545
CHG: test renovation before new buildings and use homeless and jobless numbers to decide to extend town borders
4646
FIX: bridge removal costs
47-
CHG: Show obsolete shows lso distribution_weight=0 factories in the editor window
47+
CHG: Show obsolete shows also distribution_weight=0 factories in the editor window
4848
FIX: Not allowed for powerbridges to end on ways
4949
ADD: Retain message of the day in servergames. Can be reshown in the game info/network dialog
5050
FIX: (poppo) trains could not choose if electrification was not to the end of track
5151
CHG: trains with both diesel and electric engine can go on non-electricfied track, but run without electric power there
5252
CHG: (k47) stations names drawn later in minimap
53-
FIX: (k47) world borders soemthimes not correctly displayed
53+
FIX: (k47) world borders somethimes not correctly displayed
5454
FIX: city connects correct over slopes but not to depots
5555
CHG: if defined USE_TOWN_ROAD_BUILDER_TOOL the cityroad building tool will use the internal tool of the city (default off)
5656
ADD: new flag for bridges and ways in makeobj 60.9 "clip_below" Default is (1) but for slim structures (e.g. powerline) it could be set to zero for nicer display of structures below

src/simutrans/tool/simtool.cc

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3840,10 +3840,8 @@ bool tool_build_wayobj_t::calc_route( route_t &verbindung, player_t *player, con
38403840
}
38413841
}
38423842
// get a default vehicle
3843-
vehicle_desc_t remover_desc( waytype, 500, vehicle_desc_t::diesel );
3844-
vehicle_t* test_vehicle = vehicle_builder_t::build(start, player, NULL, &remover_desc);
3845-
test_vehicle->set_flag( obj_t::not_on_map );
3846-
test_driver_t* test_driver = scenario_checker_t::apply(test_vehicle, player, this);
3843+
test_driver_t * test_driver = new way_checker_t(waytype);
3844+
test_driver = scenario_checker_t::apply(test_driver, player, this);
38473845

38483846
bool can_built;
38493847
if( start != to ) {
@@ -5664,10 +5662,9 @@ const char *tool_build_roadsign_t::place_sign_intern(player_t *player, grund_t *
56645662
bool tool_build_roadsign_t::calc_route(route_t &route, player_t *player, const koord3d &from, const koord3d &to)
56655663
{
56665664
// get a default vehicle
5667-
vehicle_desc_t rs_desc( desc->get_wtyp(), 500, vehicle_desc_t::diesel);
5668-
vehicle_t *test_vehicle = vehicle_builder_t::build(from, player, NULL, &rs_desc);
5669-
test_vehicle->set_flag(obj_t::not_on_map);
5670-
test_driver_t *test_driver = scenario_checker_t::apply(test_vehicle, player, this);
5665+
waytype_t waytype = desc->get_waytype() == tram_wt ? track_wt : desc->get_waytype();
5666+
test_driver_t *test_driver = new way_checker_t(waytype);
5667+
test_driver = scenario_checker_t::apply(test_driver, player, this);
56715668

56725669
bool can_build = false;
56735670

0 commit comments

Comments
 (0)