The International Simutrans Forum

 

Author Topic: [bug r2622] Zeiger remains on sliced underground view mode  (Read 2392 times)

0 Members and 1 Guest are viewing this topic.

Offline z9999

  • Devotees (Inactive)
  • *
  • Posts: 848
[bug r2622] Zeiger remains on sliced underground view mode
« on: September 02, 2009, 10:35:49 AM »
If we build way by click-to-click on sliced underground view mode, zeiger will remains at start and end position.
This problem doesn't happen with dragging.

Offline gerw

  • Coder/patcher
  • *
  • Posts: 618
Re: [bug r2622] Zeiger remains on sliced underground view mode
« Reply #1 on: September 02, 2009, 11:09:49 AM »
Fix:

Code: [Select]
Index: simwerkz.cc
===================================================================
--- simwerkz.cc (revision 2622)
+++ simwerkz.cc (working copy)
@@ -1639,12 +1639,19 @@
                }
        }
        else {
+               welt->lookup_kartenboden(end.get_2d())->clear_flag(grund_t::marked);
+
                // Build tunnels
                wegbauer_t bauigel(welt, sp);
                calc_route( bauigel, start, end, welt );
                welt->mute_sound(true);
                bauigel.baue();
                welt->mute_sound(false);
+
+               grund_t *gr = welt->lookup(end);
+               if( gr ) {
+                       gr->set_flag(grund_t::marked);
+               }
                return NULL;
        }
 }

Thank you for reporting!

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4849
  • Languages: EN, DE, AT
Re: [bug r2622] Zeiger remains on sliced underground view mode
« Reply #2 on: September 22, 2009, 10:03:05 AM »
should be fixed in 2656