1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-25 09:30:35 +00:00

monsters no longer inconsistently try to look at the player in quotient geometries

This commit is contained in:
Zeno Rogue 2018-01-05 14:18:14 +01:00
parent c188f8924d
commit 1c74bcb4c8

View File

@ -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