mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-30 03:50:34 +00:00
Merge pull request #272 from jruderman/snake_high
Fix highlight colors for snakes
This commit is contained in:
commit
3af71a1388
@ -2550,12 +2550,15 @@ EX bool drawMonster(const shiftmatrix& Vparam, int ct, cell *c, color_t col, col
|
|||||||
#if CAP_SHAPES
|
#if CAP_SHAPES
|
||||||
|
|
||||||
bool darkhistory = history::includeHistory && history::inkillhistory.count(c);
|
bool darkhistory = history::includeHistory && history::inkillhistory.count(c);
|
||||||
|
color_t outline = OUTLINE_NONE;
|
||||||
|
|
||||||
if(doHighlight())
|
if(doHighlight()) {
|
||||||
poly_outline =
|
outline =
|
||||||
(isPlayerOn(c) || isFriendly(c)) ? OUTLINE_FRIEND :
|
(isPlayerOn(c) || isFriendly(c)) ? OUTLINE_FRIEND :
|
||||||
noHighlight(c->monst) ? OUTLINE_NONE :
|
noHighlight(c->monst) ? OUTLINE_NONE :
|
||||||
OUTLINE_ENEMY;
|
OUTLINE_ENEMY;
|
||||||
|
poly_outline = outline;
|
||||||
|
}
|
||||||
|
|
||||||
// highlight faraway enemies if that's needed
|
// highlight faraway enemies if that's needed
|
||||||
if (vid.faraway_highlight && c->cpdist >= 6 && vid.faraway_highlight <= get_threat_level(c)) {
|
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), [=] () {
|
add_segment(taildist(c), [=] () {
|
||||||
for(int i=11; i>=0; i--) {
|
for(int i=11; i>=0; i--) {
|
||||||
if(i < 3 && (c->monst == moTentacle || c->monst == moTentaclewait)) continue;
|
if(i < 3 && (c->monst == moTentacle || c->monst == moTentaclewait)) continue;
|
||||||
|
if(doHighlight())
|
||||||
|
poly_outline = outline;
|
||||||
shiftmatrix Vbx = Vb;
|
shiftmatrix Vbx = Vb;
|
||||||
if(WDIM == 2) Vbx = Vbx * spin(sin(M_PI * i / 6.) * wav / (i+.1));
|
if(WDIM == 2) Vbx = Vbx * spin(sin(M_PI * i / 6.) * wav / (i+.1));
|
||||||
Vbx = Vbx * xpush(length * (i) / 12.0);
|
Vbx = Vbx * xpush(length * (i) / 12.0);
|
||||||
|
Loading…
Reference in New Issue
Block a user