Skip to content

Commit

Permalink
Fix glitch after drawing secondary map
Browse files Browse the repository at this point in the history
  • Loading branch information
beats-dh committed Apr 6, 2023
1 parent 6b975a5 commit f02bf92
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions source/map_drawer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,16 +312,15 @@ void MapDrawer::DrawMap()
bool only_colors = options.isOnlyColors();
bool tile_indicators = options.isTileIndicators();

// Enable texture mode
if(!only_colors)
glEnable(GL_TEXTURE_2D);

for(int map_z = start_z; map_z >= superend_z; map_z--) {
if(options.show_shade) {
DrawShade(map_z);
}

if(map_z >= end_z) {
if(!only_colors)
glEnable(GL_TEXTURE_2D);

int nd_start_x = start_x & ~3;
int nd_start_y = start_y & ~3;
int nd_end_x = (end_x & ~3) + 4;
Expand Down Expand Up @@ -377,6 +376,9 @@ void MapDrawer::DrawMap()
}
}

if(!only_colors)
glDisable(GL_TEXTURE_2D);

DrawPositionIndicator(map_z);
}

Expand Down

0 comments on commit f02bf92

Please sign in to comment.