From 1c74bcb4c868b933fa3d007bb87ae16b9a217a88 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Fri, 5 Jan 2018 14:18:14 +0100 Subject: [PATCH] monsters no longer inconsistently try to look at the player in quotient geometries --- graph.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/graph.cpp b/graph.cpp index dbc0d162..8dd21edc 100644 --- a/graph.cpp +++ b/graph.cpp @@ -1981,18 +1981,6 @@ bool drawMonster(const transmatrix& Vparam, int ct, cell *c, int col) { return drawMonsterTypeDH(m, c, Vs, col, darkhistory, footphase); } - // golems, knights, and hyperbugs don't face the player (mondir-controlled) - // also whatever in the lineview mode - - else if(isFriendly(c) || isBug(c) || (c->monst && conformal::on) || c->monst == moKrakenH || (isBull(c->monst) && c->mondir != NODIR) || c->monst == moButterfly || isMagneticPole(c->monst) || - isSwitch(c->monst) || c->monst == moPair) { - if(c->monst == moKrakenH) Vs = Vb, nospins = nospinb; - if(!nospins) Vs = Vs * ddspin(c, c->mondir, S42); - if(c->monst == moPair) Vs = Vs * xpush(-.12); - if(isFriendly(c)) drawPlayerEffects(Vs, c, false); - return drawMonsterTypeDH(m, c, Vs, col, darkhistory, footphase); - } - else if(c->monst == moKrakenT) { if(c->hitpoints == 0) col = 0x404040; if(nospinb) { @@ -2005,6 +1993,18 @@ bool drawMonster(const transmatrix& Vparam, int ct, cell *c, int col) { return drawMonsterTypeDH(m, c, Vb, col, darkhistory, footphase); } + // golems, knights, and hyperbugs don't face the player (mondir-controlled) + // also whatever in the lineview mode, and whatever in the quotient geometry + + else if(isFriendly(c) || isBug(c) || (c->monst && conformal::on) || c->monst == moKrakenH || (isBull(c->monst) && c->mondir != NODIR) || c->monst == moButterfly || isMagneticPole(c->monst) || + isSwitch(c->monst) || c->monst == moPair || (c->monst && (quotient || torus))) { + if(c->monst == moKrakenH) Vs = Vb, nospins = nospinb; + if(!nospins) Vs = Vs * ddspin(c, c->mondir, S42); + if(c->monst == moPair) Vs = Vs * xpush(-.12); + if(isFriendly(c)) drawPlayerEffects(Vs, c, false); + return drawMonsterTypeDH(m, c, Vs, col, darkhistory, footphase); + } + else if(c->monst) { // other monsters face the player