Skip to content

Commit c42b284

Browse files
committed
CHG: (poppo) jump tool now allows also for z coordinaate
git-svn-id: svn://tron.homeunix.org/simutrans/simutrans/trunk@11878 8aca7d54-2c30-db11-9de9-000461428c89
1 parent 31fa5ee commit c42b284

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

simutrans/history.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@
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
57+
CHG: (poppo) jump tool now allows also for z coordinaate
58+
FIX: (poppo) last tool not show when too many tools to fit
5759

5860

5961
Release of 124.3.1 (r11671 on 5-Apr-2025):

src/simutrans/gui/jump_frame.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,10 @@ bool jump_frame_t::action_triggered( gui_action_creator_t *comp,value_t /* */)
4949
// OK- Button or Enter-Key pressed
5050
//---------------------------------------
5151
koord my_pos;
52-
sscanf(buf, "%hd,%hd", &my_pos.x, &my_pos.y);
52+
sint16 h;
53+
bool has_h = sscanf(buf, "%hd,%hd,%hd", &my_pos.x, &my_pos.y, &h)>2;
5354
if(welt->is_within_limits(my_pos)) {
54-
koord3d k( my_pos, welt->min_hgt( my_pos ) );
55+
koord3d k( my_pos, has_h ? h : welt->min_hgt( my_pos ) );
5556
welt->get_viewport()->change_world_position(k);
5657
welt->get_zeiger()->change_pos( k );
5758
}

src/simutrans/gui/tool_selector.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ bool tool_selector_t::infowin_event(const event_t *ev)
247247
assert( xy >= tool_icon_width );
248248
tool_icon_disp_start += xy;
249249
if( tool_icon_disp_start + xy > (int)tools.get_count() ) {
250-
tool_icon_disp_start = tools.get_count() - xy -1;
250+
tool_icon_disp_start = tools.get_count() - xy;
251251
}
252252
offset = scr_coord( 0, 0 );
253253
}

src/simutrans/simfab.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2926,7 +2926,6 @@ void fabrik_t::info_prod(cbuffer_t& buf) const
29262926
buf.append( translator::translate("Durchsatz") );
29272927
buf.append(get_current_production(), 0);
29282928
buf.append( translator::translate("units/day") );
2929-
buf.append("\n");
29302929
buf.printf(translator::translate("Produces: %.1f units/minute"),
29312930
get_production_per_second() * 60.0
29322931
);

0 commit comments

Comments
 (0)