Skip to content

Commit d41040b

Browse files
EmilyV99connorjclark
authored andcommitted
fix(zq): 'Go' in warp dialogs not rebuilding transparency table
1 parent 17852c0 commit d41040b

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

src/zq/zq_class.cpp

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -503,16 +503,22 @@ void zmap::setCurrentView(int32_t map, int32_t scr)
503503

504504
void zmap::setCurrMap(int32_t index)
505505
{
506-
int32_t oldmap=currmap;
507-
scrpos[currmap]=currscr;
508-
currmap=bound(index,0,map_count);
509-
screens=&TheMaps[currmap*MAPSCRS];
510-
511-
currscr=scrpos[currmap];
512-
loadlvlpal(getcolor());
513-
514-
reset_combo_animations2();
515-
mmap_mark_dirty();
506+
int32_t oldmap=currmap;
507+
optional<int> oldcolor;
508+
if(screens)
509+
oldcolor = getcolor();
510+
scrpos[currmap]=currscr;
511+
currmap=bound(index,0,map_count);
512+
screens=&TheMaps[currmap*MAPSCRS];
513+
514+
currscr=scrpos[currmap];
515+
int newcolor = getcolor();
516+
loadlvlpal(newcolor);
517+
if(!oldcolor || *oldcolor != newcolor)
518+
rebuild_trans_table();
519+
520+
reset_combo_animations2();
521+
mmap_mark_dirty();
516522
}
517523

518524
int32_t zmap::getCurrScr()

0 commit comments

Comments
 (0)