News:

Simutrans Sites
Know our official sites. Find tools and resources for Simutrans.

[bugfix] gebaeude_t::rotate90()

Started by z9999, October 04, 2009, 09:25:30 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

z9999

gebaeude.cc:152-160
Quote
      // have to rotate the tiles :(
      if (!haus_besch->can_rotate() && haus_besch->get_all_layouts() == 1 && (welt->get_einstellungen()->get_rotation() & 1) == 0) {
         // rotate 180 degree
         new_offset = koord(haus_besch->get_b() - 1 - new_offset.x, haus_besch->get_h() - 1 - new_offset.y);

      }
      else {
         // rotate on ...
         new_offset = koord(haus_besch->get_h(tile->get_layout()) - 1 - new_offset.y, new_offset.x);
      }

This should be changed like this.

Quote
      // have to rotate the tiles :(
      if (!haus_besch->can_rotate() && haus_besch->get_all_layouts() == 1) {
         if (welt->get_einstellungen()->get_rotation() & 1) == 0) {
            // rotate 180 degree
            new_offset = koord(haus_besch->get_b() - 1 - new_offset.x, haus_besch->get_h() - 1 - new_offset.y);
         }
         // do nothing here

      }
      else {
         // rotate on ...
         new_offset = koord(haus_besch->get_h(tile->get_layout()) - 1 - new_offset.y, new_offset.x);
      }

prissi