Skip to main content
Topic: [bugfix] gebaeude_t::rotate90() (Read 2174 times) previous topic - next topic

[bugfix] gebaeude_t::rotate90()

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);
      }

 

Re: [bugfix] gebaeude_t::rotate90()

Reply #1
Thank you, incorporated.