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
Mignari committed Apr 4, 2023
1 parent 536d14a commit a06f923
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 @@ -306,16 +306,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 @@ -371,6 +370,9 @@ void MapDrawer::DrawMap()
}
}

if(!only_colors)
glDisable(GL_TEXTURE_2D);

DrawPositionIndicator(map_z);
}

Expand Down

0 comments on commit a06f923

Please sign in to comment.