From 34b4ffffae3ca278ad7faa5473204892685cdb13 Mon Sep 17 00:00:00 2001 From: Jesse Ruderman Date: Mon, 2 Aug 2021 12:14:21 -0700 Subject: [PATCH] Fix highlight colors for snakes --- graph.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/graph.cpp b/graph.cpp index 14375ee1..1024f72d 100644 --- a/graph.cpp +++ b/graph.cpp @@ -2550,12 +2550,15 @@ EX bool drawMonster(const shiftmatrix& Vparam, int ct, cell *c, color_t col, col #if CAP_SHAPES bool darkhistory = history::includeHistory && history::inkillhistory.count(c); - - if(doHighlight()) - poly_outline = + color_t outline = OUTLINE_NONE; + + if(doHighlight()) { + outline = (isPlayerOn(c) || isFriendly(c)) ? OUTLINE_FRIEND : noHighlight(c->monst) ? OUTLINE_NONE : OUTLINE_ENEMY; + poly_outline = outline; + } // highlight faraway enemies if that's needed if (vid.faraway_highlight && c->cpdist >= 6 && vid.faraway_highlight <= get_threat_level(c)) { @@ -2677,6 +2680,8 @@ EX bool drawMonster(const shiftmatrix& Vparam, int ct, cell *c, color_t col, col add_segment(taildist(c), [=] () { for(int i=11; i>=0; i--) { if(i < 3 && (c->monst == moTentacle || c->monst == moTentaclewait)) continue; + if(doHighlight()) + poly_outline = outline; shiftmatrix Vbx = Vb; if(WDIM == 2) Vbx = Vbx * spin(sin(M_PI * i / 6.) * wav / (i+.1)); Vbx = Vbx * xpush(length * (i) / 12.0);