Skip to content

Commit a06f923

Browse files
committed
Fix glitch after drawing secondary map
1 parent 536d14a commit a06f923

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

source/map_drawer.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -306,16 +306,15 @@ void MapDrawer::DrawMap()
306306
bool only_colors = options.isOnlyColors();
307307
bool tile_indicators = options.isTileIndicators();
308308

309-
// Enable texture mode
310-
if(!only_colors)
311-
glEnable(GL_TEXTURE_2D);
312-
313309
for(int map_z = start_z; map_z >= superend_z; map_z--) {
314310
if(options.show_shade) {
315311
DrawShade(map_z);
316312
}
317313

318314
if(map_z >= end_z) {
315+
if(!only_colors)
316+
glEnable(GL_TEXTURE_2D);
317+
319318
int nd_start_x = start_x & ~3;
320319
int nd_start_y = start_y & ~3;
321320
int nd_end_x = (end_x & ~3) + 4;
@@ -371,6 +370,9 @@ void MapDrawer::DrawMap()
371370
}
372371
}
373372

373+
if(!only_colors)
374+
glDisable(GL_TEXTURE_2D);
375+
374376
DrawPositionIndicator(map_z);
375377
}
376378

0 commit comments

Comments
 (0)