Skip to content

Commit

Permalink
Only get valid rotations for SDL overmaps (CleverRaven#74617)
Browse files Browse the repository at this point in the history
  • Loading branch information
anothersimulacrum authored Jun 17, 2024
1 parent 7d05b5b commit 9ab7f8b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/cata_tiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2611,6 +2611,9 @@ bool cata_tiles::draw_from_id_string_internal( const std::string &id, TILE_CATEG
const oter_type_str_id tmp( id );
if( tmp.is_valid() ) {
if( !tmp->is_linear() ) {
// if rota is for a omt with connections, it can be outside the bounds of
// om_direction::type. We can't do anything about that now, so just stay inbounds
rota %= om_direction::size;
sym = tmp->get_rotated( static_cast<om_direction::type>( rota ) )->get_uint32_symbol();
} else {
sym = tmp->symbol;
Expand Down

0 comments on commit 9ab7f8b

Please sign in to comment.