paper doll inventory display vs hallucination
During hallucination, actions which triggered update of persistent inventory made Qt's display of map tiles for equipped objects have those tiles switch randomly, but ordinary move-by-move fluctations applied to floor objects left them alone. Initially I took out hallucination of inventory items altogether, but ended up putting that back and changing the floor hallucination to affect Qt's paper doll too. The display.h change isn't needed but I've left it in.
This commit is contained in:
@@ -48,13 +48,12 @@ void NetHackQtInvUsageWindow::drawWorn(QPainter& painter, obj* nhobj,
|
||||
int x, int y, bool canbe)
|
||||
{
|
||||
short int glyph;
|
||||
if (nhobj)
|
||||
glyph = obj_to_glyph(nhobj, rn2_on_display_rng);
|
||||
else if (canbe)
|
||||
glyph = cmap_to_glyph(S_room);
|
||||
else
|
||||
glyph = GLYPH_UNEXPLORED; // was cmap_to_glyph(S_stone)
|
||||
|
||||
if (nhobj) {
|
||||
/* Hallucination doesn't affect inventory */
|
||||
glyph = obj_to_glyph(nhobj, rn2_on_display_rng);
|
||||
} else {
|
||||
glyph = canbe ? cmap_to_glyph(S_room) : GLYPH_UNEXPLORED;
|
||||
}
|
||||
qt_settings->glyphs().drawCell(painter, glyph, x, y);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user